X Clients and sessions are displaying on the wrong system
X-Win32 sessions displaying on the wrong system generally indicate a problem with the $DISPLAY environment variable or with the -display command-line parameter being passed to applications such as xterm. This problem does not apply to all types of sessions that X-Win32 supports.
Connection methods susceptible to display on the wrong system
- rexec, rsh – rexec and rsh sessions require that the -display argument be passed to the initial session command (e.g. xterm, dtterm, konsole, or gnome-terminal) and this initial session command then sets the $DISPLAY environment variable for subsequent commands
- StarNetSSH without X11 Forwarding – Although rarely used in this way, StarNetSSH without X11Forwarding operates similarly to rexec and rsh as described above
Connection methods not susceptible to display on the wrong system
- StarNetSSH with X11 Forwarding (the default) – StarNetSSH with X11 Forwarding uses only localhost connections and automatically sets the $DISPLAY environment variable for all X Clients, including the initial session command; if there is a problem with a login or profile script overriding the $DISPLAY environment variable then the X Client will simply not display at all
- Xdmcp – Xdmcp connections do not need the -display command-line parameter because there is no session command being executed; in addition, they set the $DISPLAY environment variable for the entine desktop system (e.g. CDE, Gnome, or KDE) that you are logging into so all clients started via menus will typically work (there may be a problem with clients started from applications that process login scripts, such as xterm, gnome-terminal, or konsole)
Causes of the problem and solutions
- Hard-coded address being passed in the session command to the -display command line parameter
- Solution: Use the $DISPLAY session command variable instead of a hard-coded address (e.g. xterm -ls -display $DISPLAY). Note that in X-Win32 8 and later this session command variable is @DISPLAY@.
- Solution: If you are hard-coding the address of your firewall to the Internet so that you can forward connections back to your machine behind the firewall, then use the $IPSMART:$DNUM session command variables to use IPSmart to obtain the address of your firewall automatically (e.g. xterm -ls -display $IPSMART:$DNUM)
- Solution: Use StarNetSSH with X11 Forwarding instead
- Your cshrc, bashrc, or profile scripts on the remote host are setting the $DISPLAY environment variable; this is typically the case at sites that have used UNIX exclusively for years and had previously hard-coded the address of each user’s machine into the login scripts
- Solution: Remove the setting of the $DISPLAY environment variable from the login scripts
- Soltuion: Develop a more sophisticated way to only set $DISPLAY when appropriate and to not set it when connecting via X-Win32
- The Proxy option on X-Config’s Display form is selected and specifies the address of another machine running an X Server
- Solution: Select one of your local IP addresses in X-Config’s Display tab instead of Proxy
- Solution: Correct the address in Proxy to either point to your proxy/firewall or to the machine where you want the X Clients to be displayed
Cateogry:Errors
Category:Sessions -> rexec
Category:Sessions -> rsh

Solutions