Connecting with X windows
If you get a message about not being able to open or connect to a
display, then LCMgui is probably installed on a remote computer.
Installation-dependent security measures may cause this. Otherwise, you
may only need to inform your local computer and remote computer about
each other and X windows.
All of this can be avoided by using a display directly connected to the
computer with LCMgui. If this is impractical, then try informing
the two partners with the following two commands:
Telling your local display
Log onto your local computer and then enter:
Here, xhost +yyy.yyy.yyy.yyyyyy.yyy.yyy.yyy is the IP address of your
remote computer. An example is 142.87.102.2.
(You cannot use symbolic host names of the form
mycomp.mlab.myu.edu; only the numeric IP addresses of the form
yyy.yyy.yyy.yyy will work. In the long term, you may want to
replace xhost with a more secure method.)
Telling your remote computer
Now, still on your local computer, connect to your remote computer with
where ssh -X -l your_remote_username yyy.yyy.yyy.yyy-X is upper case, -l is lower case
L and yyy.yyy.yyy.yyy is again
the IP address of your remote computer.
Then start lcmgui with
~/.lcmodel/lcmgui
If there is an error message of the form "...couldn't connect to display
"localhost:??.0"", enter
that is, you simply replace export DISPLAY=127.0.0.1:??.0localhost with
127.0.0.1; so, be sure to
replace ??.0 above with the actual number at the end of
the error message (often 10.0). Put no spaces on either side of
the = sign.
If you get a message that the command export is not found, then
enter:
setenv DISPLAY 127.0.0.1:??.0
If, instead, there is an error message of the form "... couldn't
connect to display...", but with "localhost" missing from
the message, then enter
where export DISPLAY=xxx.xxx.xxx.xxx:0xxx.xxx.xxx.xxx is the IP address of your
local computer.
In either case, now try again with
~/.lcmodel/lcmgui
Possible additional Linux settings
Recent Linux distributions can require that a configuration file be edited.
With
the GNOME window manager, the file is typically /etc/X11/gdm.conf
or /etc/opt/gnome/gdm/gdm.conf
(or /etc/gdm/custom.conf with Fedora Core 5). Change the line
DisallowTCP=true to
Reportedly with KDE, the file is typically DisallowTCP=false/etc/kde3/kdm/kdmrc
(but the directory may very well differ). Comment out
ServerArgsLocal=-nolisten tcp with a #:
Then restart GNOME or X windows.
#ServerArgsLocal=-nolisten tcp
Older Linux distributions will not have these strings and should not need
changes. High-security installations may need more changes. Newer
distributions may need other changes. Sometimes remote X windows will work
with some applications (such as xclock) and not work with others
(such as lcmgui). Ask your system manager. Internet
search engines can also help you
find a solution for your Linux distribution.
Further help
If problems or questions remain, send the complete
error message to sp@lcmodel.CA
Last modified: 18 November 2016