Linux / UNIX Tech Support Forum
This is a discussion on Run remote X applications over network using ssh within the Getting started tutorials forums, part of the Linux Getting Started category; This small howto guides you to run remote X applications over network using ssh. Introduction The X windows system created ...
|
|||||||
| Getting started tutorials So much to read, so little time! If that is your problem, we have solution. Read our FAQ and tutorials to help you cut through the clutter of information overload. Only members of "contributors" group can post new tutorials. Other members can just reply to thread. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
This small howto guides you to run remote X applications over network using ssh.
Introduction The X windows system created by X consortium www.X.org
What is X server? X-server -> Talks with your hardware (VGA card, mouse, monitor etc) => It provides the screen (or display) and manages the resources. For more info on X Window System and X client-server model and network transparency visit http://en.wikipedia.org/wiki/X_server X-Client -> Uses the display/screen provided by X-Server to display GUI/Application. It does not care how mouse or vga card works. For example you can run X application from another computer. All you need is to setup correct DISPLAY variable. Our demo setup with two computers: debian-server IP: 192.168.1.1 Suse-Linux (Laptop) IP: 192.168.1.11 Now you would like to redirect output of laptop to server. Please note that X works on almost all UNIX like operating systems like FreeBSD, HP/UX, Solaris, Linux etc. So the commands remains same for all variant of UNIX OS. 1) Login to Debian Linux server Code:
xhosts 192.168.1.11 2) Login to Suse-Laptop and run program on Debain Linux Code:
export DISPLAY=192.168.1.1:0 xeyes & Secure login over ssh i.e. forward X over ssh SSH server has built in support to run X application remotely. Traffic between suse and debian system remains encrypted. 1) Make sure XForwarding option is on Login to debian server, open /etc/ssh/sshd_config using text editor such as vi/vim: Code:
vi /etc/ssh/sshd_config Code:
X11Forwarding yes Code:
/etc/init.d/ssh restart Code:
xhosts 192.168.1.11 Code:
export DISPLAY=192.168.1.1:0 ssh -X user@192.168.1.1 oowriter ssh -X user@192.168.1.1 xeyes This is my first small tutorial; please feel to comment back or to add your own stuff to it.
__________________
Rocky Jr. What's wrong? I hope I am not making you uncomfortable... Never send a boy to do a mans job. |
| Sponsored Links | ||
|
|
|
|||
|
I've been looking for this, thanks.
I found adding something like this to ~/.bashrc very useful.. Code:
if [ "$SSH_CLIENT" != "" ]; then
export DISPLAY=`echo $DISPLAY| cut -d\ -f1| cut -d: \f4`:0
fi
..R |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Network Diagram | kasimani | Computer Networking and Internet/broadband | 4 | 19-06-2008 06:21 AM |
| How to use two ISP in same network | satishap | Getting started tutorials | 2 | 24-03-2008 09:58 PM |
| network message | anharikrishna | Networking, Firewalls and Security | 1 | 06-09-2007 03:02 PM |
| Ubuntu: Issue accessing any System applications | hightech | Linux software | 4 | 29-01-2007 09:56 AM |
| Network Monitoring | puppen | Linux software | 2 | 10-05-2006 11:01 PM |