1

I'm using KDocker on startup to autostart Spotify in the system tray (since Spotify on Linux doesn't have that feature).

It works, however after startup the KDocker window selector (changing the cursor to a selector box with an X in it) starts up, and tries to dockify anything I click. I don't know why it's doing that, since I provided a startup command to it so it shouldn't be looking for user input. I can exit out of it using Escape, but it's still annoying. I'm using Kde, and set up this login script:

#!/bin/bash

echo "Performing startup scripts"
echo "Starting Spotify docked"
kdocker -s -t -q -j -i /opt/spotify/icons/spotify-linux-64.png spotify
sleep 1
xdotool key Escape # to close out the annoying window picker that shows on startup

I attempted to use xdotool to automatically close out of the window selector, but it didn't work.

Any ideas of other ways I could avoid this behavior?

0

2 Answers 2

0

You can use XDG Autostart

  1. Edit the "Exec" line in your /usr/share/applications/spotify.desktop as shown
  2. Copy this to ~/.config/autostart
  3. Reboot your system, Spotify should appear in the system tray
2
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Oct 24, 2022 at 14:27
  • The question is also about kdocker it seems, not just Spotify.
    – cipricus
    Commented Nov 27, 2023 at 14:41
0

The problem might be with an interaction between kdocker and "Session Restore" settings, when on KDE Plasma the system is set to re-launch the programs that were running at logout.

I have noticed that after adding the login script the problem was absent at first logout/login because krunner was not yet running at logout. At next logout it was running, and was thus "restored" at login, resulting in a supplementary kdocker process running on top of your script.

(I also want to start a program (blueman-manager) minimized to dock (more than that, I need its window open, but docked, in order to fix this odd problem: a bluedevil bug in fact) and I can do it with a much more simple script, which only contains the line kdocker blueman-manager. My script, as well as more complex scripts, like yours, were having the problem you described, until I have disabled that option.)

Another solution (in case you must use the option to restore your session) is to add kdocker to a list of exceptions when session is restored.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .