-   Linux - General (
-   -   Xhost/xauth: Can I get access to the graphics console without anyone being logged in? (

Merlin53 08-12-2004 12:49 PM

Xhost/xauth: Can I get access to the graphics console without anyone being logged in?
Dual P4 2.8GHz / RH9 (smp)

I have a couple systems that are used just to display information in a graphics format on the console screens when a program is running on the master system.
The graphics program resides/executes on the slave systems and each is started by an ethernet interface from the master into a daemon running on each slave.
I can log into each slave system and do the xhost + to open access to the console, but I would like to be able to make the slaves "turn-key" so I can just boot them up and fire off the master program to get everything started.
Can I get access to the console screen from a daemon, when nobody is logged into the system at all???
...If so, how??


stickman 08-12-2004 12:53 PM

Something like Xvfb or VNC might be of use to you.

Merlin53 08-12-2004 05:47 PM

Thanks Stickman, but I want the graphics to run on the console screen, it has a high-end graphics head going to a Hi-def display. Graphics speed is an issue. I'm not familiar with Xvfb or VNC, but from what I've read, they seem to be for systems without a graphics head? Correct me if I'm wrong??
I'm just trying to avoid having to login to 16 systems if I can just sit at one and spawn everything from there. I don't like leaving all those systems sitting open if the app is stopped or goes down.
So, can I get access to the display when there is no one logged in at all?? Just the login screen showing on the display.

wsanders 08-12-2004 06:10 PM

You cannot access the display without being logged in
You cannot access the display without being logged in. However, you can set up a daemon and communicate with it from another machine. How to do this is beyond the scope of this message but for a newbie I suggest "Unix Network Programming" by Richard Stevens et al and other following volumes.

Q&D: You could also log in to the machine and use xhost, then connect to the remote display, it's not that hard. Obviously you don'thave to by physically present at the machine to do this, you can script a "passwordless" remote connection via ssh and do everything from a central location.

stickman 08-13-2004 07:58 AM

Do you actually need to see the graphics or do you just need a frame buffer to do the rendering? Does your app use X at all?

Merlin53 08-13-2004 09:54 AM

Yes, I do need to see the graphics displayed on the console
screen. All systems are rack mounted and their displays are
used to drive out-the-window cockpit displays for simulators.
The daemons are already working to start all needed processes
on each local system from the master start process. What I'm
trying to find out is "Can I start a graphics process on the local
systems from a daemon and get access to the console without
having to physically log into each and every system?" In other
words, can a local process startup from some network event
and use the console screen with no human intervention? That
means no rlogin/ssh... etc. I want to just boot up the systems
and have them sitting there ready to run. Is this possible???


LinuxDave 01-06-2005 10:12 PM

I don't believe it is possible to have a daemon output to the local console when no one is logged in.

In order to do this, you would need to write/modify the getty/xdm/gdm/kdm programs. (These are the login managers)

Why can't you have the daemons write the information to a log file? Or why can't you have them display the information at the console that you are logged in and sitting at , using X forwarding?


mijenks 01-06-2005 10:20 PM

While I have no idea as to the answer to the original post, I don't think what LinuxDave said was entirely true. If you set messages to log to console, then they log there no matter what. This occurs on my OpenBSD router, where all system messages (e.g. from syslogd) are logged to the console, and I can view them even without being logged in. I have no idea how to implement what the parent is suggesting, however, though I believe it is entirely possible to do.

jschiwal 01-07-2005 12:34 AM

What kind of program runs on the slave displays. It it a x-windows program, or does the master program simply send the information to display to the "Slave" x servers.

it has a high-end graphics head going to a Hi-def display
If the XF86config sets up the display as independent and not a clone or extension, then I believe that it will be displayed as long as init level 5 is used.

The easiest way may be to use auto-logon on the display computer, and have the x windows programs needed to run in the ~./xinitrc or ~/.xsession file of the default user.

If you need daemons to run in the background first, you could place init scripts in /etc/init.d and links to them in /etc/rc.5.

You might also read through linux kiosks how tos for further ideas.

Merlin53 01-07-2005 09:44 AM

Thanks for the feedback everyone!! What I'm trying to do is have one "user" console to control several aircraft simulators that have graphics Out-The-Window displays. There is no keyboard/mouse located in the simulators. Access is through a KVM switch. Currently I have to log into each system and start each application by hand. If I could use either a daemon or scripts to start and stop the applications, it would be a real time saver. I would like the systems to be logged-out when not in use.
Currently I do not know how to get an application to run remotely on another system and use it's own console as the "Display" without someone being logged into the console. That is the basis of my question, how to get an application to run on a remote system and project it's graphics on it's own graphics display without anyone being logged in.


LinuxDave 01-07-2005 01:32 PM

I'm not sure how you could start an application on a remote computer and have its output displayed on its own console when no one is logged in locally to the remote machine.

On the other hand, it is easy to setup a script that would log into remote machines and start an application and display the output on the local machine. (As long as the graphical application is an X-application).

All you'll need is an ssh server on all the remote machines running with X forwarding turned on. Then your script on the local machine would contain something like: ssh -X user@remote name_of_simulator_app


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