How to autostart conky in Xfce?
I want to autostart Conky in Ubuntu 12.04/Xfce. I tried to start this script with "automatic starting applications" in sessions options:
sleep 6
conky
But it does not work.
Solution 1:
You don't need a script for an easy command like that.
Option 1: With GUI
You can add a new entry with the GUI xfce4-session-settings
, in Settings > Session & Startup > Application autostart :
Name = Conky
Comment = Autostart conky at login
Command =
sh -c "sleep 10; conky;"
Option 2 : Manually (commandlines)
You can add a new file.desktop (autostart files) in $HOME/.config/autostart :
mousepad ~/.config/autostart/conky.desktop
Paste this in the Mousepad window :
[Desktop Entry]
Type=Application
Exec=sh -c "sleep 10; conky;"
Name=Conky
Comment=Autostart conky at login
Save.
Option 3 : with only one commandline (TADAAAM!)
echo -e '[Desktop Entry]\nType=Application\nExec=sh -c "sleep 10; conky;"\nName=Conky\nComment=Autostart conky at login' | tee > ~/.config/autostart/conky.desktop
Solution 2:
Provided that you installed your conky correctly use the following:
Name a file .conky_startup and put the following lines in it:
#!/bin/bash
sleep 10 && conky ;
Put the file in your home directory (the directory with your username).
Next go to Session and Startup and the tab Application Autostart , create a new entry with Add and fill in a name and a discription and the path to .conky_startup. Than reboot and conky should start. You might have to change the sleeptime a bit for the best result.
Solution 3:
Using Conky's built in -p
flag is the easiest and most logical option:
Use the XFCE Settings Manager to add Conky to the list of applications that automatically get started by going to "Session and Startup" and clicking on the "Application Autostart" tab.
In the "Command" field, enter /usr/bin/conky -p 8
to give Conky an 8 second pause before starting.
As noted elsewhere, this is just a simple point and click way of creating a *.desktop
file in $HOME/.config/autostart
.
If this file already exists (i.e., if it had previously been created), the Exec=*
line can be modified in any text editor to read either /usr/bin/conky -p 8
or conky -p 8
.
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Conky
Comment=System Monitor
Exec=/usr/bin/conky -p 8
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false
Solution 4:
So I was having the same trouble starting Conky and came up with this after looking at various posts on the net, I'm not sure how sleep was a good choice as it is a system function so nothing happens/executes for that duration.
This solution is ideal for Xfce4 users, no other desktop testing has been performed however it should work, so comment if it works on other desktops.
1, Create a launcher on your desktop for Conky. (right click the desktop)
2, Use the -p switch and specify a start pause duration, 15 seconds works well, so conky -p 15 .
3, If you use other switches when you start Conky add them first like, Conky -dqp 15 .
4, Save your launcher and add it to your ~/.config/autostart user directory.
5, Logout and log back in and what Conky appear.
Hope this helps... enjoy