Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In Ubuntu Natty and in Fedora 12, I have urxvt (with 256 colours), and use ImageMagick (display -window root [...]) to set the root window to a picture. When I use the transparency (-tr) option on urxvt, I get the X11 login screen background (The pink/purple one in Ubunutu, the Blue one in Fedora) and not the image that is currently on the root window. See picture at the bottom -- taken from Ubuntu but similar to Fedora.

Note that the same problem exists if I run gnome-terminal and set its transparency.

I suspect that ImageMagick is not drawing on the right X11 layer but I (and google) cannot figure out what the right option is.

Could the problem be with either the xorg configuration or with window composition?

screenshot

I would be happy to use something else than Imagemagick as long as I can re-size the images on the fly (so it keeps its current aspect ratio and fits within the visible screen area) and that I can centre the image on the bottom right corner of the screen.

share|improve this question
    
Are you sure imagemagick actually changes the root image, and doesn't simply overlay it? What happens if you use imlibsetroot or similar? –  Chris Down Sep 22 '11 at 10:11
    
Well, it says in the documentation that it displays on the "root" window via "-window root". Other programs (qiv for example) do the right thing but do not allow me to position the images at a random location or to scale it thus why I am not using it. –  Sardathrion Sep 22 '11 at 10:15
1  
"Displays" is ambiguous. Somehow the other root image is being kept, probably because it is not being changed, but it is simply having an overlay applied. –  Chris Down Sep 22 '11 at 10:17
    
Any idea for a fix? –  Sardathrion Sep 22 '11 at 11:20
1  
Like I said, try using imlibsetroot and see if it helps. –  Chris Down Sep 22 '11 at 11:39

3 Answers 3

up vote 1 down vote accepted
+50

I've had a similar problem with awesome window manager as well as urxvt, when ImageMagick was used to set the background. It got quickly resolved with feedback from the author of awesome - you can see the archive of this conversation on gmane archives - here and further on here.

The solution was to change the background setter and I chose to use habak because it was the lightest one. You can also use other, like feh or Esetroot (belongs to Enlightenment WM). I think I would recommend you to try feh first, since it seems to be packaged for many distros.

Side note: In case someone wanted to try out many different bg-setters, here's a list of those that awsetbg (bg-setting wrapper script from awesome) tries to use:

Esetroot habak feh hsetroot chbg fvwm-root imlibsetroot display qiv xv xsri xli xsetbg wmsetbg xsetroot

Note that some of those only come shipped with bigger packages.

Edit: Looking at xsri manpage, I think it might provide best flexibility for your needs.

share|improve this answer
    
None of those tools allow me to resize and move the final image on the root window. –  Sardathrion Dec 19 '11 at 9:05
    
I'm sure habak does, I use it on a dual-monitor setup. –  rozcietrzewiacz Dec 19 '11 at 9:07
    
Apparently, it can indeed. It fails on one thing which is keeping the image to a maximum scale. Still, better than the alternative. –  Sardathrion Dec 19 '11 at 9:58
    
xsri does the job! Many thanks indeed. –  Sardathrion Dec 19 '11 at 13:39
    
Oh, great :) Your comment arrived just as I was suggesting for you to try it... –  rozcietrzewiacz Dec 19 '11 at 13:39

Well, since xsri is no longer maintained, this is now the solution to the problem: use convert to convert all images so that they are the right size and the right format, save them in another directory and use feh to display them. Very inelegant indeed but works.

#!/bin/sh
# Run this in your image directory
dir=$HOME/wallpapers
for file in *
do
    echo "Doing $file"
    convert -resize '1600x1200>' -extent 1600x1200 -background '#000000' \
        -gravity SouthEast  $file $dir/$file
done

Note that the resize option must be before the extend one.

Then use feh or whatever and centre the image on your display. Meh.

share|improve this answer

I may be wrong, but did you try to set the image with xli?

xli -onroot myimage.png

The man page says

NAME
       xli - load images into an X11 window or onto the root window

SYNOPSIS
       xli [global_options] {[image_options] image ...}
       xli [global_options] [image_options] stdin < image

DESCRIPTION
       xli  displays  images  in  an  X11  window  or loads them onto the root
       window.  See the IMAGE TYPES section below for supported image types.

       If the filename stdin is given, xli will read the image  from  standard
       input.  
share|improve this answer
    
Do you have a url for downloading it? With MD5 checksums if possible... Thanks. –  Sardathrion Dec 19 '11 at 7:58
    
On Ubuntu just execute "sudo apt-get install xli" on fedora you can install (but maybe you already have it) xloadimage and you can use the same options. yum install xloadimage –  tmow Dec 19 '11 at 23:36
    
You can also use xv, that normally comes as default xv -root -quit -max /usr/local/share/wallpapers/FreeBSD/a_1600x900.jpg –  tmow Dec 19 '11 at 23:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.