Conky autostart twice

For years, I have had a conky configuration that is started via KDE autostart at login. So far everything has worked without any problems. Since the stable update on November 30th, conky is started twice. Once with my desired configuration (top part in the picture) and once with the standard configuration (right in the picture).

I have deleted the KDE autostart and now start conky via user unit. The result is the same, conky is started twice.

The output of ps -eF | grep conky shows:

mepi      2297    1955  0 113603 14912  7 08:42 ?        00:00:01 /usr/bin/conky -c /home/mepi/.conky/.my_conky_config
mepi      3088    1955  0 150574 13272  4 08:42 ?        00:00:01 /usr/bin/conky --daemonize --pause=1

Any ideas to solve my problem?

I use this script to autostart my conky:

#!/bin/bash
        conky -d -c ~/.config/conky/c0-time.conky
        conky -d -c ~/.config/conky/c0-date.conky
        conky -d -c ~/.config/conky/c2-network.conky
        conky -d -c ~/.config/conky/c4-disk.conky
        conky -d -c ~/.config/conky/c1-information.conky

I save the script:
~/.config/conky/conky-base.sh

I can use this script to restart conky any time I need.

I used a variation to toggle conky:

#!/bin/bash
if pgrep -x "conky"
        then killall conky
    else 
        conky -d -c ~/.config/conky/c0-time.conky
        conky -d -c ~/.config/conky/c0-date.conky
        conky -d -c ~/.config/conky/c2-network.conky
        conky -d -c ~/.config/conky/c4-disk.conky
        conky -d -c ~/.config/conky/c1-information.conky
fi

Hello, thank you very much for the feedback!

My script looks similar. The difference is that the “killall conky” part is missing.

I have now adapted my script as follows:

#!/bin/bash
killall conky
sleep -1
    conky -d -c ~/.conky/.my_conky_config

When I run the script in the console, it runs as expected.
In Kde I have inserted it as autostart (see picture). When I log out and log in again, conky starts twice. :slightly_frowning_face:

2nd command /usr/bin/conky --daemonize --pause=1 does not specify a configuration file and will use default conky configuration file ~/.config/conky/conky.conf

I suggest remove one of the two autostart commands so that only one conky is loaded at startup

If the default configuration is loaded, move and rename the custom configuration
/home/mepi/.conky/.my_conky_config to /home/mepi/.config/conky/conky.conf

1 Like

That’s clear

I have only one autostart.
As described above, everything had been working for years (set up in 2021) until the update on November 30th.

As Kde is set up in such a way that the previous status is restored when you log in again (previously opened programs). I have just tested the following with deleted autostart:

  1. new login, conky starts twice:
ps -eF | grep conky
mepi      2297    1955  0 113603 14912  7 08:42 ?        00:00:01 /usr/bin/conky -c /home/mepi/.conky/.my_conky_config
mepi      3088    1955  0 150574 13272  4 08:42 ?        00:00:01 /usr/bin/conky --daemonize --pause=1
  1. kill 3088 output:
ps -eF | grep conky
mepi      2297    1955  0 113603 14912  7 08:42 ?        00:00:01 /usr/bin/conky -c /home/mepi/.conky/.my_conky_config
  1. log out and log in again → conky starts with default configuration!
ps -eF | grep conky
mepi      9917    1948  0 150574 13272  4 08:49 ?        00:00:01 /usr/bin/conky --daemonize --pause=1

Could it be that KDE is trying to restore conky from the previous session and the home directory is not ready yet?

1 Like

If you turn off that autostart, does the system load custom conky, default conky or no conky?

I have one conky autostart using default configuration file

~/.config/autostart/conky.desktop

[Desktop Entry]
Type=Application
Name=Conky
Exec=/usr/bin/conky -dqp3
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Icon=conky-logomark-violet
1 Like

When I turn off autostart and kill all running conky tasks, conky did not start at login/reboot!

When I turn off autostart and perform the following script, conky starts with my configuration. After a new login/reboot conky starts with default configuration. See my previous post.

#!/bin/bash
killall conky
sleep -1
    conky -d -c ~/.conky/.my_conky_config

I suggest delete default configuration

rm ~/.config/conky/conky.conf

and replace it with custom configuration

cp ~/.conky/.my_conky_config ~/.config/conky/conky.conf
1 Like

I think this is the plan - replace that with your conky start script.

I tried to use Session Restore a while back, I just wanted to do a quick restart, but you have to restart first to enable it… and once it was enabled it did go a little crazy.

I remember now that the ‘default’ conky launched too, so I had to run my script to clean them up.

If a user wanted to load multiple conky’s with a script, they could either delete the default configuration or use one conky config in default location as a fallback

If a user wants to load one conky only at login, and uses the default location instead of a custom location, the autostart command does not need to specify location of configuration file

just one less thing that could go wrong in the autostart command, also easier to remedy if it does go wrong in future

man.archlinux.org/man/conky - YOU SHOULD KNOW

An easy way to force Conky to reload your ~/.config/conky/conky.conf:

killall -SIGUSR1 conky

Saves you the trouble of having to kill and then restart.

1 Like

Thank you for your help!

There are many ways to solve the problem!

For me, I solved my problem by modifying the script I am using as follows:

#!/bin/bash
sleep 1
killall conky
conky -dqp2 -c ~/.conky/.my_conky_config
1 Like

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