LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-19-2006, 08:40 PM   #1
depam
Member
 
Registered: Sep 2005
Posts: 856

Rep: Reputation: 30
Access X remotely


Hi! I do have RH9 and Fedora running. Now my question is that how can i access the x server of rh9 remotely. I run fedora on init 3 (which is the multi-user mode). I ssh RH9 and did the following commands:

export DISPLAY=192.168.0.221:0 (192.168.0.221 is my fedora's IP)
xhost +

and then I did xinit in fedora but each time i type in startx the display only appears on rh9's unit and not on my fedora. What did I do wrong?
 
Old 03-19-2006, 11:32 PM   #2
marcheikens
Member
 
Registered: Aug 2003
Location: Cleveland, OH
Distribution: Ubuntu 6.06
Posts: 66

Rep: Reputation: 15
What kind of access are you looking for? If you're just trying to run a windowed app on the server and have the window show up on the remote client, just use X-forwarding.

NOTE: username@REMOTE indicates the machine you're trying to use to connect to your SERVER, denoted by username@HOST. May have been able to figure out better names but I'm tired

Code:
username@REMOTE$ ssh -l username host.address -X
Then run the program you want from the terminal that's logged into the host:

Code:
username@HOST: $ firefox-bin
That will run firefox on the SERVER but display the window on the machine you are logging in from.

If you're looking to access the entire desktop and the windows that are open on your screen at home, I'd try using x11vnc (I don't use RedHat any more, but you might be able to apt-get it if you've got that set up). Then you'd just have to do the following:

Code:
username@REMOTE: $ ssh -l username host.address -L 5900:localhost:5900
username@HOST:$ x11vncviewer -display :0
Then on the remote client, run a VNC viewer (xvncviewer, or one at http://www.realvnc.com or Chicken of the VNC for Mac OS X), and connect to 127.0.0.1:0.

Now if you're willing to have a new instance of your desktop (can't interact with windows that are already existing on your "usual" desktop but this can be nice because you can use blackbox or some other lighter window manager), instead of tunneling port 5900, tunnel port 5901:

Code:
username@REMOTE: $ssh -l username host.address -L 5901:localhost:5901
username@HOST:$ vncserver -geometry heightxwidth :1
Then use one of those fancy VNC viewers and connect to localhost:1. You'll have to dig for informationon configuring VNC to use different window managers. I set it up the way I like it, and I've since forgotten precisely how I've configured it. I'd make sure that you do this through ssh, simply because then passwords and such aren't sent in the clear if you use it to do any work on your machine.

That's what I do anyway. Took me a couple weeks to get all of it working the way I wanted it to, but now I have a fairly good understanding of VNC. Hope I was clear enough. Keep in mind NONE of these is a wonderful solution--either colors are a bit messed up or the responsiveness is lacking, but it's always better than nothing.

marc

And I just stumbled on this thread while trying to figure out why I can't log into my machine via ssh with a new username I created!
 
Old 03-20-2006, 12:04 AM   #3
depam
Member
 
Registered: Sep 2005
Posts: 856

Original Poster
Rep: Reputation: 30
There is a way to access remote X without using VNC. Where in you can export the display to a specific IP. I know VNC but can it be done without this service?
 
Old 03-20-2006, 01:46 AM   #4
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Quote:
Originally Posted by depam
There is a way to access remote X without using VNC. Where in you can export the display to a specific IP. I know VNC but can it be done without this service?
Did you read about SSH's X forwarding above? That is a much better way to do the same thing.
 
Old 03-29-2006, 10:48 PM   #5
jkilla11
LQ Newbie
 
Registered: Mar 2006
Posts: 4

Rep: Reputation: 0
hi ya, i'm a noobie but i tryed what someone said on # 2 and it did not work here is the output info

justin@Pegasus:~$ ssh -l jb82 192.168.1.111 -X
jb82@192.168.1.111's password:
Last login: Sun Jan 10 04:27:21 1999 from 192.168.1.100
Linux 2.4.26.

May all your PUSHes be POPped.

jb82@jb82:~$ kopete
kopete: ERROR: KUniqueApplication: Can't determine DISPLAY. Aborting.
jb82@jb82:~$
 
Old 03-29-2006, 10:54 PM   #6
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Quote:
Originally Posted by jkilla11
hi ya, i'm a noobie but i tryed what someone said on # 2 and it did not work here is the output info

justin@Pegasus:~$ ssh -l jb82 192.168.1.111 -X
jb82@192.168.1.111's password:
Last login: Sun Jan 10 04:27:21 1999 from 192.168.1.100
Linux 2.4.26.

May all your PUSHes be POPped.

jb82@jb82:~$ kopete
kopete: ERROR: KUniqueApplication: Can't determine DISPLAY. Aborting.
jb82@jb82:~$
First, try "-Y" instead of "-X".
Code:
ssh -Y jb82@192.168.1.111
Also, if you have root on the computer you are connecting to, check /etc/ssh/sshd_config on it and make sure "X11Forwarding" is set to "yes".
 
Old 03-30-2006, 01:59 AM   #7
marcheikens
Member
 
Registered: Aug 2003
Location: Cleveland, OH
Distribution: Ubuntu 6.06
Posts: 66

Rep: Reputation: 15
Shouldn't that be:

Code:
ssh -Y -l jb82 192.168.1.111
?

Do you have another instance of the program already running on your computer? Some times when I have evolution running on a VNC display and forget to shut it off, and then try to start it on the standard display, it ends up just opening a new window on the VNC desktop, not on the desktop I want. I think--not exactly sure, but I think--that I've received display errors when trying to run another instance of some programs already running. Just a thought.

marc
 
Old 03-30-2006, 03:19 AM   #8
jkilla11
LQ Newbie
 
Registered: Mar 2006
Posts: 4

Rep: Reputation: 0
hi again all,
i did exactley what you said to do i uncomments out the fordwarding thing and changed it to yes, then i tryed to login with the -Y frist dident work and then tryed the -X one dident work something about cant figure out the display do i need to setup a pusdo monitor?


jb82@jb82:~$ kopete
kopete: ERROR: KUniqueApplication: Can't determine DISPLAY. Aborting.
jb82@jb82:~$ xmms

** CRITICAL **: Unable to open display
 
Old 03-30-2006, 05:11 AM   #9
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Oh yeah, did you restart the SSH daemon after you changed the config?
 
Old 03-30-2006, 12:27 PM   #10
jkilla11
LQ Newbie
 
Registered: Mar 2006
Posts: 4

Rep: Reputation: 0
i restarted the whole system, i am not to good at restarting services ix stop sshd start sshd


NOTE- sorry fellas forgot to mention it still dosent work haveing something about screen errors...dont understand why.

Last edited by jkilla11; 03-31-2006 at 12:19 AM.
 
Old 03-30-2006, 12:50 PM   #11
marcheikens
Member
 
Registered: Aug 2003
Location: Cleveland, OH
Distribution: Ubuntu 6.06
Posts: 66

Rep: Reputation: 15
spooon--I've never used -Y on the ssh command line. What's the difference between X forwarding and "trusted" X forwarding? I can't find much of a discussion about it anywhere...

marc
 
Old 03-30-2006, 04:15 PM   #12
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Quote:
Originally Posted by marcheikens
spooon--I've never used -Y on the ssh command line. What's the difference between X forwarding and "trusted" X forwarding? I can't find much of a discussion about it anywhere...

marc
http://www.openssh.org/faq.html#3.13
 
  


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
Can't access Apache remotely zwyrbla Linux - Software 7 03-23-2005 08:14 PM
How do I access Gnome remotely? rwalkerphl Linux - Newbie 10 06-23-2004 03:56 PM
can't access remotely to any service kunteper Linux - Networking 3 12-26-2003 09:02 AM
stoppin X access remotely dai Slackware 21 07-03-2003 01:16 PM
How To: Remotely access my nix box? nariman Linux - Newbie 5 05-18-2003 08:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:25 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