You are not logged in.

#41 2019-04-12 14:26:54

makarovnik
Member
Registered: 2019-03-28
Posts: 27

Re: Wallpaper change not save after login

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

#42 2019-04-12 17:11:41

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Wallpaper change not save after login

makarovnik wrote:

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

#43 2019-04-12 19:42:16

makarovnik
Member
Registered: 2019-03-28
Posts: 27

Re: Wallpaper change not save after login

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

#44 2019-04-12 20:06:15

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,030
Website

Re: Wallpaper change not save after login

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

#45 2019-04-12 21:39:12

makarovnik
Member
Registered: 2019-03-28
Posts: 27

Re: Wallpaper change not save after login

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.

image_1.png

Last edited by makarovnik (2019-04-12 22:31:43)

Offline

#46 2019-04-13 04:59:39

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Wallpaper change not save after login

^ 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

#47 2019-04-13 08:57:55

makarovnik
Member
Registered: 2019-03-28
Posts: 27

Re: Wallpaper change not save after login

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

#48 2019-04-13 14:07:45

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Wallpaper change not save after login

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

#49 2019-04-13 20:02:03

makarovnik
Member
Registered: 2019-03-28
Posts: 27

Re: Wallpaper change not save after login

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.

image_1.png

Offline

#50 2019-04-13 20:35:16

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Wallpaper change not save after login

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

#51 2019-04-13 21:01:50

makarovnik
Member
Registered: 2019-03-28
Posts: 27

Re: Wallpaper change not save after login

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

#52 2019-04-14 06:02:56

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Wallpaper change not save after login

makarovnik wrote:

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

#53 2019-04-15 00:39:23

makarovnik
Member
Registered: 2019-03-28
Posts: 27

Re: Wallpaper change not save after login

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

#54 2019-04-15 06:13:22

makarovnik
Member
Registered: 2019-03-28
Posts: 27

Re: Wallpaper change not save after login

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

#55 2019-04-15 06:22:05

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,030
Website

Re: Wallpaper change not save after login

makarovnik wrote:

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

#56 2019-04-15 06:45:38

makarovnik
Member
Registered: 2019-03-28
Posts: 27

Re: Wallpaper change not save after login

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

#57 2019-04-15 07:07:05

makarovnik
Member
Registered: 2019-03-28
Posts: 27

Re: Wallpaper change not save after login

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

#58 2019-04-15 13:07:13

makarovnik
Member
Registered: 2019-03-28
Posts: 27

Re: Wallpaper change not save after login

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

#59 2019-04-15 16:29:46

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,030
Website

Re: Wallpaper change not save after login

Try ~/.xsessionrc


No, he can't sleep on the floor. What do you think I'm yelling for?!!!

Offline

#60 2019-04-15 18:01:00

makarovnik
Member
Registered: 2019-03-28
Posts: 27

Re: Wallpaper change not save after login

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

Board footer

Powered by FluxBB