I posted earlier about getting Conky to be transparent in KDE. Unsetting and resetting the "Show icons on desktop" and "Allow programs in desktop window" options would allow Conky to look correct when transparent. Otherwise it would be a black box.
This is OK but it's a hassle to do this every time I restart KDE. Via various posts on the Gentoo forums I finally realized WHY this works (I think). Conky's pseudo-transparency works by reading the root window, and then compositing itself onto that. The root window is apparently not what normally shows in KDE when you're looking at your desktop background. KDE apparently draws another window on top of the root window and displays the desktop window there (including your background wallpaper and icons). Underneath that is the REAL root window, and it's entirely blank by default. Conky sees that real root window and composites itself on top, resulting in blackness.
When you tell KDE not to "Show icons on desktop", apparently KDE then defaults to setting the background of the REAL root window. So switching this option on and off results in the real root window's appearance matching KDE's "fake" root window.
Interestingly, in KDE if you do this:
- Set "Show icons on desktop" to true.
- Set a background.
- Set "Show icons on desktop" to false, then back to true.
- Change your background.
- Start a transparent Conky.
Conky will be properly transparent, but it will use the FIRST background you selected, not the second. This leads me to believe I'm right.
So the real way to get a nice transparent Conky in KDE is to set the background of the root window using a program like feh.
ppurka posted in this thread a great automated way to do this in KDE:
feh --bg-scale `dcop kdesktop KBackgroundIface currentWallpaper 1`
If you're like me and use centered wallpaper, use --bg-center instead. Incidentally this is the relevant section of my Conky config file:
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
41 Comments
First, I start conky without config file, and it was working good - icons were on my desktop and it has transparent window. So, I had been adding lines from config, which I know it made icons hide and when I added 'double_buffer yes', icons disappeared. Unfortunately - without double buffering conky blinks on my desktop, what looks awful...
Ok - I set own_window like you, wallpaper using feh and double buffering on. Now everything is OK :) THX
Brilliant! I had some trouble seemingly due to the fact that my wallpaper had a space in the filename, but I changed it, reset the default wallpaper, ran feh, and all is well. You have no idea how long I was looking for this solution.
Glad it could be of help.
Genius, you are simply genius! hehe
Just to thanks your contribution. It works in opensuse 10.2 + kde3.5.5 + beryl 0.1.4 To make it works at start, just make a script in your $HOME/.kde/Autostart
Thx
i found an easiest way to have conky transparent without installing / using feh on KDE :
OLDWALLPAPER=
dcop kdesktop KBackgroundIface currentWallpaper 1killall conky sleep 10 && conky -d dcop kdesktop KBackgroundIface setBackgroundEnabled false sleep 1 && dcop kdesktop KBackgroundIface setBackgroundEnabled true dcop kdesktop KBackgroundIface setWallpaper "$OLDWALLPAPER" 7Looks similar to what I was doing by hand before I started with feh. That's a good idea.
Sorry to throw a spanner in the works... is there a hack for those using the 'gradient' desktop background feature i.e. wallpaper set to 'none'?
For what it's worth, appending this line to the bottom of .conkyrc works as well as autostarting feh; but since it only executes when conky launches, I think it's a little more graceful.
${exec feh --bg-scale `dcop kdesktop KBackgroundIface currentWallpaper 1`}Yes, I'm slightly obsessive at times. =)
Ed Daniel: I would guess you could theoretically accomplish the same task by using Esetroot or gsetroot or some other ?setroot utility capable of setting gradients.
Thanks for the solution, conky drove me nuts trying to get it properly transparent.
Thanks Brian and calraith. I ended up using feh from within conky with a direct link to the wallpaper since the dcop command wasn't working properly.
NOTE with Beryl/Compiz:
If you're going to put the command in your .conkyrc file use $texeci instead of $exec. Personally for me on kdemod + compiz-fusion it caused some lag when using the compiz-fusion toys. Something like this
${texeci feh --bg-scale
dcop kdesktop KBackgroundIface currentWallpaper 1}Actually scratch last post. my bad.
:)
Even if I use feh and my conky gets transparent, after I click anywhere on the screen, conky diseappears. But I can still find it in ps -auxe =(
Ok it seems I've solved my problem. I have to change: own_window_type desktop
to
own_window_type normal
for the beryl+emerald+kde users:
own_window yes own_window_transparent yes own_window_hints desktop,undecorated,below,sticky,skip_taskbar,skip_pager own_window_type override
and use the feh recipe. now they stick to the fake KDE root background and don't drag either.
oh my god thank you my saviour i finally can get some sleep!!! this was nagging me ever since i discovered conky, thanks a lot once again
Woks for me, thank you very much :)
Works for me, thank you very much :)
I googled upon this site, I use gnome, with the default conkyrc it didn't display icons on the desktop. This line: own_window_type desktop seemed to fix the icon issue.
This works for me, but after I instantiate the transparent conky, if I click on the desktop, conky disappears.
How can I fix this?
I use your "feh --bg-scale
dcop kdesktop KBackgroundIface currentWallpaper 1" for my conky for a long time but now with Kde4 it is not working and I know why... dcop in kde4 is replaced by d-bus and I don't know how replaced dcop by d-bus. Can you help me?You know (or not...) but with kde 4 ?feh --bg-scale
dcop kdesktop KBackgroundIface currentWallpaper 1? don't work because dcop is replaced by dbus. And with dbus I don't know how replace this command. But I find an other way.1) Install feh
2) Create a script in /home/~/.kde4/Autostart with:
!/bin/bash
eval
cat $HOME/.fehbgconky -c .conkyrc/.conkyrc1 &adapt path of your conkyrc (mine is conkyrc1 because I have a conkyrc for gnome) and give it executable
3)Add in your .conkyrc file just under "TEXT":
${execi 100 feh --bg-scale "
grep 'wallpaper=' ~/.kde4/share/config/plasma-appletsrc | tail --bytes=+11"}Adapt the path of your plasma-appletsrc (in Ubuntu there is in .kde4, but with fedora in .kde...) I use execi 100 because when I change wallpaper, the name of new wallpaper appear after 1 minute in ~/.kde4/share/config/plasma-appletsrc ( I don't know why...)
And that work for me with Fedora9 and for other with Ubuntu. If anybody know how use feh with dbus in kde4...
Have you seen my reply #25 in "http://briancarper.net/2006/08/25/transparent-conky-in-kde-part-2/"?
Sorry, I forgot to respond. I'm going to have to try this now that I put KDE4 on my laptop. Maybe there is a dbus equivalent command to set or get the background filename.
I don't know if there are and equivalent command but I search with qdbusviewer and I don't find an entry for wallpaper...
You know that I am not able to use dbus, but I have solution with inotify (this package is in fedora and I think it is also in ubuntu... In resume I delete the "${execi 60 feh --bg-scale "
grep 'wallpaper=' ~/.kde/share/config/plasma-appletsrc | tail --bytes=+11"}" line in my conkyrc and I change the script in my /home/dominique/.kde/Autostart like this: Code:!/bin/bash
feh --bg-scale "
grep 'wallpaper=' ~/.kde/share/config/plasma-appletsrc | tail --bytes=+11" conky -c .conkyrc/.conkyrc1 & while inotifywait /home/dominique/.kde/share/config/plasma-appletsrc; do feh --bg-scale "grep 'wallpaper=' ~/.kde/share/config/plasma-appletsrc | tail --bytes=+11" doneAnd that work for me... (with 30 seconds of latency when I change wallpaper)
yeah the trick from post 18 worked for me too
thanks
Worked fine for me. Had to change 'own_window_type normal' though. Thanks - Been annoying me for a long time :-)
Arrgh! this doesn't work with kde4 in a multimonitor setup.
I suspect it is both because "grep ?wallpaper=' ~/.kde/share/config/plasma-appletsrc" returns multiple lines, (one for each screen's wallpaper.)
Also, is feh even multi-monitor capable?
That's real transcendental! I think, this also will be work as cron task, as i have slideshow. But, if conky be real transparent, with rendering against program background too :)
no, no no .. there is no need to hack the desktop app and mess around with feh like this. The below instructions are for kde4 with desktop effects; in kde3 the process is a bit different but I'm sure it supports all the same per-window effects.
In kde4, run conky normally (as a window), then right-click its menu title and from "Advanced" select:
You'll then have to press Alt+F3 to get the menu back, and in "Special window settings" you will probably want "Accept focus" disabled. There are heaps of other options in this area, so keep experimenting.
Then save conky to your KDE session, and you're done! Much better than hacking the desktop, right?
I should add: once you've disabled the menu and focus, to tune the conky window's behaviour you'll have to go into system settings -> window behavour -> window specific.
@anonymouse...
Conky doesn't show as a normal window for me in KDE4
Is this part of my .conkyrc wrong?
This is the number of times Conky will update before quitting.
Set to zero to run forever.
total_run_times 0
own_window yes own_window_transparent no own_window_type override own_window_type desktop
own_window_type normal #use this if you want a nice shadow to appear around conky
If own_window is yes, these window manager hints may be used
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
Use double buffering (reduces flicker, may not work for everyone)
double_buffer no
How do I set it so I can work with it like you say?
Can someone please post a pastebin link to a WORKING KDE4 .conkyrc so we can work with it like anonymouse is stating??
Sorry to bother again, but how do you "save conky to your KDE session" ?
I have it working in windowed mode with these settings:
own_window yes own_window_transparent no own_window_type normal double_buffer no
I have all the other window settings how I want. I just wish I knew how to "save it to my session" now. :(
The command:
xsetroot -solid grey // use your desktop color here instead of "grey"
does all the job!
BTW: see your /usr/bin/startkde and look for xsetroot.
NO NO NO !
It's even more easier !!!
simply put : "own_window no" and it will start working transparent in KDE (I use Slax and KDE3.5, also tested in Xfce/Fluxbox/e16).
cheers!
Thanks a lot for this post. I think better use zero instead of one in option of currentWallpaper. If you put 1 feh made only picture from first desktop as fake-root. Instead of this 0 is wallpaper of current desktop.
feh --bg-scale `dcop kdesktop KBackgroundIface currentWallpaper 0`in .conkyrc
${exec feh --bg-scale `dcop kdesktop KBackgroundIface currentWallpaper 0`}A last we have that conky set
Speak Your Mind
Preview
Commenting Help
Email / Avatar
No HTML allowed!
All HTML is auto-escaped. Use Markdown. Examples:
code in backticks