OpenSolaris – Autologon

There are two ways to setup the auto login for OpenSolaris (2008.11);

One – You can fire up the GUI using gdmsetup. Update : this didnt actually work when i tried it recentely – it might not be in this release of opensolaris.

Two – go to /etc/x11/gdm/custom.conf (in newer releases its just /etc/gdm/custom.conf) and manually modify the required fields in the [daemon] section and add the following;


Note: You cannot auto-logon as root.

Bare in mind that I’m not concerned about security at this point as the box is not exposed to the open world, and is somewhat protected by the fact it lives on a “private” LAN. (i.e. my home lan)

If you want to run something automatically on logon you can put the commands into the /etc/profile file. Since I’ve been looking for a way to autostart virtualbox machines this will be the place i do it. (mainly because it is one of the easiest way to do it)

I have two machines “Test” and “Test2” which i start by adding the following commands to the end of the /etc/profile file;   (vrdp port set to 3395, 3396)

Sleep 10 – just to give logon a bit of time to recover (all services to start etc). Might be easier to use timed logon instead for this one as all terminal (ssh) sessions also incur the delay.

gnome-terminal -e “VBoxHeadless -s Test -p 3395”

sleep 2 – delay between starting vms

gnome-terminal -e “VBoxHeadless -s Test2 -p 3396”

touch ~/imadeit – i use this just to check it makes it to the end of the script o.k.

I’m just looking to see if there is a nice way to initiate the shutdown when the box is rebooted.

3 Replies to “OpenSolaris – Autologon”

  1. Pingback: OpenSolaris - Headless server | Daz's Bits and Bobs

  2. Hi Leo, yes that was the problem every time someone logs into the ssh it executes. At the moment i’m manually starting the vm’s myself, but would like to find a better way of doing things.

    xvm server might be the solution, but i’ve yet to find the time to look at that scenario.

Leave a Reply

Your email address will not be published.