from small one page howto to huge articles all in one place
 

search text in:





Poll
Which kernel version do you use?





poll results

Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

195649

userrating:

average rating: 1.7 (102 votes) (1=very good 6=terrible)


May 25th. 2007:
Words

486

Views

252055

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

140919

userrating:

average rating: 1.4 (42 votes) (1=very good 6=terrible)


April, 26th. 2006:

Druckversion . pdf icon
You are here: System->Tips and Tricks

Export an X Session

This tip shows you how to run GUI programs remotely by exporting an X session and tunneling it over SSH. Note that this is heavily dependant on the speed of your network connection. If you're trying to run Mozilla off of a box on the other side of the country on a 56K modem it is probably not going to work very well. The best application for this is running programs over the same LAN or possibly a high-speed WAN. An easy example application is running gvim remotely so you can have a GUI editor.

For this example we assume the local machine has an IP of 192.168.1.2 and the remote machine has an IP of 192.168.1.3. On the local machine you're going to need to give the remote machine access to connect to your X server. Use the command xhost to do this.

Code Listing 1: Local machine

// This command allows the machine with the IP 192.168.1.3 to connect 
# xhost +192.168.1.3

On the remote machine, you need to export the $DISPLAY variable to your local machine. After that, you should be ready to run GUI programs remotely.

Code Listing 2: Remote machine

# export DISPLAY="192.168.1.2:0.0" 
# gvim /etc/passwd
// You should see gvim open on your local machine with the contents
// of the remote machine's /etc/passwd file.

Note: This is very unsecure and not recommended since everything you type including passwords will be transmitted over the network unencrypted.

To tunnel the connection over SSH and thus encrypt the traffic edit your /etc/sshd2_config file.

Code Listing 3: /etc/sshd2_config

// Add or edit the following line 
ForwardX11 yes

Now connect from the local machine to the remote machine via ssh and start your X application.

Code Listing 4: Remote machine

# gvim /etc/passwd 
// You should see gvim open on your local machine with the contents
// of the remote machine's /etc/passwd file.

Notice that you don't have to set the DISPLAY variable, ssh automagically does that for you. You do however have to allow access to your local machine's X server (see above).

From http://www.gentoo.org/news/en/gwn/20030602-newsletter.xml


rate this article:
current rating: average rating: 1.5 (103 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2020 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 60.1 ms