auto login with xfce?

Arthur H. Johnson II arthur.johnson at gmail.com
Thu Feb 7 23:45:43 CET 2008


Enrico Tröger wrote:
> On Thu, 7 Feb 2008 14:15:27 -0700, "David Mohr" <damailings at mcbf.net>
> wrote:
>
>   
>> On Feb 7, 2008 2:13 PM, Joost Kremers <joostkremers at fastmail.fm> wrote:
>>     
>>> hi list,
>>>
>>> this may not be the best place to ask, so if i need to go elsewhere, just
>>> let me know.
>>>
>>> i've recently bought an asus eeepc 4G and am in the process of installing
>>> slackware on it, obviously with xfce. now, since this isn't going to be a
>>> multi-user machine and because i want it to be ready for use quickly, i'd
>>> like to have this machine boot into xfce automatically, without having to
>>> log in. i've searched google and there seem to be various ways of doing
>>> this. is there any one way that is most suitable or recommended in
>>> combination with xfce?
>>>       
>> My suggestion would be to look into gdm, which I think has an autologin option.
>> AFAIK xfce doesn't have a login-manager at this time.
>>     
> using (g|k)dm is very contrary to the requested feature: quickly.
> Even sdm or xdm would be overkill.
>
> Seriously, why should one use a display manager to log in
> automatically? It's just a big bloat of unnecessary code to load.
>
> I don't know yet the best solution, but the first idea which comes to
> my mind is to use an init script, the last one in /etc/rc2.d(or
> whatever runlevel you boot by default, rc2.d is default for Debian
> systems). In this init script, you just start your Xfce session with su
> or sudo, e.g.
> #!/bin/sh
>
> su enrico -c /home/enrico/apps/xfce-svn/bin/startxfce4
>
> (the above is an untested example for my system, you probably want to
> change username and path ;-)). Maybe there are better ways, maybe it's
> better to use sudo instead of su.
>
> Ideas are welcome, I'm planning to do this too.
>
> Regards,
> Enrico
>
>   

Put this at the end of rc.local:

su username -c "startx"

That should do it.




More information about the Xfce mailing list