LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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-25-2006, 01:24 PM   #1
binary_0011
Member
 
Registered: Apr 2006
Location: Singapore
Distribution: RHEL4,FC4,FC5
Posts: 89

Rep: Reputation: 15
remote X sessions


to locally display an X client application from a remote host, how do i do that?

Thanks.
 
Old 05-25-2006, 01:29 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
What OS is on the machine you're working from? If it's linux, you should be able to login with ssh and tunnel x over ssh. If the OS is Windows, you'll need to setup a VNC server on the linux box and then install TightVNC on windows.
 
Old 05-25-2006, 02:04 PM   #3
jeelliso
Member
 
Registered: Oct 2005
Location: Knoxville, Tn (USA)
Distribution: OpenSUSE, Ubuntu
Posts: 250

Rep: Reputation: 30
If you're doing a Linux->Linux connection, I would recommend using PuTTY. All you have to do is enable X11 forwarding in your PuTTY settings and then you can run GUI commands just like normal.

In addition to what pljvaldez recommended for a Linux->Windows connection, you could install Cygwin and still use ssh.

~Justin
 
Old 05-25-2006, 08:28 PM   #4
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
The way I would accomplish that is to change the sshd config on the host being connected to, and allow x-forwarding, which (wisely) is turned off by default. Then when you are ssh'd into the server, just issue a command like konqueror, or firefox (no ampersand at the end), and it will appear on your local machine, but will be running off the remote one. This will allow you to connect to things on local IP networks to the remote server.

To ssh in with X forwarding, you need to issue the command on you local machine
Code:
ssh -X my.server.org
Doing this is of questionable value, as servers should not have GUI wasting their resources. Even though the X system doesn't run on the server the way it does on a desktop, you still eat system resources to simulate it. Furthermore, learing your way around a system through the command line interface (CLI) not only puts the proverbial hair on your chest, but gives you portable skills that aren't dependent on junk like the window dressing (ie someone saying, "I can do this in Gnome, but not in KDE"). When you can accomplish things from the command line, you can accomplish them anywhere, reagardless of the window dressing over the top.

Peace,
JimBass

Last edited by JimBass; 05-25-2006 at 08:31 PM.
 
Old 05-26-2006, 01:15 AM   #5
binary_0011
Member
 
Registered: Apr 2006
Location: Singapore
Distribution: RHEL4,FC4,FC5
Posts: 89

Original Poster
Rep: Reputation: 15
does not work, here's my output :

Red Hat Enterprise Linux ES release 4 (Nahant Update 2)
Kernel 2.6.9-22.EL on an i686
login: andrew
Password:
Your default context is user_u:system_r:unconfined_t.

Do you want to choose a different one? [n]n
Last login: Fri May 26 14:14:13 from 202.108.124.189
[andrew@rhel4 ~]$ ssh -X 202.108.124.189
andrew@203.208.224.189's password:
Last login: Fri May 26 14:14:56 2006 from ccoc03.something.com
[andrew@rhel4 ~]$ xclock
Error: Can't open display:
[andrew@rhel4 ~]$




btw, i dont really understan this option :

xinit --:1
xinit --:0

how do i know when do i use wat number? how do i know wat number is the X server currently running?

Thanks.

Last edited by binary_0011; 05-28-2006 at 10:57 PM.
 
Old 05-26-2006, 04:43 AM   #6
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 48
Quote:
Originally Posted by binary_0011
does not work, here's my output :

Red Hat Enterprise Linux ES release 4 (Nahant Update 2)
Kernel 2.6.9-22.EL on an i686
login: andrew
Password:
Your default context is user_u:system_r:unconfined_t.

Do you want to choose a different one? [n]n
Last login: Fri May 26 14:14:13 from 202.108.124.189
[andrew@rhel4 ~]$ ssh -X 203.208.224.189
andrew@203.208.224.189's password:
Last login: Fri May 26 14:14:56 2006 from ccopnc08.singtel-expan.com
[andrew@rhel4 ~]$ xclock
Error: Can't open display:
[andrew@rhel4 ~]$




btw, i dont really understan this option :

xinit --:1
xinit --:0

how do i know when do i use wat number? how do i know wat number is the X server currently running?

Thanks.
some things:
* first, are you running X?
* make sure "X11Forwarding yes" is set in the /etc/ssh/sshd_config on the server
* try "-Y" instead of "-X"
 
  


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
sharing remote X sessions? Thinking Linux - Networking 2 11-27-2005 12:27 PM
Window manager preferences for remote vnc sessions? dkw Linux - Newbie 1 12-25-2004 08:47 PM
Remote sessions narkelo Linux - Software 2 04-03-2004 10:33 PM
Remote X sessions problem Claus Linux - Networking 0 10-22-2003 07:17 PM
Port forwarding and remote X11 sessions lfabiani Linux - Networking 6 04-01-2002 06:11 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration