LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-27-2005, 04:01 AM   #1
piggyaugu
LQ Newbie
 
Registered: May 2005
Posts: 24

Rep: Reputation: 15
Is it possible to "push" a window in X to another machine?????


In fact, that what i saw in the series <24> of fox TV. It seems that they work on stations with a mainframe.

for us pc user, Is it possible to "push" (i mean the sender decides the process) a program or even a window in X to another machine? through SSH or sth?

Last edited by piggyaugu; 05-27-2005 at 05:54 AM.
 
Old 05-27-2005, 04:51 AM   #2
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
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 9.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 9.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 9.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 9.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)
 
Old 05-27-2005, 06:15 AM   #3
piggyaugu
LQ Newbie
 
Registered: May 2005
Posts: 24

Original Poster
Rep: Reputation: 15
thx, i'll try
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is "sticky bit mode" , "SUID" , "SGID" augustus123 Linux - General 10 08-03-2012 04:40 AM
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 11:26 AM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
Removing "shutdown" and "reboot" in logout window nearfar Red Hat 1 10-07-2003 11:33 AM
How to active "X Window" or "X Server"..?? mhd_Ahmed Linux - Newbie 1 05-21-2003 01:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration