Remote X session for GDM but not at console?
I've searched the how-tos but didnt find anything that appeared to be of the same nature. Is there a way to be at runlevel 3, then when someone attempts to Xwin have the Xserver automatically launch for a GUI?
We're trying to accomplish the following We have a squid proxy server running RHEL 4 that we'd like 99% of the time to run in text only mode. On the off chance we want to administer it, my boss doesn't want to go in and switch to RL 5....but would rather simply automatically trigger the session to open and close when you Xwin to it without having the graphical console loaded all the time. Can this be done, and if so can someone point me in the right direction? Thank you. |
Seems like I just read something like about 2 weeks ago but it eludes me. One thought is a not a full X server running but something crude in design. Check LBX (Low Bandwidth X).
edit: This is what I was thinking of. http://www.xfree86.org/4.0.1/Xvfb.1.html Also something called x0rfbserver. edit: Brian |
If you are remotely administering the system, you don't need to run the X-server. Presumably your remote system has an X server, and that's all that is needed to run X applications remotely.
I think you are confused about how X works. You only need the X server where the application windows will display. For example, you have a server (at runlevel 3, multi-user text mode). From a remote system (which is running X), you can: - ssh to the server (with the -X or -Y option to forward X traffic), - start an X application, for example, system-config-users The window for system-config-users will appear on the remote system. At the local console of the server, you can perform any configuration that you want, using text-mode. No X is required for administration. If you want X locally, just log in as root and run the command "startx". This will temporarily start the X server. When you end the session, it will exit. |
I guess I am confused then. I'm fine with text based administration but he wants the GUI to run when he runs Xwin to connect to the proxy "machine". We also want the console itself to stay in runlevel 3.
Connecting, running a command, then running the xwin session was not acceptable to him. Is this even technically possible? Disclaimer: I haven't fully read Brian1's response yet URL yet. |
Just to clarify, when you are talking about 'xwin', you are referring to the Windows Xwin32 application? If so, then that is the X server, running on the Windows machine (you don't need any change on the server side). He must connect to a destination machine to run an application. The X server can't know where he wants to go. What if you have 20 servers (or 20,000) - how would the X server know what session to start?
If you want to automate connection and running some application, have your boss use a Linux machine. You can create an icon for him/her using a command like: ssh -X user@host somecommand That will connect to 'host' as 'user', and run the command 'somecommand' which will display on the local X server. If Xwin32 has that functionality, you can set up something similar then. If not, use the free Cygwin utilities to accomplish it. |
Well, heres the solution I've come up with. Reading and reading it appears that XDMCP will not work unless you ARE in runlevel 5, so I've set up key based authentication with puttygen and pageant and will send a remote login with the "init 5 " command when he launches a wrapper for xwin 32 before launching his session. Hopefully when he closes xwin I'll do the same, only init 3 when it closes.
Unless I'm just way off here and there is an easier solution out there? |
Why are you using XDMCP?
To get a login screen? That seems unnecessary, since authentication has already occurred. To get a remote desktop? There are easier ways to do that, and you don't need to run X on the server. Create a script on the server login containing: Code:
#!/bin/bash ssh -X user@host gui A window with the remote desktop will appear. Again, there is no reason to run X on the server to use X remotely. |
Okay maybe I should back up.
Our goal is to provide a GUI to a windows workstation without having the GUI always consuming resources on the server console. Our distro is RHEL 4, in the nearly default configuration (with SQUID and webmin installed are the only changes) Our current tool in the past for getting remote 'sessions' loaded was through the program Xwin32. In which way would it be easiest to provide this experience? |
You need to be more precise. If you want a GUI which displays a desktop for a remote Linux system (on any X capable platform), then #7 is the most secure, lowest resource, easiest to create implementation. An end user can do this themselves, no administrator support required.
If you want something else, please try to describe it. |
Where do I place the "gui" script? the users home directory?
|
You can place it anywhere that you normally keep locally created executables. For example, an end-user may have a ~/bin directory, or if you want to make it available system-wide, you may put it in /usr/local/bin/.
The first time you run the script, you'll be presented with a prompt to create a secondary password. It really doesn't matter much, because this is only executed after an authenticated login. The initial desktop you get will be very spartan. Close the window and you will find a ~/.vnc/xstartup file on the users's login. If you edit it you'll see: Code:
#!/bin/sh Code:
#!/bin/sh |
Okay,
Now I'm getting Code:
[root@server root]# gui |
Yes:
yum install vnc |
Code:
[root@server root]# yum install vnc I looked through the graphical "add / remove applications" and I didn't see it listed. Redhats version of that app has a long way to go to compete with YaST, imho, as far as the gui is concerned. Can I use RPM? |
If you are not using yum, you can use the default package manager on RH, up2date:
up2date -i vnc Take some time to familiarize yourself with the administration of the system. Redhat has a considerable amount of documentation online. |
All times are GMT -5. The time now is 10:28 PM. |