You are not logged in.

#1 2007-11-20 21:29:01

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

how can I optionally boot into X?

I've got a laptop which I'd like to boot into X most of the time but also have the option to boot to the command line, how can I do this?

I use grub so I was thinking that it could be through there somehow by passing parameters to the kernel but I don't know what I'd pass or how I would interpret it once booting had started.

Can anyone suggest a way to do it?

Offline

#2 2007-11-20 21:45:31

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: how can I optionally boot into X?

Put something like this in your ~/.bash_profile :

if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/vc/1 ]]; then
  startx
  logout
fi

This will start X when that user logs into console 1 , but goes to command line when logging in on console 2,3,4,5,6 .

Taken from Start_X_at_boot


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2007-11-20 22:08:57

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: how can I optionally boot into X?

OK, thanks thats a good solution. I was thinking more of either starting gdm or just command line but this will work just as well.

Offline

#4 2007-11-20 22:47:29

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: how can I optionally boot into X?

Offline

Board footer

Powered by FluxBB