karli-sjoberg / gswitch

BSD 3-Clause "New" or "Revised" License
91 stars 13 forks source link

Add support for users without display manager #9

Closed mik13ST closed 3 years ago

mik13ST commented 4 years ago

Here we go again, another user with a very specific setup that nobody uses. Yes, my login screen is just the plain TTY login screen (press Ctrl + Alt + F2 to see it, Ctrl + Alt + F1 or Ctrl + Alt + F7 to go back). This puts me into a shell after login where I would launch startx (I have this in my shell's rc file). I launch my DE on X start (set in .xinitrc).

The question is, should this tool support users that have this kind of setup? How common is this? Should I just create a fake display-manager.service which controls my X session? Or should I actually start using a display manager even though I don't need it (you know, it's Arch Linux and you have to DIY everything)?

Just for reference, this is what the failure look like:

$ sudo gswitch internal
You are already set up. Would you like to reload? (Y/n)
yes
Failed to stop display-manager.service: Unit display-manager.service not loaded.
Unit display-manager.service could not be found.
modprobe: FATAL: Module nvidia_drm is in use.
modprobe: FATAL: Module nvidia_modeset is in use.
modprobe: FATAL: Module nvidia is in use.
Failed to start display-manager.service: Unit display-manager.service not found.

EDIT: The support for this could be as simple as running xkill -a to stop all X sessions and startx or xinit to start it back up instead of using systemctl and the display-manager.service. See https://askubuntu.com/a/290790 for example.

karli-sjoberg commented 3 years ago

Actually feel bad for never responding to this so I'm putting this to rest by simply saying no :smile: The reason for that is because I made this tool mostly for my own sake and I'm never going to be without a display manager of some kind. Send a pull request where you make this work, sure, but I'm not investing any time into it.