PDA

View Full Version : Boot into terminal not GUI



borismichalko
12-Jan-2017, 14:17
Hi,

I would like to use my Raspberry as headless server, accessible predominantly via ssh.
Therefore I don't need it, after power on, to boot into GUI.
I saw some instructions how to do it for general Linux installation or opensuse but I can't use any of these as files and tools are bit different in SLES.
Can somebody advise?

Thanks
Boris

Magic31
12-Jan-2017, 14:58
Hi Broris,


Hi,

I would like to use my Raspberry as headless server, accessible predominantly via ssh.
Therefore I don't need it, after power on, to boot into GUI.
I saw some instructions how to do it for general Linux installation or opensuse but I can't use any of these as files and tools are bit different in SLES.
Can somebody advise?


Have you tired?:

systemctl set-default multi-user.target

Cheers,
Willem

borismichalko
12-Jan-2017, 15:58
Hi,

perfect this one works.
Also now I can't start X as non root user. Is there a way?

Thanks
Boris

hdtodd
15-Jan-2017, 18:48
Hi,

Also now I can't start X as non root user. Is there a way?

Thanks
Boris

Yes, I'm able to boot into non-GUI ("multi-user.target") mode, log in as my non-root account, and "startx" to get the GUI. I don't recall doing anything special to make that work. BUT, I do have my personal account assigned to groups:
groups=502(hdtodd),0(root),33(video),100(users),10 00(plugdev)

You might try "sudo useradd -G root <YourAccountName>" and then try startx again.

Magic31
17-Jan-2017, 06:54
Hi two,


Yes, I'm able to boot into non-GUI ("multi-user.target") mode, log in as my non-root account, and "startx" to get the GUI. I don't recall doing anything special to make that work. BUT, I do have my personal account assigned to groups:
groups=502(hdtodd),0(root),33(video),100(users),10 00(plugdev)

You might try "sudo useradd -G root <YourAccountName>" and then try startx again.

Just saw the replies... Adding the root group to a non group user is not something you'd want to do or I'd recommend in any case as that greatly defeats the purpose of having a non root user.


@Boris: what is the goal (in this case) of starting up an X session? By that I mean, does it not suffice to use SSH with X forwarding enabled when needed X support?

Cheers,
Willem

borismichalko
18-Jan-2017, 14:06
@Willem: I was just curious how to achieve it for a "case when I would need it". Right now I'm fine with SSH w/o X. Just for the reference I was able to achieve it via:

systemctl set-default graphical.target

Cheers
Boris

Magic31
18-Jan-2017, 19:23
Hi Boris,

Good you found it.

As added note:

If it's just an occasional X startup you are looking for, you can use:

systemctl start graphical.target #load all the way up to the graphical interface (won't work if X is not installed, say on a minimal install)
systemctl isolate multi-user.target #bring the system back from a higher level into console mode

Doing it that way ensures the default mode does not get affected.

About these target things:

Units are the new thing with systemd. These units replace the good old init scripts.

the multi.user.target (aka "runlevel 3" if systemd would have runlevels) is a grouping of units into targets.



Cheers,
Willem

borismichalko
23-Jan-2017, 12:31
Thank you Willem! This was exactly I was looking for.
Boris