How do you start programs on startup minimised to tray?

I am sure this must be possible on KDE, is there a script that could do this? The reason why I want them to start minimised is because it is far cleaner and that way they don’t get in the way of me logging into my password manager (Keepass), which is the first thing I do once I am in.

Systemsettings → Window management → Window rules

Or via right click on the title bar of an app → More Actions → Special Application Settings

Tried that already, is there something I am missing? I don’t want it to be minimized, I want it to be minimized TO TRAY, but only on startup

Dot you mean: on login into the desktop.

I ask because “startup” can be done with many things.

Yes when I login

And then some applications start “automatically” because you have them in the list of programs to start at login?
Or are those programs not stopped at log out and you have “restore the session” switched on?

Please do not take it for granted that the people here do all the things the same as you do them. You should describe in detail what you do to make others understand your “way of living” on the system.

Getting the programs to start when I login is easy, they all pop up on the screen. What I want to do is have them start minimized to the system tray (the part on the bottom right of the screen)

I did not ask how easy it is. I asked what you did to start them.

At the moment I am using KDE autostart function, but I could use a script instead

It is clear now where the starting comes from.

I do not think there is a good general solution for this. Some program might have an option for this (I saw somewhere a --no-window , do not know which program), but that is my no means generally programmed in.

Also there seem to be more people asking this, or similar, question. But I assume you know how to use a Internet Search engine.

@RangoTango I would suggest running from the command line with a --help for example for jamesdsp-pw, it has the -t option to Start minimized in systray. So very application dependent. Then can adjust the desktop file to suit.

The reason I am making a new thread is because I could not find a solution in any of the other threads anywhere else on the internet, but for something as seemingly simple as this I am assuming it is still possible (I hope it is)

Seen the --no-windowthing, maybe it would work in a script of some sort?

So not just any application can be minimized to tray with an adjustment to the desktop file?

You misunderstood me. Like @malcolmlewis says, every program may or may not have an option to do this. And the name of that option may be very different from program to program. So I remember --no-windowing from a program I have forgotten and Malcolm know about the -t option of the program jamesdsp-pw (which I do not know). You have to find out for each and every program in your KDE startup list if they have such an option and when yes, what it is, by reading the documentation (using --help on them, or read the man page or other docs).

Then you have to alter your program call in the KDE startup list accordingly. That does not need a script, but just adding the parameter in the call (on the correct place of course).

Ah OK I understand now, when Discord and Teams for Linux, the two programs I want to start minimised, launch, when I close them they are actually minimised to tray because that’s how I have configured the settings for them inside of the programs themselves.

I’m thinking, would it be possible to create a script that launches them on login (or use auto-start for this part) and then “closes” them 2 seconds later? This should produce the desired effect of having them start minimised as like I said before when I hit close they minimise to tray.

Then you did not really “close” (in the meaning of “stopping the program”) them. Again you should explain what you do.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.