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?
-
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 FaulknerAug 17, 2010 at 21:15
-
to deter thiefs– WhatnoteryAug 18, 2010 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.– LasseLuttermannAug 18, 2010 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)– WhatnoteryAug 20, 2010 at 4:07
-
I doubt a thief will even touch the power button– Bart van HeukelomDec 17, 2010 at 21:36
3 Answers
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
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.
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.