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:
   xhost +yyy.yyy.yyy.yyy
Here, yyy.yyy.yyy.yyy is the IP address of your remote computer. An example is

(You cannot use symbolic host names of the form; 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
    ssh  -X  -l your_remote_username  yyy.yyy.yyy.yyy
where -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

If there is an error message of the form "...couldn't connect to display "localhost:??.0"", enter
    export DISPLAY=
that is, you simply replace localhost with; 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

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 is the IP address of your local computer.

In either case, now try again with

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 /etc/kde3/kdm/kdmrc (but the directory may very well differ). Comment out ServerArgsLocal=-nolisten tcp with a #:
   #ServerArgsLocal=-nolisten tcp
Then restart GNOME or X windows.

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