Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
View Poll Results: What's your favorite wallpaper changer?
Nitrogen seems to work okay. I usually download feh because I'm feeling a minimalist, but then I get lazy and also download nitrogen so I can just click on a picture to set as my desktop for a while.
Try feh?
Code:
while true; do
feh --bg-max --randomize ~/Downloads/*.jpg # Just some example arguments from my own machine
sleep 600 # seconds
done
In my home dir, there's a new file called .fehbg
It starts with:
Code:
#!/bin/sh
feh --image-bg black --bg-max ...
Why is the image bg set to black?
It does not seem to change when it should (I set it to every 6 seconds to test it). Also it shows a black background often.
In my home dir, there's a new file called .fehbg
It starts with:
Code:
#!/bin/sh
feh --image-bg black --bg-max ...
Why is the image bg set to black?
It does not seem to change when it should (I set it to every 6 seconds to test it). Also it shows a black background often.
maybe bad images - try opening them up in gimp and saving over top of them to exporting them and using the exported image to see if that fixes the black image.
Thank you, I will give that a try. Some of my wallpapers are also .png files. How would that be incorporated into the script?
The lazy way is to simply give a plain path to feh. feh --bg-fill ~/Path/To/Images/
If there are things inside that directory that feh can't read it will error and fail to set an image.
Otherwise, try an extended glob. feh --bg-fill ~/Path/To/Images/*+(jpg|png)
The glob matches one or more occurrences of the options only, so if there's no jpg files it doesn't supply any of those to feh in the first place. I like this solution, but this nice website http://mywiki.wooledge.org/BashGuide/Patterns informs me that extended globs might not be enabled by default, but it is on my debian installs.
Quote:
Originally Posted by linustalman
In my home dir, there's a new file called .fehbg
It starts with:
Code:
#!/bin/sh
feh --image-bg black --bg-max ...
Why is the image bg set to black?
It does not seem to change when it should (I set it to every 6 seconds to test it). Also it shows a black background often.
I think .fehbg stores the last feh command, so if feh dies (restart, logout, etc) you can simply run ./.fehbg & to restore your last desktop image. It's pretty convenient, when that's what you want.
I highly recommend reading the man pages for programs you run, when possible. You know, teach a person to fish, etc. Here's a quote from the section on --bg-max:
Quote:
--bg-max
Like --bg-fill, but scale the image to the maximum size that fits the screen with black borders on one side.
Though, I'm not sure why it says "one side". On my image, it does both sides. Huh. Well, anyway.
Since bg-max doesn't fill the entire screen, it has to put something on the sides of the image that don't fill the entire display. If you don't like that sort of letterbox effect, try bg-fill which will zoom in until the image fits the whole screen, or bg-scale which squashes the image into your screen size.
The lazy way is to simply give a plain path to feh. feh --bg-fill ~/Path/To/Images/
If there are things inside that directory that feh can't read it will error and fail to set an image.
Otherwise, try an extended glob. feh --bg-fill ~/Path/To/Images/*+(jpg|png)
The glob matches one or more occurrences of the options only, so if there's no jpg files it doesn't supply any of those to feh in the first place. I like this solution, but this nice website http://mywiki.wooledge.org/BashGuide/Patterns informs me that extended globs might not be enabled by default, but it is on my debian installs.
I think .fehbg stores the last feh command, so if feh dies (restart, logout, etc) you can simply run ./.fehbg & to restore your last desktop image. It's pretty convenient, when that's what you want.
I highly recommend reading the man pages for programs you run, when possible. You know, teach a person to fish, etc. Here's a quote from the section on --bg-max:
Though, I'm not sure why it says "one side". On my image, it does both sides. Huh. Well, anyway.
Since bg-max doesn't fill the entire screen, it has to put something on the sides of the image that don't fill the entire display. If you don't like that sort of letterbox effect, try bg-fill which will zoom in until the image fits the whole screen, or bg-scale which squashes the image into your screen size.
feh is a mode-based image viewer. It is especially aimed at command line users who need a fast image viewer without huge GUI dependencies, though it can also be started by (graphical) file managers to view an image. By default (unless arguments or a filelist are specified), feh displays all files in the current directory
feh supports filelists, various image sorting modes, image captions, HTTP and more. Configurable keyboard and mouse shortcuts are used to control it.
You set it by right-clicking on the image to choose from File - Background - Set Tiled, Set Scaled, Set Centered, or Set Filled.
try using the semi-colon it is somewhat of a standard item to indicate a second command, or a separation between commands.
too, sleep defaults to seconds he could have easily put 10m instead of sleep 600
Code:
600/60=10
what feh is lacking is the ability to size the image to the users specifications. The user has to just settle with whatever the people that wrote feh decided on how big or small that image is shown on the desktop.
All of that programming they put into it to get it to do what it does and. that's it. That's all they got for a selection on how to display an image to a screen for background.
mod:
to better anser your question on getting it to use png
but it is only showing the image in a window on my desktop. not as a root image on my desktop.
and seep is not working. ( because that is not actually written properly) just hacking away at this.
but this is my "first" time using this feh in a long time, many years ago I tried it and didn't agree with how they where displaying the image on the back ground (desktop) so I did something about it.
that's better; run this in your command line and change the path to wherever you've got your images at.
Code:
while true ; do feh --bg-max -z /home/userx/Pictures/vlc-images/* ; sleep 1; done
The wallpapers are being changed but only a black background is shown. If I click on a blank area of the desktop and hold down and move around - I can see a bit of the wallpaper.
maybe bad images - try opening them up in gimp and saving over top of them to exporting them and using the exported image to see if that fixes the black image.
never mind you told it too.. gezz
Hi BW-userx.
I'd need to do that with loads of images - not feasable. Anyway I doubt the images are bad as they work fine with Variety.
The wallpapers are being changed but only a black background is shown. If I click on a blank area of the desktop and hold down and move around - I can see a bit of the wallpaper.
so when an image is set to your background, only that sometimes it is black and when you move your mouse pointer around you begin to see some of the image? if yes,
then that sound like a redraw problem. your desktop is not being redrawn properly for whatever reason(s) when it changes images.
so when an image is set to your background, only that sometimes it is black and when you move your mouse pointer around you begin to see some of the image? if yes,
then that sound like a redraw problem. your desktop is not being redrawn properly for whatever reason(s) when it changes images.
I think I will just stick with Variety - simple and works.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.