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.

3
  • 1
    Conky doesn't seem to play well with Openbox. Aug 29, 2012 at 8:06
  • Did you try the "panel" mode?.. BTW I also have similar problems with conky under Unity; can you please tell me how you used Compiz Config Settings Manager to ignore conky window?
    – Sadi
    Mar 7, 2013 at 6:35
  • 1
    Sadi: The following conky setting should normally work for Unity: own_window yes own_window_transparent yes own_window_type normal own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager If you have problems with compiz (and weird shadows), use Compiz Config settings manager to set the following: * Under "Window Decoration" area, set the "Shadow windows" field to any & !(name=Conky) Note that panel mode is intended to let conky behave like a panel. This means that normally windows won't cover it and it should only be docked to the side of your screen. This isn't what I wanted. Mar 8, 2013 at 8:25

19 Answers 19

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.

6
  • 6
    How is this answer accepted? In LXDE, clicking the desktop makes conky disappear.
    – Redsandro
    Jun 23, 2013 at 15:29
  • I also have no idea why that is. The question (not its title though) explicitly states that the issue is present ONLY in LXDE and the author ask for help to resolve that particular issue. The reply marked as "Answer" does not answer the question. I landed here while looking for an answer to the exact same problem but with Debian (latest stable), running LXDE. Oct 22, 2013 at 19:38
  • this doesn't help. it keep disappearing
    – catch23
    Dec 29, 2013 at 10:03
  • For simple Ubuntu with Unity own_window_type override works just fine
    – MInner
    Jun 19, 2014 at 1:10
  • 2
    No, it doesn't. Not for me anyway. It stops the disappearing widgets but then there's something wrong with the screen refresh for the characters that are getting drawn. They get fuzzy after a while and then you can tell it's because there are characters overlaying characters.
    – user447607
    Apr 16, 2015 at 15:51
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.

5
  • own_window_type dock isn't always optimal as the conky window will be treated like a dock. Mar 8, 2013 at 8:12
  • 1
    @aspersieman I found nothing different with it so far. It is the only setting which prevented it going off when clicking the desktop or super+windows+D. Mar 8, 2013 at 8:40
  • Try own_window_type override and changing the setting in Compiz Config Settings Manager I described to Sadi above. Mar 10, 2013 at 14:32
  • dock to me makes it a permanent part of my screen, like panel, i.e full screen windows cant cover it
    – Karthik T
    Apr 26, 2014 at 6:20
  • own_window_type = 'dock' (it's 2022, Conky uses a LUA file for it's config now, so the syntax has changed) worked for me on Manjaro KDE Plasma. May 28, 2022 at 3:17
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

2
  • 1
    I also needed "own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager` on LXDE. Nov 14, 2013 at 12:55
  • This causes the "minimize all windows (show desktop)" case as in the OP, even with the addition of @MotiejusJakštys 's line
    – Karthik T
    Apr 26, 2014 at 6:19
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.

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
1
  • Creating a startup script with the first action pcmanfm --desktop-off and then launching conky solved it for me. I can live without pcmanfm's desktop features :) Thanks!
    – codeman48
    Jun 1, 2019 at 16:05
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'`
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.

0

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

For example:

#!/bin/bash
conky ;

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

3
  • Thanks for your answer. Unfortunately though, I've already tried this and it doesn't change anything. I've even tried to make it sleep for a few seconds. Any other suggestions? Aug 29, 2012 at 8:21
  • sorry dude no other suggestion. i have solved mine this way but if i remember correctly i was using gnome.
    – user981916
    Aug 29, 2012 at 9:18
  • No worries. Thanks for your help though. Aug 29, 2012 at 9:22
0

For Unity my problem was solved by using

own_window_type override
1
  • Correct! This does allow you to keep the widgets on the desktop when the desktop is clicked or show desktop (Ctrl+Super+D) is tried. HOWEVER after show desktop, I see I now have duplicates of my conky widgets where the old one has a fixed time stamp and the new overlay has changing time stamps. In other words, its a layered mess! Am I forgetting to add something else?
    – Brad Horn
    May 17, 2015 at 4:14
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.

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

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.

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.

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

-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
  • The question includes 3 different problems: 1) conky disappearing when desktop is clicked in "desktop" mode, 2) same when all windows are minimized (using Show Desktop command) in "normal" and "conky" modes, 3) conky not displayed in "override" mode... Which problem does this solve? What does it do really?
    – Sadi
    Mar 7, 2013 at 6:25
-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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .