On 05/06/2012 10:49 PM, Amit Uttamchandani wrote:
Hello,

Using dwm on a customized system and accomplished X autologin and
starting of applications using the following:

For X autologin:
  1. Modified /etc/X11/xinit/xserverrc to add a sudo. Thus:
     exec sudo /usr/bin/X -nolisten tcp "$@"

  2. Add user to sudoers list with no password required.

  3. Have the following in /etc/init.d/autox:
     su autouser -l -c "/bin/bash --login -c startx>/dev/null 2>&1"&

For starting of applications:
  1. In the user's xinitrc:
     exec dwm&
     xrandr --output LVDS-2 --fb 1300x740 --scale 1.62x1.54
     hash surf&&  surf http://localhost/

So the questions are:
  1. Is there a better way to accomplish X autologin? Preferrably without
     installing a login manager.

  2. For autostarting applications, the above was the only way I could
     get surf to maximize with the xrandr scaling. Otherwise surf would
     only maximize to the original resolution (in this case, 800x480).

  3. What is the 'hash' used for? I got this from the xinitrc.example on
     on the dwm website.
To answer your question number one, autologin has security implications that you should consider. If you are still interested in autologin, nodm <http://enricozini.org/sw/nodm/> is probably the easiest and simplest solution. It's an application that starts X as the user you specify in the config, that's it. Its often used in embedded systems where logging into the desktop is not desired, but its handy on the normal desktop too. I used it on a distro that I put together for the low-spec olpc laptop a few years ago. If you do want a login manager, like for multiple preconfigured sessions, then most have an autologin option as well.

james

Reply via email to