Running X programs on another machine - Desktop Customization & Workflow
Users browsing this thread: 2 Guest(s)
|
|||
Hello fellow *nixers,
In this tutorial I'm going to explain how to run X programs from a remote computer. This is an already well known subject for most *nix users, however this might be useful for reference purposes. If you want to run remote X applications, like GUI, on your local machine, this means running them inside your current X session, you'll need to follow the following steps. Make sure that SSH on the remote machine, the one you are not currently sitting on, allows X forwarding (Obviously the ssh deamon should be running also). Open /etc/ssh/sshd_config, on the remote box, and make sure that this line is not commented. Code: X11Forwarding yes If you run into problems here just restart the sshd. Code: ssh -X -c blowfish user_on_the_remote_machine@remote_machine_address The last step is to simply run the X program from the ssh session you just opened, as if it was a local terminal. You'll notice that the programs will open inside your current X session as if they were running locally. On the other hand, if you want to run a nested X session inside your current X session, then you'll need to proceed as follow. Install Xephyr from your favourite package manager. Xephyr is an extension to the X server that allows you to run an X display inside the one you are running, which is exactly what you need. You'll also need to be able to forward the X session so check the previous method to see how to do that. A little parenthesis about the $DISPLAY environment variable. This variable represent the current display the X session outputs on. Code: raptor ~ $ echo $DISPLAY < What you need to accomplish is to be able to redirect the output from the ssh X program into Xephyr nested X session. Thus, run the following command to start Xephyr and make it listen for programs that needs to be displayed on the :1 . Code: Xephyr -ac -screen 1266x768 -br -reset -terminate 2> /dev/null :1 & You can change the definition, in the screen parameter, according to your preferences. Now, in the same terminal run the following command to be able to use the :1 display for the next commands. (This might differ depending on the shell you are using) Code: DISPLAY=:1.0 Code: ssh -XfC -c blowfish user_on_the_remote_machine@remote_machine_address window_manager This should cover most of the remote usage of X programs. I hope this is now as clear as water for people that were looking for an answer on the subject. That's all folks! |
|||
|
|||
What a nice article :)
|
|||
|
|||
Well, at least it's better than to read the docs on the Ubuntu forums.
|
|||
|
|||
Xephyr is indeed very useful. Great tutorial.
|
|||
|
|||
(01-05-2013, 12:12 PM)NeoTerra Wrote:(01-05-2013, 01:43 AM)venam Wrote: Well, at least it's better than to read the docs on the Ubuntu forums. LoL... Hey, I learned a lot from Ubuntu Forums... Like, maybe I should dump Ubuntu for something better. Venam, this is good stuff man, thanks! I love fooling around with SSH. |
|||
|
|||
I've seen a video of this before
http://www.youtube.com/watch?feature=pla...XzbJrfZ4ak#! Is this yours venam? lol http://www.vanemery.com/Linux/XoverSSH/X-over-SSH2.html |
|||
|
|||
Nihility: This is not mine but I've read it before. It's a very long tutorial for something so simple.
|
|||