I have a remote Ubuntu server without a physical screen attached, which I use via VNC. Occasionally I have to restart it and then go through the hassle of going to its physical location connecting to it a keyboard (and screen), in order to login.

Is there any way to get the built-in VNC server in Ubuntu to allow connection before login?

Thanks

link|improve this question

49% accept rate
feedback

4 Answers

Install vnc4server and xinetd. You can configure multiple ports with different resolution s in xinted. My configuration for 1024c768 in /etc/xinentd.d/xvnc-2 is:

service Xvnc-2
{
        bind = 192.0.2.6
        port = 5902
        disable = no
        socket_type = stream
        log_type = syslog daemon
        log_on_success = PID HOST EXIT DURATION
        log_on_failure = HOST ATTEMPT
        protocol = tcp
        wait = no
        user = nobody
        server = /usr/bin/Xvnc
        server_args = -inetd -geometry 1024x768 -depth 16 -query localhost -once -SecurityTypes none -extension XFIXES -desktop VNC-1024x768
}

And configure gdm to allow xdmcp login with /etc/gdm/custom

#
# For full reference documentation see the gnome help browser under
# GNOME|System category.  You can also find the docs in HTML form on
# http://www.gnome.org/projects/gdm/
#
# NOTE: Lines that begin with "#" are considered comments.

[daemon]
RemoteGreeter=/usr/lib/gdm/gdmlogin
TimedLoginEnable=false
AutomaticLoginEnable=false
TimedLogin=
AutomaticLogin=
TimedLoginDelay=30
KillInitClients=false
HaltCommand=
RebootCommand=
SuspendCommand=

[security]
AllowRoot=false
AllowRemoteRoot=false
PasswordRequired=true
RetryDelay=2

[xdmcp]
DisplaysPerHost=10
Enable=true
HonorIndirect=false

[gui]

[greeter]
ShowXtermFailsafeSession=true
SystemMenu=false

[chooser]
Broadcast=false
Multicast=false

[debug]
Enable=true

[servers]

link|improve this answer
feedback

Simple but unsecure solution;
just let server start without password.

link|improve this answer
feedback

No. Either configure Xvnc as a separate X server instead, or enable the vnc Xorg module.

link|improve this answer
feedback

If it's a headless server, have you considered an auto-login?

As long as you choose to start the VNC server at the beginning of runlevel 5 instead of as a user script, you should have no trouble accessing the GDM or KDM login screen via VNC.

Alternatively, XDMCP is a protocol for logging into a linux machine remotely.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.