How can I configure SDDM to start a different session (not gamescope-session-steam)

Hey, I've previously been using Debian for my HTPC but wanted to have a play with Bazzite. Primarily I use my HTPC for running Kodi (media centre) but occasionally I want to drop to Steam to play games. I'm running the deck variant. I'd rather not dual boot two operating systems - ideally, I want to be able to switch between Kodi and Steam within the repsective applications. Bazzite appeals as it has a nice working Steam out-of-the box. I know this is all RPM Ostree based - I've already had my hands dirty building & installing a couple of RPMs so that I can add/modify system files. Kodi is installed via Flatpak. Could anyone give me any pointers to allow me to configure the following - Two SDDM / wayland sessions i.e. gamescope-session-steam.desktop (that comes with Bazzite) & kodi.desktop - Have SDDM load kodi.desktop by default on boot - A systemctl or dbus etc command that I can run to switch to a specific session? Apologies if I'm asking in the wrong place or asking something that is forbidden!
11 Replies
wolfyreload
wolfyreloadβ€’3mo ago
Bazzite tends to cater for the 97% of users where it's set up and good to go for gaming. When you enter the realm of wanting to add your own desktop environments or SDDM session, you could in theory do a bunch of config to make Bazzite work in the way that you want, but it will be way more effort than sticking with your current Debian setup. Since you just want to play with Bazzite, for your setup I would install Bazzite on a fast external NVME or SSD drive (which is the dual boot you'd prefer to avoid) and try it from there without trying to do the additional config part. If you do want to get your hands dirty, what you are trying to do sounds more like you'd make your own custom image, where you make your own image and you rebase to it https://github.com/ublue-os/image-template
some_welly_dude
some_welly_dudeOPβ€’3mo ago
hmm - custom image is something I might do, however there will be a lot of trial and error involved to get it right. What does the feedback loop look like for a custom image? It can't be fast, I imagine running rpmbuild and installing the RPM every time I need to change something is slow enough as it is XD
wolfyreload
wolfyreloadβ€’3mo ago
If you build the custom image on github, you looking at about a 15-20 minute wait per change. You can build the images locally which can take that down to about 5 minutes depending on your hardware
some_welly_dude
some_welly_dudeOPβ€’3mo ago
yeah that would take forever πŸ™‚ I think at this point I'm just after some pointers as to how things are currently wired up, I can probably take it from there
wolfyreload
wolfyreloadβ€’3mo ago
This is for bluefin for making your local image environment https://docs.projectbluefin.io/local which should work for Bazzite. If you go the custom image route be sure to share it, as I think quite a few people will be interested in a kodi/bazzite type setup As for additional pointers around SDDM, I'll leave that to someone who knows that part really well
some_welly_dude
some_welly_dudeOPβ€’3mo ago
Thank you - and thanks for taking the time to reply πŸ™‚
wolfyreload
wolfyreloadβ€’3mo ago
You are welcome πŸ™‚
HikariKnight
HikariKnightβ€’3mo ago
make a custom image delete 2 files from image disable 1 service in image you now have sddm login enabled (but "return to gamemode" and "switch to desktop" will just work as logout buttons) it is literally what i do on my main pc, but my image is not meant to be used by others since it is my testing playground but this is essentially what you need to do on the image
# Remove the autologin to gamescope-session
rm /etc/sddm.conf.d/steamos.conf

# Remove virtual keyboard on SDDM
# as this image is for workstations and permanently docked steamdecks
rm /etc/sddm.conf.d/virtualkbd.conf

# Undo some bazzite-deck specific services we do not need anymore
systemctl disable bazzite-autologin.service && \
systemctl enable ublue-update.timer
# Remove the autologin to gamescope-session
rm /etc/sddm.conf.d/steamos.conf

# Remove virtual keyboard on SDDM
# as this image is for workstations and permanently docked steamdecks
rm /etc/sddm.conf.d/virtualkbd.conf

# Undo some bazzite-deck specific services we do not need anymore
systemctl disable bazzite-autologin.service && \
systemctl enable ublue-update.timer
i also enable the ublue update timer because this is a desktop system so auto updates will be fine this will not work on normal bazzite as the files will be restored on reboot the reason there is no "change the default to desktop" is because it breaks the steamos session management so making a custom image and enabling the sddm login is the best you get
wolfyreload
wolfyreloadβ€’3mo ago
Ah so I was right about that the use case would need a custom image. @some_welly_dude Hikari is one of the Bazzite maintainers, he really knows Bazzite back to front. Good luck and I hope you come right. πŸ™‚ If you get stuck have a look for HikariKnights bazzite fork to borrow some of the other code.
HikariKnight
HikariKnightβ€’3mo ago
well my fork uses bluebuild, but the process is the same, just remove the 2 files and disable the autologin service
some_welly_dude
some_welly_dudeOPβ€’3mo ago
I've kind of got this going - I've taken a slightly different approach. 1) I've disabled the sddm.service (still installed) 2) I've installed a kodi-gbm service (see https://github.com/graysky2/kodi-standalone-service) - this acts as display manager 3) I've added some scripts to /usr/bin that start the appropriate service in systemd using systemctl - i.e. either kodi-gbm or sddm It turns out that I don't want kodi running under the display manager (HDMI pass through issues). I've made the two systemd services conflict with each other (so if one is requested to start, the other stops and vice-versa) I've also customized /usr/bin/steamos-session-select to stop steam and call the "start kodi" script. So far, it seems to be working well! HDMI pass-through including Dolby ATMOS etc in Kodi is working. I've added an option to the Kodi power menu to run the "start steam" script (which just starts sddm) At the moment my changes are (mosty) self contained in a hacky RPM file - might look to put it into a custom image at some point πŸ™‚
Want results from more Discord servers?
Add your server