The officially official Devuan Forum!

You are not logged in.

#1 2024-03-15 20:47:03

jacksprat
Member
Registered: 2017-11-10
Posts: 57  

[SOLVED] Want to use startx instead of slim

New install of "devuan_daedalus_5.0.1_amd64_netinstall.iso" with XFCE4 as the Desktop.  That all worked, but I wanted to remove the "slim" Display Manager and login from the tty, starting X11 with "startx".   Have done this with Runit on Void Linux in the past, but thought I could achieve this on Devuan by moving /etc/runit/default/slim  to /etc/sv-old/ [from another system, not live].  However, when I reboot, the system hangs during the init phase.  I couldn't see why  this wouldn't "just work".  Can someone that has done this before me say what I am missing?  Thanks.

Offline

#2 2024-03-15 21:38:50

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 644  

Re: [SOLVED] Want to use startx instead of slim

Hi, see this post...

https://dev1galaxy.org/viewtopic.php?id=5538

the talk is about having X start as a non-root init. But it is workable.

You may have to read it all to glean the most workable edits for Devuan.

I hope this helps.

ps, I had it working with open-rc init system.

## Head_on_a_Stick
The default Xfce desktop for Devuan uses SLiM or LightDM and both run X under the root user so both are vulnerable to this exploit.

Starting the desktop via GDM or startx will cause X to be run under the normal user and so avoid this vulnerability completely.

To switch to startx either remove or disable (eg, update-rc.d slim disable) the display manager and add this line to the end of ~/.profile (or ~/.bash_profile if you use bash and have that file already) to start the desktop automatically after log in at TTY1:

[ "$(tty)" = /dev/tty1 ] && exec startx

To change the default desktop for all users run this command:

# update-alternatives --config x-session-manager

To change the default desktop on a per-user basis create a file at ~/.xsession containing the commands needed to start that desktop, as per https://wiki.debian.org/Xsession.

Or just switch to Wayland :-)

Last edited by GlennW (2024-03-15 21:46:26)


pic from 1993, new guitar day.

Offline

#3 2024-03-15 21:57:54

jacksprat
Member
Registered: 2017-11-10
Posts: 57  

Re: [SOLVED] Want to use startx instead of slim

Thanks GlennW, but this looks like it doesn't apply to Runit, but I'll  study it further.

Offline

#4 2024-03-16 08:40:55

aluma
Member
Registered: 2022-10-26
Posts: 646  

Re: [SOLVED] Want to use startx instead of slim

I could be wrong, but you are trying to break runlevel 2-5 to get runlevel 1.
https://dev1galaxy.org/viewtopic.php?id=4108
To be honest, I don’t quite understand why this is necessary.

Offline

#5 2024-03-16 10:54:37

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: [SOLVED] Want to use startx instead of slim

I would have done it this way instead:

update-service --remove /etc/sv/slim

which would not remove /etc/sv/slim but would remove the symbolic link, /etc/runit/runsvdir/default/slim. I just tested this with lightdm instead of slim, and it worked fine. Be aware that it will kill your graphical session. I'm running in qemu, and it left me with a black screen. Might be different on real hardware. I rebooted and got a console login screen. And startx works.

Also note that in debian/devuan, runit will use the sysvinit script if there are no runit scripts for a service. I don't know if this has anything to do with your problem, but maybe it's a useful clue.

Offline

#6 2024-03-16 10:55:38

Andre4freedom
Member
Registered: 2017-11-15
Posts: 174  

Re: [SOLVED] Want to use startx instead of slim

In the past, with initsysv, there used to be a file /etc/inittab.
Therin are the lines :

# The default runlevel.
id:2:initdefault:

Change it to

# The default runlevel.
id:1:initdefault:

And your system will start up to runlevel 1 (no graphics, kind of single-user mode.

This file exists in Devuan 5 (Daedalus) with my OpenRC as the init system. I don't know how about Runit.

And, besides, you can always come back to a text console using Ctrl-Alt-F1 (or F2 or...) and then type (as root)

init 1

.
That's old Unix school.  Good luck.

Offline

#7 2024-03-16 10:59:38

Andre4freedom
Member
Registered: 2017-11-15
Posts: 174  

Re: [SOLVED] Want to use startx instead of slim

Oh, I see, @fsmithread,
you were 1 minute and 1 sec quicker than I was.
Thanks. smile

Offline

#8 2024-03-16 11:12:06

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: [SOLVED] Want to use startx instead of slim

@Andre: My solution keeps the user in a multi-user non-graphical session, not single-user. Only the display-manager gets disabled. Other services continue running.

Offline

#9 2024-03-16 11:54:54

jacksprat
Member
Registered: 2017-11-10
Posts: 57  

Re: [SOLVED] Want to use startx instead of slim

@fsmithred:  thanks, I will try that.  Tried it and it hung after the message saying that the network manager was starting.  I switched to tty2, and was able to login, but I am not sure what other daemons I have to prevent from running so that it will just work.

In the interim, I tried install [on a different partition] without any X11 packages, just Console stuff, and on reboot it stopped [hung] after the message "Starting bluetooth:  bluetoothd".  I guess no-one tried that yet.

Last edited by jacksprat (2024-03-16 12:11:31)

Offline

#10 2024-03-16 12:30:32

rolfie
Member
Registered: 2017-11-25
Posts: 1,173  

Re: [SOLVED] Want to use startx instead of slim

$jacksprat wrote:

In the interim, I tried install [on a different partition] without any X11 packages, just Console stuff, and on reboot it stopped [hung] after the message "Starting bluetooth:  bluetoothd".  I guess no-one tried that yet.

I done that on all my latest Devuan installations including Daedalus to be able to set up the graphical desktop my way. I use netinstalls and disable anything else but the standard system utilities in the sw selection, and do a reboot past the final steps including the grub install. Never had any issues, it simply worked. Independent from if I have network or not, on real HW or in a VM. The console should come up, sometimes when firmware is missing with not so nice graphics, but still readable. No Intel or NVidea involved though, pure AMD stuff.
Have you left out something, skipped an important step during expert install? What kind of PC we are talking about? efi or legacy install? What did you modify versus the procedure described here: https://www.devuan.org/os/documentation … all-devuan ?

Last edited by rolfie (2024-03-16 13:49:22)

Offline

#11 2024-03-16 14:08:58

jacksprat
Member
Registered: 2017-11-10
Posts: 57  

Re: [SOLVED] Want to use startx instead of slim

@fsmithred,@rolfie:  whether I disable ALL X11 Software during installation or run "update-service --remove /etc/sv/slim" in the full XFCE4, reboot hangs.  In the latter, ctrl-alt-f2 allows tty login, and startx produces a functioning X11 desktop.  In neither of these cases have I done anything out of the ordinary.

Intel Core 2350M laptop.  I can't remember the command to list graphics card, but that can't be important.

Offline

#12 2024-03-16 14:39:52

aluma
Member
Registered: 2022-10-26
Posts: 646  

Re: [SOLVED] Want to use startx instead of slim

Another method to get text mode with sysv, I just did this procedure, quite simple.
I opened

sysv-rc-conf

, for

runlevel 4

I removed the flag to run tdm, this is my display manager. Closed

sysv-rc-conf

and ran the

telinit 4

command.
Received a text screen with an invitation. I entered, the free command showed about 290 KB of occupied memory, in graphical mode about 490 KB.
To return to graphical mode, the command

telinit 2

Now, to enter in text mode, you just need to select

runlevel 4

.

Last edited by aluma (2024-03-16 14:40:58)

Offline

#13 2024-03-17 08:54:49

jacksprat
Member
Registered: 2017-11-10
Posts: 57  

Re: [SOLVED] Want to use startx instead of slim

OK, I resolved my "issues" installing a minimal

  devuan_daedalus_5.0.1_amd64_netinstall.iso

I put the "sysvinit" version on /dev/sda6, and "runit" on /dev/sda7.  In both cases, the "Software selection" consisted just "standard system utilities" [ie no "Desktop Environment"], and installation completed.  After installation, I added xorg, openbox, tint2, lxterminal, and was able to "startx" to produce a welcome "black screen" that I can work with!

I don't know why I found this so difficult, but thanks for your patience.

Last edited by jacksprat (2024-03-17 08:55:22)

Offline

#14 2024-03-17 19:16:56

bilhook
Member
Registered: 2024-02-13
Posts: 78  

Re: [SOLVED] Want to use startx instead of slim

If putting an underscore in something in /etc/init.d does not work, then uninstall it.
If startx is problematic and you need to install xserver-xorg-legacy and edit /etc/Xwrapper.config, so be it.
Of course a fool will say that legacy is a catastrophic vulnerability.

Offline

Board footer