This generally works well, but seems to have a bug, in so far as once I boot up my PC I end up with multi instances of the dock, most often two, but sometimes more than two. It’s easy enough to reduce the application to just a single working dock. After that the application usually behaves for the remaining session.
But I was wondering if anyone else has come across this odd behaviour, and if so, what can be done to prevent multi-docks from opening?
I wonder if this might be a result of reloading a session at login.
I don’t recall how session restore is managed in XFCE (Plasma user here) but I typically start with an empty session. Perhaps you could do the same to see if that improves the situation.
(Many) years ago, I did have an issue with Cairo dock (in XFCE) effectively rendering (some of) its panels off-screen; but that doesn’t seem to be your issue.
I think so, but I’m not sure. What I have found, however, is that it’s Bad IdeaTM to have it start with a systemd service unit. (At least on Plasma, so I’d expect it to be the same for
Xfce.)
Rather create a .desktop file for it in ~/.config/autostart/:
$ cat ~/.config/autostart/cairo-dock.desktop
[Desktop Entry]
Categories=System;
Comment[en_GB]=Light and eye-candy filled dock and desklets for your desktop.
Comment=A light and eye-candy dock and desklets for your desktop.
Exec=/usr/bin/cairo-dock
GenericName=Multi-purpose Dock and Desklets
Icon=cairo-dock
Name=Cairo-Dock
Terminal=false
Type=Application
X-KDE-Wayland-Interfaces=org_kde_plasma_window_management
Well .it’s already in autostart, being automatically placed there on installation. There’s only one entry shown in the list of autostart applications.
Just booted up and this time there were 4 instances of cairo dock. Sometimes you can’t see more than one, as the other 3 docks are tightly superimposed on each other. But 4 separate processes of Cairo were shown on the terminal.
I might try Ben’s suggestion if no-one else can come up with a probable cause.
As you can see, just one entry for cairo-dock. As for ‘saved sessions’, ‘automatically saved session on logout’ has always been checked, and has not caused any issues before. Besides the problem recurs when I reboot which would not save a session, but start a new one.
Can you please humour the suggestion, and choose to Start with an empty session1, and test over a few reboots, so we can at least rule this out as a contributor?
OK. Disabling ‘save session’ made no difference. But after testing I can now confirm that each time I reboot an extra process is started for Cairo, so it’s cumulative. That’s why sometimes I had 4 docks running as I had not removed the excess docks before rebooting, and as they are superimposed more or less exactly, it’s difficult to see at first what is occurring. As you can see, the 2nd option, shown below is now unchecked (if that’s what you meant).
You should delete any saved sessions manually, do not trust your settings - if a session exists, it can still load the last one. Don’t ask me how, because we don’t know - but we know it is happening.
Look at it first, then blitz the folder! Also, don’t trust my paths, I don’t use XFCE and it may have changed…
command ls ~/.cache | grep ss
command rm -rvdI ~/.cache/sessions/*
command ls ~/.config/autostart
NB: ‘command’ ensures that no alias is entering the fray
First, searching for any folders with ‘ss’ in the name in cache
Remove all.
Remove the autostart folder, re-do that stuff again later.
Maybe also just remove the whole cache folder:
command rm -vdrRRf ~/.cache
As I said, with Plasma I had multiple instances of CONKY starting up (not the ones I have in my autostart either) and it took massive cleaning to prevent it happening… I never found the exact cause and it never made sense to me.
From this comment - a similar issue, disabling ‘sessions’ failed to disable it…
XFCE.org 2022
Indeed, the check mark is now always unchecked but I always have the programs in multiple versions at the reconnection.
Finally, go through hidden files in HOME.
Dig into hidden folders and configs…
Look at .xinitrc… look at them all!
There could even be lines in your bashrc that could fire up a program… we don’t know everything that’s possible here.
Finally I think I’ve cracked this, folks. As often the case the solution is the simplest one, which is, just omit/disable Cairo from the autostart list of apps. Just to recap the system put it in there when I installed cairo-dock.
At least on 3 reboot tests there is only one instance now of cairo-dock, so I’m calling this as ‘solved’. To everyrbody that helped or suggested, thanks for all your input.