Cairo Dock glitch

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?

1 Like

I would assume that you have checked autostart entries.

Do you have any kind of ‘session restore’ enabled?

I find that this can sometimes cause me issues (on Plasma) with multiple instances of the default conky being launched…

To launch a clean instance, I use a script:

To TOGGLE an application:

#!/usr/bin/env bash

if pgrep -x "cairo"
        then pkill cairo
    else
        cairo
fi

This would be useful to kill all cairo instances and launch only one if there are none.

If you set this as your autostart, then even if it is somehow repeated, there should only be one instance.

Obviously this is not actually discovering the root cause of your issue.

1 Like

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.

Regards.

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.

Are each of the docks the same; content included?

Please confirum that you have looked at “Session and Startup,”

“automatically save session on logout.”

This caused me issues on Plasma - have you checked?

rm -fr ~/.cache/sessions/*

I mentioned in my previous post that there’s only one entry of Cairo in the autostart list.Here is my autostart list:

ls  -a1 .config/autostart /etc/xdg/autostart
.config/autostart
.
..
audio-recorder.desktop
cairo-dock.desktop
xcape.desktop
xfce4-clipman-plugin-autostart.desktop
xfce4-settings-helper-autostart.desktop
xfce4-tips-autostart.desktop
xfce-panel-workaround.desktop
xfce-pbw.sh
xfconf-migration-4.6.desktop

/etc/xdg/autostart:
.
..
at-spi-dbus-bus.desktop
blueman.desktop
geoclue-demo-agent.desktop
gnome-keyring-pkcs11.desktop
gnome-keyring-secrets.desktop
gnome-keyring-ssh.desktop
light-locker.desktop
msm_notifier.desktop
nm-applet.desktop
org.gnome.SettingsDaemon.DiskUtilityNotify.desktop
pamac-tray-budgie.desktop
pamac-tray.desktop
pulseaudio.desktop
snap-userd-autostart.desktop
xfce4-clipman-plugin-autostart.desktop
xfce4-notes-autostart.desktop
xfce4-notifyd.desktop
xfce4-power-manager.desktop
xfce-polkit-gnome-authentication-agent-1.desktop
xfsettingsd.desktop
xiccd.desktop
xscreensaver.desktop

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?

1. Or, whatever the label might be on XFCE.

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).

Yes, it was.

Is it possible you’ve previously created services to launch Cairo Dock, and some of them are still activated?

What happens if you move the .desktop file from Autostart; does Cairo Dock still start; and if so, does it exhibit the same issue?

You might also check that you don’t have multiple Cairo Dock .desktop files in ~/.config/autostart.

Otherwise, I don’t know what to else suggest.

No - though this was an important step.

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.

2 Likes

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