open GUI from command line

6 Antworten [Letzter Beitrag]
GotYaNumba
Offline
Beigetreten: 02/04/2016

Okay, stupid question. It's been a few months since I messed around with Trisquel, and I've forgotten the command to open the GUI from the command line. I boot to the command line first before entering the desktop environment.

Thanks.

loldier
Offline
Beigetreten: 02/17/2016

Command to initialize an X session is 'startx'.

GotYaNumba
Offline
Beigetreten: 02/04/2016

To clarify, I'm running Trisquel GNU/Linux 7.0.

I can log in on the command line, then I am given scott@servername:~$. I just need to know how to enter the desktop environment.

loldier
Offline
Beigetreten: 02/17/2016

Startx should do it. Do you mean something like 'sudo /etc/init.d/lightdm' (gdm)? Or 'gnome-session'?

GotYaNumba
Offline
Beigetreten: 02/04/2016

Haha. Oh you meant literally "startx". I was typing starttrisquel, startgnome... I thought x was a variable.

Yes, startx got it done. Thank you.

Magic Banana

I am a member!

I am a translator!

Offline
Beigetreten: 07/24/2010

'sudo /etc/init.d/lightdm' (gdm)?

Well, that would be LightDM (by default in Trisquel), not GDM. To start init scripts, 'start' can be used (and there are 'stop' and 'restart' too):
$ sudo start lightdm
$ sudo start gdm

loldier
Offline
Beigetreten: 02/17/2016

Here's how to boot into the command line (disable GUI auto start).

http://ask.xmodulo.com/boot-into-command-line-ubuntu-debian.html

sudo nano /etc/default/grub

--Look for a line that starts with GRUB_CMDLINE_LINUX_DEFAULT, and comment out that line by prepending # sign.

--change GRUB_CMDLINE_LINUX="" --> GRUB_CMDLINE_LINUX="text"

--uncomment the line that says "#GRUB_TERMINAL=console"

Save grub file and exit Nano -- ctrl+x, y, enter.

Then run Grub update:

sudo update-grub

One last step after editing /etc/default/grub (for systemd, if enabled, eg. Debian 8 Jessie):

sudo systemctl set-default multi-user.target
----------------
Revert to desktop boot later by restoring GRUB config file and run:

sudo systemctl set-default graphical.target

etc_default_grub_nano.png