Skip to content
Fragmented Development

Start X Session at Login

In my quest for a cool Openbox desktop that fits me (you know, other than CrunchBang, which has elevated itself beyond sliced bread some time ago :) ), I ended up tearing up a lot of other perfectly nice distros and building some up from a base install. In each, I ended up tearing out GDM. It's little bit hefty for accepting two strings, and it doesn't exactly work with Likewise, which I use at work.

Once I did that, I was back to good 'ol Getty, which is as basic as you can get. That also means that it dropped me at a Bash prompt, where I would have to run startx manually to get all the GUI goodness going.

That's where this new trick comes in handy: the ".bash_profile" file. It should be located in your home directory - just create it if it doesn't. Once there, toss the following line into the end:

startx

...and "whamo!" You've got yourself an X session whenever you log in.

Original tip, and more info, courtesy of Debian Admin's article about starting X without a display manger.

Tags: linux


Comments

<p>I have done that too. It is very handy. Way back, I fiddled with a small Ncurses setup that would ask me whether I wanted a graphical or command line interface when I logged in, but I managed to mess it up...</p>

Morten Zolde - mjjzf – http://writtenandread.net


Add Your Comment