Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VNC and the GNOME after a remote reboot 3

Status
Not open for further replies.

bazil2

Technical User
Feb 15, 2010
148
0
0
DE
(Elementary user)

I often administer the server using VNC; the server is locally logged in as root and the GNOME is started.

If however I reboot the server remotely, I can't log in again via VNC as the server is not logged in locally (connection refused).

Is the logical solution to change the following: 'Login Window Preferences' -> Security -> Enable Automatic Login -> User 'root'

Does anyone know of an alternative of not having automatic log in and still being able to login via VNC?

Best regards
 
You can start a separate VNC server process at boot time, for example in the /etc/rc.d/rc.local script:

Code:
/usr/bin/vncserver

This would start a separate X-windows session, i.e. it's not like giving you VNC access to root's GNOME session that is running on the console.

Try this manually at first; you may need to set a VNC password and customise the VNC startup script (~/.vnc/xstartup to make it start GNOME rather than twm or some other basic window manager.

It would help if you mentioned the exact Linux distribution you are using as file locations may vary.

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
why not simply ssh into the server for admin tasks & if you need to run a graphical application use X tunnelling?
it is a more secure option than a VNC connection

A Maintenance contract is essential, not a Luxury.
Do things on the cheap & it will cost you dear
 
I second that suggestion, although I can see an argument for VNC over X tunneling if you are operating over a WAN, the latter being extremely slow.

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
Try this if you used gdm and ubuntu:

I used x11vnc and set it to start after gdm ...I'm on ubuntu 11

edit /etc/gdm/Init/Default and add to bottom before exit

# Start the x11vnc Server
/usr/bin/x11vnc -bg -reopen -forever -skip_lockkeys -auth guess
 
Thank you so much everyone for all your kind help and suggestions.

I also posed this question to RedHat (the operating system is RHEL 5.3); to reiterate the goal was to be able to 'auto-login' so that I could start a VNC session (gdm had a bug that was resolved on 20.2.12).

Unfortunately, although auto-logging in is possible, it's not possible as 'root', this is for security.

Best regards
 
if my ealier suggestion of SSH is not usable then you can always set the auto login to an unprivileged user, VNC to the system then manually switch to root for the commands needed. (with su -c or sudo)

again from a security perspective this is a better approach as programmes should never be run as root unless absolutely necessary & logging on as root is very bad practice.

A Maintenance contract is essential, not a Luxury.
Do things on the cheap & it will cost you dear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top