Hi All,

I am looking at starting a project and was wondering if there was a way to make it so a controller type changed boot conditions. I want to move to linux for my home entertainment and would like to have a ps5 controller boot Lutris and a different controller boot into something like KDE plasma.

Is this a possibility or nonsense?

  • who
    link
    fedilink
    English
    15
    edit-2
    1 day ago

    This could use some clarification. Do you mean that you want…

    • Lutris or Plasma (depending on a detected game controller) to automatically launch as soon as your computer finishes booting, instead of the display manager that normally presents a login screen?
    • Lutris to automatically launch when you log in to a Plasma session while your PS5 controller is connected?
    • Lutris to automatically launch whenever you connect a controller while already logged in to a Plasma session?
    • Something else?

    The possibilities really depend on what you’re after.

    • @[email protected]OP
      link
      fedilink
      English
      11 day ago

      My understanding is that lutris is a program whereas as Plasma is a desktop environment so I guess I would be looking for plasma to start regardless and if connected to a ps5 controller then open lutris to big picture mode.

      I am mainly looking to mirror the current setup of a games console and smart devices from my machine of choice. It is toward usability for the family.

      • who
        link
        fedilink
        English
        4
        edit-2
        1 day ago

        My understanding is that lutris is a program whereas as Plasma is a desktop environment

        Yes, that’s right.

        so I guess I would be looking for plasma to start regardless and if connected to a ps5 controller then open lutris to big picture mode.

        Plasma (like many other desktop environments) can automatically launch whatever you like when you log in, if you create an XDG Autostart file for it in the $HOME/.config/autostart/ directory. (Hint: It uses the .desktop file format.)

        You could write a script that checks for a Playstation controller and launches Lutris if one is detected. You could then reference that script in the autostart file’s Exec= line.

        The simplest way I know of to detect a Playstation controller in a shell script would be something like this:

        #!/bin/sh
        udevadm info -t |grep -q DRIVER=playstation && echo "Hello, Playstation!"
        

        You would have to make the script executable, and replace the echo command at the end with a lutris command line, of course.

        Terminology correction to your original post: Booting is something that a computer does when you power it on. Launching a game or game launcher (on a machine that has an OS) is not booting.

  • @[email protected]
    link
    fedilink
    English
    32 days ago

    I think you’d be better off just having a controller hook up and that triggers a bash script to start steam in big picture mode or lutris.

    You probably could do something like this if you really wanted to but this would be clunky. If you’re always turning off the machine after you’re done using it, maybe it’d be OK but IMO, it would make more sense to just use KDE plasma and script something to get the functionality that you want.

    You wouldn’t have to worry about booting things up or shutting them down if you wanna switch between gaming and whatever else, you could easily make changes to it, and it’d likely be less complicated.

    Hell even a shortcut that opens it through a button combo or something would work for this. Pair controller, hit a key on your keyboard, boom, steam opens. That can be done through KDE natively through the shortcuts settings. Very easy to setup and something I use a lot.

  • @[email protected]
    link
    fedilink
    English
    72 days ago

    Certainly seems like you could make a udev rule to do something along these lines, I know you can execute specific commands /w udev, whether or not you can enable or disable a system service or whatever, I dunno, guess you could always execute a custom start script before WM that decides which WM to start

  • teppa
    link
    fedilink
    English
    32 days ago

    Do you mind explaining the incentives, why would you want a different controller to boot different things like that?

    • @[email protected]OP
      link
      fedilink
      English
      21 day ago

      I am trying to move my entertainment system to a single machine. I want to be able to access my plex, streaming services and games launchers from this. It is replace the playstation and smart tv.

      My problem is family tech ties, I want to ensure it is fool proof and not a barrier to enjoying the living area.

      • @[email protected]
        link
        fedilink
        English
        11 day ago

        Get an HDMI-CEC adapter, have your machine boot straight into big picture mode and pin Plex/jellyfin to your favorites so its the first thing you see.

        Alternatively, get a Chromecast and only switch to that HDMI for media, and leave the PC for gaming. Heck, if CEC works all right in both ways, you might be able to navigate on your PC with the Chromecast remote.

        I’m definitely not a fan of Google myself, but I can’t deny the ease of use for less savvy ppl to just press “ON” on the little white remote and have it turn on the TV, switch to the correct input and turn on the soundbar.

  • @[email protected]
    link
    fedilink
    English
    42 days ago

    I think the bigger hurdle here is that you need to do some legwork and research, else you would not be here asking this question 😉

    It’s possible but then I’d ask why? What’s the purpose of booting a different DE based on the controller type?

    • @[email protected]OP
      link
      fedilink
      English
      11 day ago

      I’m unsure of what the first part means, is this not looking for advice? I am new to linux and know I can have steam open on start up to big picture mode and I want the machine to also be easily accessible for other members of the family to launch apps like plex.

      At the moment they press the ps5 controller to boot to ps5 or the tv remote to boot to apps. Seeing as how these will now be merged to a single machine I want to make a user friendly differentiation.

    • Victor
      link
      fedilink
      English
      32 days ago

      My guess is that they want only the necessary software to run when gaming, which KDE is not. But I’ll let OP speak for themselves.

  • @[email protected]
    link
    fedilink
    English
    12 days ago

    “rebooting” is not a thing ova here. yeah, you can accomplish that but that’s not what you want. utilising something like InputRemapper + e.g. Plasma shortcuts, you can launch a big-picture UI, like steam or plama-bigscreen when it’s ready or somesuch, when you press a key combo on the controller or mouse or keyboard or any combination thereof.

    • @[email protected]OP
      link
      fedilink
      English
      11 day ago

      Yeah I suppose rebooting is the incorrect path or word. I am looking to closely mirror the current setup of smart tv, console, streaming box etc. all on one machine.

      The keyboard is unlikely to be used by anyone other than me, I am to do some research on an appropriate tv style remote to select apps and use within apps.