LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 07-10-2006, 12:41 PM   #1
jdonigan
LQ Newbie
 
Registered: Aug 2005
Posts: 8

Rep: Reputation: 0
how to draw display without logging in FC2?


How do I draw a display without logging into the graphics display of a FC2 system?

I am getting:

Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
Error: Can't open display: :0.0

I have a number of machines on a LAN that I am trying to run a number of tasks on, and I'd like to not have to log onto each machine locally before running those tasks.

Thanks!

John
 
Old 07-10-2006, 03:24 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Use ssh to login and use X tunnelling:

ssh -X you@some.other.host

If you then do

echo $DISPLAY

it should show the X server as localhost:10 (or some smallish integer)

You can then run your X clients and have the result transported (securely) to your local X server.

--- rod.
 
Old 07-17-2006, 04:13 PM   #3
jdonigan
LQ Newbie
 
Registered: Aug 2005
Posts: 8

Original Poster
Rep: Reputation: 0
Let me try again to ask the question

I didn't do a good job of asking it before.

How do I set up a FC2 system to allow me to rlogin to it and draw on that machine's DISPLAY :0.0 without anyone being locally logged in to that machine?

Thanks!

John
 
Old 07-17-2006, 07:47 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Okay, to rephrase your question, since it still isn't completely clear what you are asking...

You have a host 'A', running an X server, and you want to login from host 'B', possibly running an X server. You want to run an application on host 'A', such that it's X I/O is sent to the X server on host 'A' (and not to the X server on host 'B', as it would in the usual scenario).

If that accurately describes your problem, then:

Login using rlogin (not reccommended) or ssh to host 'A' from 'B'. Optionally verify that there actually is an X server running on host 'A' and what it's display number is (number :0 is a fairly safe bet). Set the DISPLAY environment variable (and export it, if in bash) to 'localhost:0', or '123.123.123.123:0' (substitute IP of host 'A'). Run the program that connects to the 'local' X server. If the X server on host 'A' is accepting connections from it's own IP, then output should appear on the screen, and the keyboard and mouse should be able to control the program.

Did this help?

--- rod.
 
Old 07-17-2006, 07:53 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
I just re-read the question and realize there were some bits I didn't answer.

If there is no one logged in, there may not be an X server running. If this is the case, you should be able to start one, by running 'X', possibly using something such as 'startx' to launch a window manager &/or desktop. The essential concept is, the OS doesn't care whether you are sitting in the chair in front of the computer, logged in on a VT console, or logged in from a remote connection. If you have sufficient privelage, you can still run all of the same stuff.

--- rod.
 
Old 07-18-2006, 07:47 AM   #6
jdonigan
LQ Newbie
 
Registered: Aug 2005
Posts: 8

Original Poster
Rep: Reputation: 0
Yes, thank you, that's what I want to do, but...

it's also an even "newbie-er" question than that:

How do I set up host 'A' to permit ssh logins with nobody logged into host 'A'?

For now, I MUST physically go to host 'A', log in, and 'xhost +' to allow other hosts to log in.
Since I have to do this for eight hosts on my LAN, I would prefer to just set up shell scripts to run them all from one location.

Thanks!

John
 
Old 07-18-2006, 09:26 AM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Sounds like you may be confusing the difference between ssh logins and X server connections. As long as host 'A' is up and running, it should accept ssh connections. There does not have to be an X server running for any host to accept ssh logins. Two (almost) entirely unrelated systems. I say 'almost', because there is the 'X tunnelling' connection. Similarly, someone else being logged in to host 'A' is not necessary.

I think I understand your problem, now, though. When you run xhost from the local console of host 'A', it will normally have it's $DISPLAY variable set to point at the X server on that local host. If you login to that host remotely, your $DISPLAY variable will be pointing back at the X server on 'B' (so X traffic get sent there for you to see). What you need to do is login to 'A', and change DISPLAY to point at the X server on 'A'. Then, when you run xhost, it will work it's magic on the X server on 'A'.
Code:
export DISPLAY=localhost:0
You may need to verify that the X server on 'A' is actually running, first. There are a few ways to do this, but the simplest might be with ps:
Code:
ps -e l | grep X
You should see something like
Code:
4     0  5891  2881  15   0 209128 179664 select S ?        167:07 /usr/X11R6/bin/X -br -nolisten tcp :0 vt7
If you are lucky, there will be no X server, and you can simply run X (/usr/X11R6/bin/X, on my example) without all of the 'startx' window dressing.

The output of ps shows that the server is accepting connections as display ':0'. You use that as the last part of the $DISPLAY variable value that must exist whenever you run any application that wants to find an X server to connect to. If host 'A' is at '123.23.3.1', then you could set DISPLAY to '123.23.3.1:0' before running your X client. If you are running the X client ON 'A', you should be able to set it 'localhost:0'. In the latter case, you probably won't need to run xhost, because the X server should always accept connections from localhost. If you want to run your X client(s) on remote computers, that '-nolisten tcp' will get in the way, and you will have to wade through the X startup scripts to figure out how to get rid of that, if it is there.

Confusing enough?

Hope this helps.

--- rod.
 
  


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
not getting display after logging out of KDE tataiermail Linux - Newbie 2 05-06-2006 02:27 AM
Display all User Names When Logging into Mandriva darrensnospam Mandriva 12 08-26-2005 01:18 AM
how do I enable logging in iptables for FC2? alizard Linux - Security 5 03-06-2005 05:18 AM
Questions about logging by FC2 Schmurff Fedora 1 10-05-2004 02:03 AM
Problem logging out of FC2 jwb Fedora 1 05-25-2004 11:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:17 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
Open Source Consulting | Domain Registration