I run different programs as different users, is it possible to have a visual indication of wether a user or another is running them ? e.g dolphin as user1, dolphin as user2, etc

  • ReversalHatchery@beehaw.org
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    11 months ago

    I would be interested in a proper solution, but recently I have found a way to make custom icons for specific Konsole instances. Maybe you could use a similar approach.

    I have made a copy of the program’s desktop file and placed it in /usr/local/share/applications/ with a slightly different name, and given it a new icon. Then I have made a new window rule, that sets this desktop file for windows that start with a title having a specific pattern, and made Konsole to start with that title using an undocumented command argument I have found on their bug tracker.
    This is very hacky and I don’t like it, can’t wait until it breaks, but it’s all I have found.

    An alternative way may be to make a symlink to Konsole and start it through this symlink, and somehow identify the window by the executable path… but window rules don’t support that. Maybe through some other way? KWin has a scripting API… hmmm…

    But a problem you’ll probably have to deal with when setting the title is that the program can set it’s title any time, and at least some of them (including Konsole) routinely do that, in that case based on the selected tab’s title. There’s a setting to turn that off… but as I have experienced, it doesn’t do what I expect, if anything. Maybe by listening to title changes you can force your will, if that is possible.

  • stepanzak@iusearchlinux.fyi
    link
    fedilink
    arrow-up
    3
    ·
    11 months ago

    I have no idea, but couldn’t this be an XY problem or how it’s called? I mean, do you really need to use apps as different users? Maybe you do, I don’t know, but sometimes it’s good to think about whether the problem you are trying to solve isn’t just a result of another peoblem.

  • Neshura@bookwormstory.social
    link
    fedilink
    English
    arrow-up
    3
    ·
    11 months ago

    Not sure if possible but have you checked whether the running user is an application property? If so you could maybe manage it via application or window rules.

    Can’t check rn because I’m away from my PC but it’s worth a shot checking imo.

  • palordrolap@kbin.social
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    11 months ago

    To distinguish two Firefox profiles that I run simultaneously, I use different themes on each. For Firefox this might actually be the best way.

    For a file manager (I assume the Dolphin you’re talking about is the file manager), the closest I remember seeing is a red toolbar on the unrelated Nemo file manager when it’s run as root.

    If Dolphin is per-user theme-able, then you could do what I do with Firefox. If it supports other kinds of plug-in, then maybe there’s one that does what you want already.

    To my knowledge, windowing systems can’t override the title of an application’s window, and even if they could, the application could change it back again at any time, creating a race condition, or a very ugly situation where the system picks and chooses which windows are allowed to modify their titles and which ones aren’t.

    Therefore, I think you’d have to write your own plug-in (if they’re a thing and the API permits title modifications), modify Dolphin’s source code yourself or submit a feature request to Dolphin’s developers, cross your fingers and wait.