17

I have a conky setup that I've used on a number of desktops (here's the conkyrc). It works fine in Ubuntu Unity, XFCE, Gnome and Openbox, but not Lubuntu (LXDE). The problem is that I cannot get it to stay on the Lubuntu LXDE desktop reliably. Either the conky window disappears if I click the desktop or if I minimize all windows (show desktop).

I've tried all variations in the configuration file for "own_window", "own_window_colour", "own_window_transparent" and "own_window_type" and have Googled quite a bit to resolve this. If it edit the conkyrc file and set the own_window_type to "normal", conky disappears if I minimize all windows. If I set it to "desktop" it disappears if I click anywhere on the desktop. If I use "override" it doesn't display at all. And the other options don't work well for obvious reasons.

On another Ubuntu Unity install I had a similar problem, but got around it by using Compiz Config Settings Manager to ignore my conky window. On my netbook Lubuntu install I don't have compiz installed.

How can I get conky to stay on my desktop.

19 Answers19

24

Seems like setting window type to desktop is not enough sometimes.

Try:

own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

Got it from here.

Works for me in XFCE. I'm guessing it'll be fine for lxde/openbox as well.

llaen
  • 364
8

This config works, on Gnome and Cinnamon and is the way to do it.

own_window yes
own_window_transparent yes
own_window_type dock
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 100
gap_x 940
gap_y 20

The last 2 attributes absolutely position it on screen and need to be changed for your configuration. A working complete configuration file can be found here on Github.

Edit: From the comments: If own_window_type set to "dock" doesn't work well for you, try "override" and "normal" as well.

3

The above did not work for me. What did work was to set the "own_window_type" to "normal" in /etc/conky/conky.conf.

own_window_type normal

As per this thread: http://ubuntuforums.org/showthread.php?t=2039399

Grim
  • 31
  • 1
2

The problem with using conky with LXDE is that PCManFM handles the desktop in a way unlike any other desktop. LXDE is essentially Openbox with a desktop layered on by the file manager (pcmanfm) if you removed pcmanfm in favor of another file manager, you would no longer have LXDE, you'd essentially have Openbox with the LXDE panel. How is this relevant? Well, LXDE's desktop is handled more like a window by the window manager, meaning just like when you have several windows open, and you click on one of them, it brings it into focus. This is exactly what's happening with Conky. When you click on the desktop, it places conky beneith the desktop, which is as I explained, handled more like a window. In my case, this is the fix:

own_window_class Conky
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

Now, if you use the panel plugin to minimize all windows, it will still minimize conky, but this fix keeps conky from disappearing under normal circumstances.

Volker Siegel
  • 13,295
2

I've done tons of research on this myself and it seems there are very few workarounds and even fewer that work well:

  • You could set conky to a dock or panel window.
  • You can set it to a normal window and just avoid using the show desktop plugin/keybind.
  • I even tried using the -w argument for conky to get it to draw to the fake desktop/PCManFM window, but that will cause your desktop to redraw as often as conky updates = messy.
  • If you can live without desktop icons, you can set conky to a desktop window and then simply turn PCManFM off by typing pcmanfm --desktop-off at the terminal.
  • You could let feh or some other program manage the desktop

I didn't like any of the above options. So, like Redsandro, the workaround I settled on was to have conky as a normal window (skip_pager,skip_taskbar,below,undecorated of course) and write a simple bash script and make a .desktop file for it so I could include in my panel to take the place of the Show Desktop plugin. It uses wmctrl so you'd have to download it. Also it unfortunately doesn't minimize all windows, it only shades them. But for my needs, it suffices:

#!/bin/bash
var=($(wmctrl -l | grep -o "0x[[:alnum:]]\+"))
for v in ${var[@]}
do wmctrl -i -r $v -b toggle,shaded
done
exit 0
Toni
  • 46
1

The accepted answer does not account for "Show Desktop".

You can use the hack I explained in this answer to show conky after Win+D for Show Desktop is pressed:

#!/usr/bin/env bash
zenity --info --text "Remapping Conky..." &
pid=$!
sleep 0.3
kill $pid
xdotool windowmap `xdotool search --classname 'conky'`
Redsandro
  • 3,764
1

EDIT:

better: as of 12.04 Precise and all later versions of Ubuntu (confirmed till 16.04 xenial), you can achieve the same as devilspie (below) with compiz -> Windows Rules. I used the class match there, its self-explanatory. Works with my linked Super+Home-script, too.

Here is my little contribution after wasting a couple of hours with this for anyone who couldn't sort it out with all the above (tested with Ubuntu 16.04):

Quick Solution:

  1. Add a 'own_window_type dock' line in the conkyrc.txt in the respective directory in ~/.conky/ (to not have it disappear on desktop-click)
  2. Install devilspie
  3. Create a rule in devilspie with the 'match' pattern window_name 'contains' conky (no capital c - it matters). Actually, with the provided "Get" Button there you can use any match pattern that works.
  4. as actions, select 'skip_tasklist','unminimize' and if you want to have it on all workspaces, also 'stick'.
  5. Thats it.

Do check 'Run devilspie at startup' obviously.

sideeffect: the Conky Manager Window will behave similiar when open depending on the match pattern, shouldn't be any problem, though.

My problem was this:

'own_window_type override' created the problem that the changing items of the conky wouldn't substitute but rather be drawn on top of older values - ugly and also illegible within seconds.

'own_window_type desktop' just didn't do the trick.

'own_window_type dock' in conjunction with devilspie solved the original problem, but wouldn't play nice with this nifty little script to add a 'show desktop but keep active window stay up' - hot-key like Windows Win + Home. EDIT: the lastmentioned somehow stopped working.. I'm out :-|

Hope I helped someone, gimme a thumbs up, I'm new here ;-)

My sytem: UBUNTU Xenial Xerus 64 bit.

Maximo
  • 11
0

I experienced the same problem in LXDE when clicking on LXPanel's "Iconify All Windows" hides the Conky's window as well. I fixed it with wmctrl.

Install wmctrl

sudo apt install wmctrl

Find the name of the Conky's window

wmctrl -l
0x03200001 -1 Host conky (Host)

To bring it back run:

wmctrl -a 'conky (Host)'

I wrote in Python a simple script that every 50 milliseconds unhides Conky and put it at LXDE startup:

bring_conky_back.py

#!/usr/bin/python

import time, os

while True:
    os.system("wmctrl -a 'conky (Host)'")
    time.sleep(0.05)

Also in .conkyrc these lines might be needed:

own_window = true,
own_window_type = 'normal',

It works awesome.

0

The only way I could get conky to work in Plasma desktop was to use KDE's window rules. (The conky flags shown here were enough to achieve the same effect on XFCE).

own_window = true,                          -- create your own window to draw
own_window_argb_value = 100,                    -- real transparency - composite manager required 0-255
own_window_argb_visual = true,              -- use ARGB - composite manager required
-- own_window_class = 'Conky',              -- Manually set the WM_CLASS name. Defaults to "Conky".
-- own_window_colour = '#ffffff',           -- set colour if own_window_transparent no
own_window_hints = 'below,undecorated,sticky,skip_taskbar,skip_pager',                  -- if own_window true - just hints - own_window_type sets it
own_window_transparent = true,              -- if own_window_argb_visual is true sets background opacity 0%
own_window_title = 'system_conky',          -- Manually set the window name. Defaults to "<hostname> - conky".
own_window_type = 'dock',                   -- if own_window true options are: normal/override/dock/desktop/panel

Finally for KDE, I needed to also declare the following window rule:

enter image description here

For more tips on configuring conky, see https://www.mankier.com/1/conky#Configuration_Settings

smac89
  • 1,085
0

You could try to add a script that executes on startup.

For example:

#!/bin/bash
conky ;

(don't forget to chmod +x it ;)

user981916
  • 191
  • 1
  • 3
0

For Unity my problem was solved by using

own_window_type override
0

For Lubuntu with LXDE:

own_window yes
own_window_class Conky
own_window_transparent yes
own_window_type desktop
double_buffer yes

If the conky window disappears when press button minimize all windows (show desktop) go in Settings->Default applications for LXsession->Running applications->Desktop and select "feh" instead "filemanager"

Work for me in Lubuntu 13.10.

Eric Carvalho
  • 55,453
0

Linux with Mate/Gnome2 GUI Ubuntish ;)

use_xft yes
..............
.........
.....
..........
own_window_type dock

Will dock on top screen, disaffecting any desktop actions.

Put to position setting:

gap_x ...
gap_y ...  

Depending from your resolution.

muru
  • 207,228
0

I've done tons of research on this myself and it seems there are very few workarounds and even fewer that work well.

  • You could set conky to a dock or panel window.
  • You can set it to a normal window and just avoid using the show desktop plugin/keybind. I even used the -w argument for conky to get it to draw to the fake desktop/PCManFM window, but that wil cause your desktop to redraw as often as conky updates = messy. If you don't mind have no icons, you can simply turn PCManFM off by typing pcmanfm --desktop-off at the terminal.

Like Redsandro, the way got around this was to write a simple bash script and make a .desktop file for it so I could include in my panel to take the place of the Show Desktop plugin. It uses wmctrl so you'd have to download it. Also it unfortunately doesn't minimize all windows, it only shades them. But for my needs, it suffices:

#!/bin/bash
var="($(wmctrl -l | grep -o "0x[[:alnum:]]\+"))"
for v in ${var[@]}
do wmctrl -i -r $v -b toggle,shaded
done
Toni
  • 46
0

This works in Lubuntu 14.10

own_window yes
own_window_hints undecorated,below,skip_taskbar
background no
own_window_transparent yes
0

I know this thread is old, but for anyone else still struggling with this issue I just wanted to add that grims' answer works for me, with a small caveat.

In /etc/conky/conky.conf

own_window_type normal

and in .conkyrc or the theme file:

own_window_type desktop
own_window_hints undecorate,sticky,skip_taskbar,skip_pager

After some trial and error, this was the only combination that I could get to work (I am using compton for transparency). Note, there is no "below" setting in own_window_hints, as although that still works it causes conky to disappear and reappear (flicker) after a few seconds when showing the desktop. At least that was my experience.

HTH

0

Set background=false in .conkyrc and be sure you're not autostarting Conky with the -d flag. I tried every other suggestion I could find, and sometimes they would work and sometimes not, and even if they worked it was only for a little while.

Note: if you accidentally minimize all windows, use Super+D to get Conky back.

TheOdd
  • 3,012
Clint
  • 11
-1

My solution to this problem is add these two lines in your bash script

conky -c /home/ajay/.conkycolors/conkyrc >/dev/null 2>&1 &
conky -c /home/ajay/.conkycolors/conkyrc >/dev/null 2>&1 &

-1

In Unity don't change anything, just paste in terminal:

gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ hide-skip-taskbar-windows false
hg8
  • 13,582