Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want my Ubuntu box to boot directly into a tty login screen and after it does that I want it to automatically run startx how would I go about doing this?

share|improve this question

closed as too localized by Luis Alvarado Mar 14 '13 at 17:05

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
I don't mean to be nosy, but why do this? If you want to end up in a graphic environment by default, why not use a display manager? –  Don Faulkner Aug 17 '10 at 21:15
    
to deter thiefs –  Whatnotery Aug 18 '10 at 0:46
    
I doubt that thieves will be interested in the contents of your computer, and if they are i'm sure the can find out hot boot from a live-cd. If you fear for you data's security encrypt you disk. –  Source Lab Aug 18 '10 at 7:57
    
its not my data I'm worried about its the physical computer if it boots into a text based environment they'll assume its broken and not take it (or so I'm hoping) –  Whatnotery Aug 20 '10 at 4:07
    
I doubt a thief will even touch the power button –  Bart van Heukelom Dec 17 '10 at 21:36

3 Answers 3

What txwikinger said, but then to make it automatically run startx when you login, edit ~/.bash_profile -- that file is only executed on login shells, not in normal terminal emulators that you open on your desktop.

EDIT: ~/.profile if you don't use bash

share|improve this answer

You can disable the automatic start of the X-server by disabling the start on lines in gdm.conf and/or kdm.conf. This way upstart will not automatically start the X-server.

After logging in into the tty, you can just start the appropriate login session via sudo start gdm or sudo start kdm. Or if you rather want the traditional x, you could run startx, if it is configured such that you can do the things you want to do from that.

share|improve this answer

Turns out from the grub boot menu you can press e over any entry to edit its configuration. If you do this over the ubuntu entry there is a line that starts with the word linux and ends with something like ttyhandoff=7. Changing this to ttyhandoff=1 does what you would expect.

Apparently you could also append text to the end of this line.

share|improve this answer