You are not logged in.
I read the feh manual in depth and have modified my "wallpaper" menu execute-command to this:
feh -t -E 180 -y 180 -. -r /home/<user>/Pictures/wallpapers
This will start feh and load 180 x 180 pixel thumbnails from my wallpaper directory (and any other directories that have a symlink there). When a link is clicked that image will be loaded into a new window where you can then right click on it and set as your wallpaper.
feh seems a little basic at first glance but there is a boat load of options on how to run it. Play around with it and set it up pretty much any way you want.
Last edited by makarovnik (2019-04-12 14:35:15)
Offline
feh seems a little basic at first glance but there is a boat load of options on how to run it. Play around with it and set it up pretty much any way you want.
word!
#!/bin/dash
# $@ = list of folders to be searched for images (including subfolders)
# recursive? add -r
feh -r -t -P -N --title Wallpapers -g 1000x900 -W 1008 -E 125 -y 200 -J 20 --index-info '' \
--action "feh -g 1008x630 %F" "$@"
poor man's nitrogen (just add . ~/.fehbg to autostart).
Last edited by ohnonot (2019-04-13 04:57:07)
Offline
That looks promising but as you prolly guessed I only have basic understanding of script files and how to create them (I'm a newbie).
How do I run that? Do I save that as a script file eg. ~/bin/poor_mans_nitrogen.sh or ~/.config/scripts/feh/poor_mans_nitrogen.sh then make it executable and call it from the menu?
Last edited by makarovnik (2019-04-12 19:46:34)
Offline
~/bin is already in your $PATH on BunsenLabs, so make the script executable and move it and call it from there by name (just feh.sh or whatever, no bash needed beforehand).
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
OK I thought so. I'm catching on I think. The script works, sort of.
The issue is: After I click on a thumbnail, it opens the image file in a new window as it should. When I close that window it goes back to the thumbnail window but now the thumbnail image for the file I just closed is "blacked out" with an opaque blue background and a white "X" on it. See attached image_1. You will see this on the three thumbnails I opened then closed.
Last edited by makarovnik (2019-04-12 22:31:43)
Offline
^ that's one of the quirks of feh.
i don't see any rhyme or reason for it, but there it is. somebody must have coded that in.
glad you got it working.
i have shortened the script a little, there was at 2 rather needless options in there.
I have this in my menu.xml.
Offline
There is another thing that feh is doing that is weird.
Everytime I use feh to open a group of files in thumbnail mode, then click on one of those thumbnails and set it as a background, feh generates a randomly named .png file in the home directory and sends that random filename to .fehbg
If I do the same thing again and pick a different background it generates another random file. These files build up and clutter up my home directory.
This doesn't happen in fullscreen or window mode. In those modes feh doesn't create a weird random file but rather passes the actual filename of the image to .fehbg
The random .png file isn't even a real image file as it can only be opened by feh but not by any other image viewers. It appears to more of an indexing file or strange link file of some sort.
How can I use thumbnail mode without it generating the weird random .png file?
Offline
it doesn't do that on my machine.
are you using some option that might be causing this?
did you read 'man feh'?
i think you better show us feh's verbose output for this scenarion, and is that file a text file? what does it contain?
Offline
Run this command:
feh -t -E 180 -y 180 -r /home/<user>/Pictures/wallpapers
or
feh -t -E180 -y180 -. -r /home/<user>/Pictures/wallpapers
(substitute your username for <user> of course)
(change directory location if necessary)
Now leave feh open and check your user directory and all is fine.
Next, click one of the thumbnails and set it as wallpaper. Exit and check your user directory and you will see the randomly generated .png file. (See attatched link image_1.png).
If you check .fehbg you will also see the wallpaper set to this random file. .
This file is not really an image file. If you try to load it into any image viewer other than feh you will get a cannot load file error. I tried to open it with a text editor but it will only load a new blank file.
I compared the size of this file to the real file and it is significantly smaller. I think what might be happening is when I use the set thumbnail size command modifier and click on the thumbnail and set it as background, feh generates the file in question.
Funny thing is when I run:
feh -t -r /home/<user>/Pictures/wallpapers
(use default thumbnail size without modifiers)
The random file is not generated and everything works as it should, the same as it does in fullscreen or window mode. I used the verbose option and all I got was a progress indicator. I would prolly have to run this as a script in order to get any useful info but I'm not sure as I'm not experienced enough yet with linux to really know what I'm doing.
Offline
that's so weird.
i can reproduce it with your command, but not with my script.
feh --version
feh version 3.1.3
Compile-time switches: curl exif help stat64 verscmp xinerama
no indications in the man page.
Last edited by ohnonot (2019-04-13 20:37:20)
Offline
Definately a bug. You'll also notice my command doesn't put the "X" over the thumbnails after they have been clicked like your script. It's either this bug or that one. I will ponder it, examine your script and see if there is a workaround.
For me it may be easier to use the custom actions I've added to Thunar. I created one for: set background centered, set background scaled, set background filled and set background tiled.
Just navigate to wallpaper directory right click on image and select appropriate custom action from drop down menu and done. Easy squeezie.
Offline
Definately a bug.
depends how you define "bug".
in both cases the behaviour appears to have been coded in on purpose, but isn't documented.
maybe the maintainer coded that in for a particular use case for themselves, i don't know.
Offline
If I were to use the term "bug" in the literal sense I suppose it would mean consequences or behavior the developer didn't plan or account for.
I would definately call it a bug when you start Feh in thumbnail mode, click on an image and it loads into a window titled "mywallpaper.png". Then if you right click on that image and under "file" and it still shows the file as being "mywallpaper.png", then click on set this file as background, it should set "mywallpaper.png" as the background.
But guess what? It doesn't. Instead it creates some randomly named file eg. FEBG_924071254869.png in the user directory and sets it as wallpaper instead. It wouldn't be so bad if that file was overwritten next time the wallpaper was changed but it doesn't. Feh just keeps adding files.
I would hope the developer was unaware of this behavior otherwise I would have to call it for lack of a nicer term, illogical. I don't have a way to reach out to the them directly but I can post a bug report on their website. Unless you really believe its not a bug.
As for the other issue; upon further investigation at around version 2.14 circa 2015 the developer added a function to place a blued out background with an "X" over a thumbnail if the action= option was used to process that thumbnail image. So that was done intentionally but, they should have allowed an option to turn that off.
Thanks for all your input. I learned alot. I may try to downgrade to an older version and see if it works better for me. For now I just avoid using thumnail mode because IMHO it just doesn't work the way it should.
Offline
For those of you still having problems with your background not sticking with nitrogen the solution is simple.
Trash or delete your ~/.config/nitrogen directory, then edit your openbox autostart file and change:
nitrogen --restore
to
# nitrogen --restore
Then put this this at the very end of the file:
nitrogen --restore &
Logout and back in then start nitrogen. Click preferences, icons with captions and add the folders to search for wallpapers.
Pick your wallpaper, set as background and you're good to go.
UPDATE: See my post #57 below
Last edited by makarovnik (2019-04-15 07:22:57)
Offline
For those of you still having problems with your background not sticking with nitrogen the solution is simple.
Trash or delete your ~/.config/nitrogen directory, then edit your openbox autostart file and change:
nitrogen --restore to # nitrogen --restore
Then put this this at the very end of the file:
nitrogen --restore &
Logout and back in then start nitrogen. Click preferences, icons with captions and add the folders to search for wallpapers.
Pick your wallpaper, set as background and you're good to go.
If this works for everyone maybe the moderator can mark it solved.
This is very good troubleshooting. When we were developing helium we made a real attack/hack on the autostart config to decide which commands needed to be forked to the background and which shouldn't. Definitely include the ampersand at the end of the command if in doubt, hopefully this is the fix and we'll just be guilty of being over-eager in our config. You can edit the entry where it is, you don't have to add it to the end, though that's as good a place as any I suppose.
## Set a wallpaper
nitrogen --restore &
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
Actually it worked for a few times in a row then inconsistent again. What i just tried was to change the modifier/option to: --restore without the ampersand and now it's survived three logouts in a row. If I have the problem again I will add the sleep command.
I already tried adding the ampersand early on and had more luck moving: nitrogen --restore to the end of the file. Not sure why that would help but maybe it's the sequence/timing of things being autostarted.
If I run nitrogen --restore from the terminal it seems to always work restoring the last used background so I think that's a clue.
When I had the problem initially with nitrogen not sticking, I found that whatever I changed the login screen background to was also what I got as a desktop background. Regardless if "use user wallpaper if available" was checked or not in lightDM.
Offline
Ok. ^ That worked sometimes but not good enough. This is my final try at fixing this. I decided that nitrogen does not like being started from the openbox autostart file.
I created this simple .desktop file:
[Desktop Entry]
Name=Autostart nitrogen
Exec=nitrogen --restore &
# Icon=
Type=Application
Categories=Utility;
NoDisplay=true
Then I saved this in my ~/.config/autostart directory and commented out any run commands I had previously in the openbox autostart file. This is working consistently for me now.
Last edited by makarovnik (2019-04-15 18:29:12)
Offline
Now that I know ^ works, I'd rather not use a .desktop file to do this. I'd rather call the command or a script from ~/.bash_profile, ~/.bash_login, ~/.profile, /etc/rc.local or ~/.bashrc
In ~/.profile there is a comment that the file won't be read if ~/.bash_profile or ~/.bash_login exists. So I don't want to mess up my system.
Or should I put it in /etc/cron.d ?
Offline
Try ~/.xsessionrc
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
The only way I have found nitrogen to restore background is via the .desktop file in ~/.config/autostart. It has worked consistently.
I'm running the the latest stable version so I might try the testing version if there is one. Otherwise I will stick with my workaround. Thanks for the help.
Offline