VNC to graphical login if server in runlevel 3

OpenSuse 10.3 using included vnc server.

If the computer is configured to go straight to graphical logon (/etc/inittab contains id:5:initdefault: - and no auto-logon) I can also connect with RealVNC viewer and, after a few seconds, get the graphical logon in the remote session.

If, however, inittab is changed to start the computer at the text logon (runlevel 3) then the VNC session only gets the grey background with the default large X mouse cursor; the graphical logon doesn’t show.

Is there any way to not have the machine start all the way into X but still use the graphical logon in remote connections?

Thanks in advance

I’m not sure I can fully answer your question, but let me tell you what I can do with my mother’s PC in a different continent. I maintain her PC in North America, from here in Europe.

When her PC is in run level 5 (running kde) I can command it to reboot to run level 3. When it is in run level 3, I can still access it over the internet, using ssh. From ssh (in run level 3), I can instruct her PC to start X. Or I can shut her PC down.

Alternatively, I can run nx server on her PC, which does not care if her PC is in run level 3 or in run level 5. When running an nx client from my PC here in Europe, I can start a kde session that runs on her PC, but pipes the KDE desktop graphics to my PC here in Europe. When she looks at her PC, the desktop she observes is still in run level 3, even though I have a parallel desktop session running on her PC in run level 5.

Or with nx server, she can be running run level 5, and when I run an nx client from here in Europe (accessing her PC in North America), I see the graphics of a parallel KDE desktop with the graphics being piped from a run level 5 session on her PC to my PC in Europe.

Does that answer your questions?

EDIT: Welcome to our forums and thank you for participating.

jaredcooper wrote:
> OpenSuse 10.3 using included vnc server.
>
> If the computer is configured to go straight to graphical logon
> (/etc/inittab contains -id:5:initdefault:- - and no auto-logon) I can
> also connect with RealVNC viewer and, after a few seconds, get the
> graphical logon in the remote session.
>
> If, however, inittab is changed to start the computer at the text logon
> (runlevel 3) then the VNC session only gets the grey background with the
> default large X mouse cursor; the graphical logon doesn’t show.
>
> Is there any way to not have the machine start all the way into X but
> still use the graphical logon in remote connections?

Somewhat contradictory statement… why? The X server is a server
over a display device. So “start all the way into X” implies an
X server managing the local display (usually), which is what
you get in runlevel 5 (by default).

Personally, I think a better solution is to setup FreeNX and
use an NX client to get to your host. I really think it’s the
better solution. You might want to look into that.

Alternatively, you could run a local X server on your display
(not the machine you are accessing) and redirect the clients
to your X server managed display (via DISPLAY or ssh -X).
But that’s just for clients… though you can run a whole
desktop that way (e.g. KDE, Gnome), it’s just usually not
done because you get better peformance with something like
VNC, or better still, NX.

oldcpu: Thanks - I’ll take a look at nx, never come across this before but sounds worth a look.

cjcox: Thanks - I may be mixing up terminology here - I’m from a Windows background, playing with Linux for about 10 years off and on but never getting into the detail too much.

Basically, when I say ‘start all the way into X’ I mean: Start the PC, watch it on a physical monitor (plugged into the vga port) and, after the text-base boot-up routine, you’ll eventually see the graphical logon (on a local x server). This is what I get with the id:5 bit in inittab (i.e. default runlevel=5).

However, if inittab is edited so that the end of the boot-up routine leaves you at a text logon (runlevel=3), I can still get a vnc connection from another machine, but in this case the vnc session does not get the graphical logon, just the plain grey background and default X mouse cursor.

I could use any method of remote control, but I want to keep it as simple as possible, since it’ll be not-so-technically-mided engineers that will be configuring these PCs (and here I am struggling) and the closer I can get to something they are familiar with (MS terminal sevices) the better. Therefore, ideally, I want the PC (which will be installed without a KVM) to boot up to the command prompt (if only to save system resources instead of a full X session) but allow the engineer to connect with VNC from a laptop and get the graphical logon.

Again: I’ll take a look at NX as I’ve never heard of this before, but any way to get working what I want withour additional software is prefered.

I use it fairly often. Web site here: NoMachine NX - Desktop Virtualization and Remote Access Management Software

jaredcooper wrote:

>
> Basically, when I say ‘start all the way into X’ I mean: Start the PC,
> watch it on a physical monitor (plugged into the vga port) and, after
> the text-base boot-up routine, you’ll eventually see the graphical
> logon (on a local x server). This is what I get with the id:5 bit in
> inittab (i.e. default runlevel=5).

I understood… just correcting a bit so others might better
understand.

>
> However, if inittab is edited so that the end of the boot-up routine
> leaves you at a text logon (runlevel=3), I can still get a vnc
> connection from another machine, but in this case the vnc session does
> not get the graphical logon, just the plain grey background and default
> X mouse cursor.

You can startup a desktop on that though. But you don’t have
a “common” desktop in that case, it’s a whole different desktop
session by default. When enabling VNC access via KDE (for example)
you get that shared desktop effect (which is what you are doing
kind of now). So… you CAN have your VNC start a KDE session,
it just will be a new session every time (without doing something
more radical).

With NX it’s easy to suspend a session and come back to it.

In all fairness I hit my main desktop at work (openSUSE 10.2) via VNC
over our VPN… but when I want to get a graphical desktop on other
hosts at the office I use NX. At some point I may reconfigure
my desktop to use NX.

Just fyi, remote access technologies (lightweight/secure) access
is one of the things that my team is researching. We like NX today.

>
> I could use any method of remote control, but I want to keep it as
> simple as possible, since it’ll be not-so-technically-mided engineers
> that will be configuring these PCs (and here I am struggling) and the
> closer I can get to something they are familiar with (MS terminal
> sevices) the better. Therefore, ideally, I want the PC (which will be
> installed without a KVM) to boot up to the command prompt (if only to
> save system resources instead of a full X session) but allow the
> engineer to connect with VNC from a laptop and get the graphical
> logon.
>
> Again: I’ll take a look at NX as I’ve never heard of this before, but
> any way to get working what I want withour additional software is
> prefered.

I think you’ll like NX.

Oh… a recommendation for out-of-band (non regular network) access
to the console head… I set the box up for serial port access
(like the old days of Unix) and use Avocent/Cyclade boxes to
portray those serial heads across a different network/modem/etc.

Why? True out of band… so I can mess with the network
definition of the device (also nice for interacting with
the machine’s BIOS, etc).

Alternatively, if you just HAVE to have something KVM-ish,
most brand name servers (e.g. Dell DRAC, HP ILO) have
some kind of console over IP solution available.

I like serial though… small cables… long runs…

Each VNC connection I’m getting is a new sessn (not shared with console). The only configuration I did for the VNC server was to turn it on in Yast.

To be honest, I’m not all that bothered at having to have the machine start to text / graphical logon, I just figured it would be better on system resources (we’re currently running Windows XP on the same hardware and this give you no choice in this regard).

I’ve been looking at the NX web site and it does look promising.

Thank-you both for your assistance.

this is something specific to your setup being “incorrect” (only “incorrect” if you want to use the existing session).

In my case, I never turned anything ON in YAST. Instead I simply went to a konsole, and typed the necessary commands to connect from Europe to my mother’s PC in North America with ssh/vnc. I use vnc for training my mother in openSUSE, and by in essence taking over her desktop (in run level 5) [while talking to her on the phone in parallel] she see’s everything I do on her desktop. We also have web cams running, so we can see each other while the training is going on.

IMHO you will like nx. I used all default settings. I don’t recall changing a thing for nx (other than standard setup stuff like password and such).

I’ve used VNC on Windows plenty of times, and that’s always just remote control of the existing console session. I was quite suprised to find that the default setup of VNC on Linux (at least this OpenSuse 10.3 install) worked more like MS Terminal Server (on Win2K/2003 server - new session per connection), but I prefer it this way.

I’ll definately give NX a try, though.

Thanks again for your help.