CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] OpenFOAM v9 Installation problem - gedit ~/.bashrc

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Yann
  • 1 Post By limpideyes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 3, 2021, 08:10
Default OpenFOAM v9 Installation problem - gedit ~/.bashrc
  #1
New Member
 
Mary
Join Date: Sep 2021
Posts: 16
Rep Power: 5
limpideyes is on a distinguished road
Hello,

I have tried to install OpenFOAM v9 in Ubuntu 20.04 LTS under WSL (windows 11).

I have followed the process:
https://openfoam.org/download/9-ubuntu/

Everything went ok. However, when I typed:
Code:
gedit ~/.bashrc
I have got the message:
Code:
Unable to init server: Could not connect: Connection refused

(gedit:22): Gtk-WARNING **: 12:09:05.965: cannot open display:
So, the installation could not be completed.

Please help.
limpideyes is offline   Reply With Quote

Old   November 4, 2021, 12:28
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hi Mary,

Your installation is complete. This last step is just meant to load the OpenFOAM environment each time you start a new session, so you don't have to do it manually. Now if your just type the command below in your terminal, it should load the OpenFOAM environment and you will be good to go:

Code:
source /opt/openfoam9/etc/bashrc
But this solution is not very handy since you will have to do it each time you start a new session. This is why we usually add this line in a file named .bashrc in your home directory. This file is read every time you start a new session and it is used to load all kind of things to fit the user's preferences.

You get an error because gedit is a text editor with a GUI and you don't have a graphical environment in WSL.

There are 2 solutions: doing this last step without opening an editor needing a graphical environment or enabling graphical applications in WSL.

This link explains how to do both: https://openfoam.org/download/windows/


Cheers,
Yann
limpideyes likes this.
Yann is offline   Reply With Quote

Old   November 6, 2021, 11:42
Default
  #3
New Member
 
Mary
Join Date: Sep 2021
Posts: 16
Rep Power: 5
limpideyes is on a distinguished road
Thanks a lot, Yann! I will try it!!!
Yann likes this.
limpideyes is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.com] OpenFoam Installation v1806 on W7, 64bit Problem Joerg2007 OpenFOAM Installation 6 November 6, 2018 20:09
compiler problem with OpenFOAM installation belkadi OpenFOAM Installation 4 May 22, 2013 11:26
Problem? with Installation of OpenFOAM 2.1.0 on to Ubuntu 10.4.4 VirtualBox Stubby OpenFOAM Installation 8 March 5, 2012 16:12
Problem: Openfoam 2.1 installation from git repo fertinaz OpenFOAM Installation 10 March 2, 2012 12:26
OpenFOAM 1.7.0 installation problem stevek OpenFOAM 14 December 1, 2010 16:30


All times are GMT -4. The time now is 00:06.