Conky not autostarting on boot – Debian 8 (jessie)

Posted on

Problem :

I can’t get Conky to autostart on boot.

Heres the init-script I’ve got:

#! /bin/sh
# /etc/init.d/autoconky

### BEGIN INIT INFO
# Provides:          autoconky
# Required-Start:    $remote_fs $syslog $network $time
# Required-Stop:     $remote_fs $syslog $network $time
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO

# The following part carries out specific functions depending on arguments.

case "$1" in
  start)
    sleep 10
    conky -d -c ~/.conkyrc
    ;;
  stop)
    pkill conky
    ;;
  *)
    echo "Usage: /etc/init.d/autoconky {start|stop}"
    exit 1
    ;;
esac

exit 0

I’ve added the scrit to autostart using: update-rc.d autconky defaults and the script do run on startup, but conky doesn’t start.

By adding mkdir ~/conkyTest to the script (see example below) i could confirm that the script actually was running on startup, and it was.

...    
case "$1" in
  start)
    sleep 10
    mkdir ~/conkyTest
    conky -d -c ~/.conkyrc
    ;;
...

I can run /etc/init.d/autoconky start and it start without a problem.

I’ve tried different sleep xx, from 3 – 60 and I also tried conky -p x 3 – 60, all without any luck. Any idea?

Solution :

If you’re under gnome, you can try this simple way as explained here; works nice for me:

  1. Create a file named conky.desktop in /usr/share/gnome/autostart/
  2. Copy and add the lines you will find on the link.
  3. chmod 777 /usr/share/gnome/autostart/conky.desktop
  4. Maybe you will have to tweak the line that contain Exec=conky -d to fit your conky’s configuration.
  5. Log out and log in again.

Leave a Reply

Your email address will not be published. Required fields are marked *