You are not logged in.

#1 2016-04-07 09:38:30

MCSH
Member
Registered: 2016-03-29
Posts: 14

[Solved]Enabling/Disabling systemd services in grub

Hello,

I'd like to have more than one grub entry to select either gdm or sddm. I tried passing init script to grub but that didn't worked (I'm guessing because systemd wasn't loaded at that time? I'm not sure)

Basically I need two boot options one to do:

systemctl disable gdm.service         
systemctl enable sddm.service

And the other to reverse this.

So, is there a way I can achieve this?

Last edited by MCSH (2016-04-07 09:58:06)


Sajjad Heydari

Offline

#2 2016-04-07 09:41:48

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,865
Website

Re: [Solved]Enabling/Disabling systemd services in grub


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2016-04-07 09:57:54

MCSH
Member
Registered: 2016-03-29
Posts: 14

Re: [Solved]Enabling/Disabling systemd services in grub

Thank you, this looks promising, I'll try to implement it after reading the docs.


Sajjad Heydari

Offline

#4 2016-04-07 18:36:49

MCSH
Member
Registered: 2016-03-29
Posts: 14

Re: [Solved]Enabling/Disabling systemd services in grub

For anyone else looking to achieve a similar behavior:

Copy

/usr/lib/systemd/system/graphical.target

to

/etc/systemd/system/mykde.target

Then create the directory:

/etc/systemd/system/mykde.target.wants

and link any service you require, (sddm for example would be:

/usr/lib/systemd/system/sddm.service

) to this directory


Sajjad Heydari

Offline

Board footer

Powered by FluxBB