LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-21-2003, 05:56 AM   #1
gbg
Member
 
Registered: Aug 2003
Location: Lisbon Portugal
Distribution: Red Hat 9
Posts: 55

Rep: Reputation: 15
Question Starting X from a remote console


Hello!

How do I start X from a remote console? I have my WorkStation running RH9 at home, and from work I need to start de X window manager (not to the work) Just starting the X as I were from home.

Thank you.
 
Old 11-21-2003, 08:07 AM   #2
shakeeb
Member
 
Registered: Oct 2003
Location: ind..
Distribution: Fedora Core 1,RH9
Posts: 52

Rep: Reputation: 15
i too work on a remote server using ssh ...................i just "startkde" in the terminal.........it opens up.......................have i answered ur question??????:~
 
Old 11-21-2003, 09:33 AM   #3
wapcaplet
Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
The short answer is that the remote X client needs to know what X server (your computer) to display its output on. If you use ssh (secure shell) to login, it should automatically set all that stuff up for you, and all you'll need to do is 'startx' to make it happen.

For details, though, check out the Remote X Mini-Howto.

Edit: Let me get this clear, though: you want to sit at your computer at work, and run an X session on your home computer, having its display sent to your computer at work? If your computer at work is running X, then it's easy; if it has Windows, then it's a little bit trickier; you'll need to get CygWin or another X server for Windows. Of course you'll also need to configure your home computer for remote login, by running sshd (secure shell daemon) and making sure it's accessible to the outside world.

Last edited by wapcaplet; 11-21-2003 at 09:36 AM.
 
Old 11-21-2003, 09:53 AM   #4
gbg
Member
 
Registered: Aug 2003
Location: Lisbon Portugal
Distribution: Red Hat 9
Posts: 55

Original Poster
Rep: Reputation: 15
Hello! Thank you for your answer, but what I need is not so difficult than run my X server at work (that I have already discovered).

Imagine (ok, it is running) that I have logged in my machine before i leave my house and started X. For some reason (big uptime because of Xscreensaver) I remotelly shutdowned the X server. The terminal is still running (tty1 at home). What I need is to start the X at this terminal (tty1)

Thank you again.
 
Old 11-21-2003, 01:32 PM   #5
wapcaplet
Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Ah, I see what you're asking. Hmm. Would it work to run '/sbin/init 5'? That should get your machine into GUI mode. I'm not sure how you'd verify that it worked afterwards, though; maybe run 'ps' to see if X is running.
 
Old 12-01-2003, 11:15 PM   #6
Rico16135
Member
 
Registered: Aug 2003
Location: Texas, USA
Distribution: Slackware 9.1, SuSE 9.1
Posts: 245

Rep: Reputation: 30
ok my prob is the opposite... when i hit startx, it starts starts the x server on the remote computer.

I looked at the webpage you posted, but the how-to didn't solve my problem. It said that since i'm using ssh, on the server side edit the config file adding a line for:
Forwardx11=yes

i did that, with no success.

ssh -x rico@192.168.1.55 doesn't start x on my screen here. anyone know how I can do this? if so please help, thanx

Last edited by Rico16135; 12-01-2003 at 11:19 PM.
 
Old 12-02-2003, 03:04 PM   #7
wapcaplet
Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Rico, I think the '-X' argument to ssh just tells it to be ready in case you want to run X programs; it doesn't actually run X. I don't think there's any need to actually use 'startx', since your local computer presumably already has an X server running. Did you try running an X application after logging in? Something basic like xeyes or xclock, just to see if it works.
 
Old 12-02-2003, 03:34 PM   #8
Rico16135
Member
 
Registered: Aug 2003
Location: Texas, USA
Distribution: Slackware 9.1, SuSE 9.1
Posts: 245

Rep: Reputation: 30
when i tried just running an x program (xeyes), it returns an error message as follows:

Error: Can't open display:

Thanks for the help, got anymore ideas tho?
 
Old 12-02-2003, 03:38 PM   #9
Rico16135
Member
 
Registered: Aug 2003
Location: Texas, USA
Distribution: Slackware 9.1, SuSE 9.1
Posts: 245

Rep: Reputation: 30
same result with any other x program. same result if i'm root, so its not a permission problem. I don't know what it is
 
Old 12-02-2003, 03:42 PM   #10
Gattancha
LQ Newbie
 
Registered: Jul 2003
Location: UK
Distribution: Centos 6.3
Posts: 11

Rep: Reputation: 0
I use KDE on the Linux box i wanna connect to and have to use a command called xhost to allow clients to connect

eg "xhost + 192.168.0.4" *without the quotes* will allow the machine with that IP to connect

Setting up the client will depend a lot on what software you use, i use one call eXceed..

Gatt
 
Old 12-02-2003, 03:50 PM   #11
Rico16135
Member
 
Registered: Aug 2003
Location: Texas, USA
Distribution: Slackware 9.1, SuSE 9.1
Posts: 245

Rep: Reputation: 30
well i'll give it a try but the reason i wanted to use ssh was because of its security features. Exactly how secure, if you know, is this method you're proposing?
 
Old 12-02-2003, 10:16 PM   #12
taarnak
LQ Newbie
 
Registered: Feb 2003
Distribution: Redhat, Solaris, Suse, Debian
Posts: 16

Rep: Reputation: 0
You may also need to export your display back to your remote machine:

setenv DISPLAY <work computer IP address>:0.0 *without the <>*

That's in csh so adjust the display back according to your shell of preference.
 
Old 12-03-2003, 01:57 AM   #13
Rico16135
Member
 
Registered: Aug 2003
Location: Texas, USA
Distribution: Slackware 9.1, SuSE 9.1
Posts: 245

Rep: Reputation: 30
setenv is not a command on my system. In any event, if it is possible I'd like to just use ssh to connect due to its awesome securtiy. And for learning purposes.

If what I'm trying to do is not possible please just let me know, so I'll stop trying but if it is, any words to help me out would be greatly appreciated.

The server is on my local network and I can already connect via ssh. I edited the ssh config file on the server side to allow Forwardx11=yes

Upon completion of that, I cannont run an x program on my server from my client with the graphical output on my client screen. The error says I "cannont open display".

You guys have been wonderful and I thank you so much for the help and attention you've already given me. I think I'm just missing some really easy step, that for the life of me I can't see. Assuming of course this is possible.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting an application on X by console tiagomadeira Programming 1 01-09-2005 07:20 AM
Starting Modem from console psdan Linux - Newbie 5 08-21-2004 07:08 AM
Remote Console Snowie Linux - Networking 1 03-12-2004 05:59 AM
Remote console ballus Linux - Newbie 5 08-11-2003 01:07 PM
Remote X console bankrupt Linux - General 4 08-13-2001 08:12 PM


All times are GMT -5. The time now is 06:14 AM.

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