LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 05: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 06:54 AM.
 
Old 05-27-2005, 05:51 AM   #2
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
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, 07:15 AM   #3
piggyaugu
LQ Newbie
 
Registered: May 2005
Posts: 24

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:40 AM
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 12:26 PM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 04:07 PM
Removing "shutdown" and "reboot" in logout window nearfar Red Hat 1 10-07-2003 12:33 PM
How to active "X Window" or "X Server"..?? mhd_Ahmed Linux - Newbie 1 05-21-2003 02:51 PM


All times are GMT -5. The time now is 10:00 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration