Difference between revisions of "X Window System/remote session"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(→‎Bugs: Issues)
(more succinct explanation that gets to the point in the first sentence)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Computing]]: [[Linux]]: [[Running a remote X session]]
+
==About==
==Explanation==
+
The [[X Window System]]'s client-server architecture makes it possible to run graphical applications remotely – i.e. the user is interacting with the application on one machine, but the actual execution is taking place on another.
The [[X Windows]] system, unlike many other more popular windowing systems, carefully separates the ''client'' (i.e. the part which the user sees and interacts with) from the ''server'' (i.e. the part which does all the work behind the scenes). This means that the client does not actually have to be running on the same machine as the server. It is possible to set up a window on one machine which is actually a session running on another machine – similar to [[VNC]], but designed into the system rather than being a kluge on top of it. (However, see [[#Bugs]].)
 
  
In order to do this, you will need [[Xnest]] running on the "client" machine. This is available in standard repositories for most [[Linux distributions]] (including [[Ubuntu]] and [[SuSE]]).
+
There are actually ''two'' ways to run remote graphical applications on X Windows:
==How==
+
* [[/application]]: run a single application
* On the local (client) machine (note the space before the ":"):
+
* [[/desktop]]: run a complete desktop environment
[[Xnest]] -ac :1
 
* On the remote machine (via [[ssh]] or equivalent):
 
export DISPLAY=''yourmachine'':1
 
...where ''yourmachine'' is the name or IP address of your local machine. If you get messages indicating that it's having trouble connecting to ''yourmachine'', try using an IP address instead. If you are using a Windows ([[Samba]]) network and machine names do not automatically resolve to IP addresses, use "[[nmblookup]] ''yourmachine''" to get the address.
 
* You will then need to run the command to start a GUI session; [[startkde]] starts [[KDE]]. Not sure what other commands might be available.
 
==Bugs==
 
* Resized windows often don't display properly; the controls within the window resize, but the window itself won't grow past its original size. Controls which move outside the visible area become inaccessible, including the window-frame controls (max/min/close).
 
* New windows often don't display at all (except in the taskbar, if they would normally show up there), but you can make them appear by clicking on the K menu in the taskbar.
 
==Issues==
 
Is there any way to automate this whole thing? As it is, you have to have two console windows open – one for the remote ssh session and one for the local session to start Xnest. Neither of those windows can be closed without killing the session. There must be some way to have one session spawn a batch file (.sh) which spawns Xnest, then spawns an ssh session to the remote which runs export (using nmblookup to get the local machine's IP address automatically would be nice), and then exits – but I'm not enough of a Linux guru to know how to do most of that.
 

Latest revision as of 23:11, 9 October 2015

About

The X Window System's client-server architecture makes it possible to run graphical applications remotely – i.e. the user is interacting with the application on one machine, but the actual execution is taking place on another.

There are actually two ways to run remote graphical applications on X Windows: