Closed vayulove closed 7 years ago
You can run kdocker via autostart settings of your desktop environment. To be able to help with more details, we need to know what specific desktop do you use.
I have KDE. It seems as if I need the window ID which I won't have at startup.
Do you need a window ID because the title is not fixed? If so, there are bash tricks you can use, e.g. (prog-xyz &) && sleep 1 && kdocker -x $(pidof 'prog-xyz') -m -t -i ~/Icons/prog-xyz.png Starts your program in a subshell and waits for it to get a pID allocated, then passes its pID to kdocker with whatever other options you need. Put that in a script, if needed, then add it to: System Settings -> System Administration -> Startup and Shutdown -> Autostart
What happens with just: kdocker prog-xyz ?
What does this produce? kdocker -v
Got it working, thanks.
I follow this article and works well.
https://robbinespu.github.io/eng/2018/03/17/Minimize_spotify_linux.html
Do you need a window ID because the title is not fixed? If so, there are bash tricks you can use, e.g. (prog-xyz &) && sleep 1 && kdocker -x $(pidof 'prog-xyz') -m -t -i ~/Icons/prog-xyz.png Starts your program in a subshell and waits for it to get a pID allocated, then passes its pID to kdocker with whatever other options you need. Put that in a script, if needed, then add it to: System Settings -> System Administration -> Startup and Shutdown -> Autostart
(rogue-program &) && sleep 1 && kdocker -x $(pgrep -o 'rogue-program') -m -t -i /usr/share/icons/url-path-to-icon/icon.svg or png
pgrep -o show the first pid of the program because some programs have many pids. you need the one that is showing the window.
I'd like a specific application to always be in the system tray.