Yes, you can define an independent session that gives you a login prompt at connection.
First, edit /etc/gdm/custom.conf and add ‘Enable=true’ to the ‘[xdmcp]’ section:
Code:
[xdmcp]
Enable=true
Edit /etc/services and add an entry for the second VNC session:
Code:
vnc2 5901/tcp # VNC & GDM
Create an xinetd service (install xinetd if you don't already have it) by creating /etc/xinetd.d/vnc2 with the following contents:
Code:
service vnc2
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query 127.0.0.1 -geometry 980x600 -depth 24 -once -securitytypes=none :1
}
Set the parameters, like the geometry, to your desired screen size. This is handy if you are connecting via a mobile device, so you don't have to scroll the screen.
Open the firewall to port 5901 for the service if you have the firewall active (use your subnet, obviously):
Code:
-A INPUT -s 123.45.67.0/24 -p tcp -m tcp --dport 5901 --syn -j ACCEPT
Restart your system.
You should now be able to connect via a VNC client to port 5901 on your desktop and get a login prompt. This is completely independent from your desktop session. If you have remote desktop functionality enabled in the preferences, that should still function on port 5900 (the default).