You are not logged in.

#1 2008-09-07 21:03:51

kramerxiita
Member
Registered: 2008-02-14
Posts: 89

Feh restore wallpaper problem

Hello.

I use feh to set my wallpaper, but command eval `cat $HOME/.fehbg` & don't accept spaces in my wallpapers name.


What to do if the wallpaper/image has spaces in its name?

Feh doesn't save the filename bash compliant (Wallpaper/Sky - Blue.jpg instead of Wallpaper/Waves\ -\ Blue.jpg).

How can i make to restore my wallpapers with spaces in its name?

Offline

#2 2008-09-07 21:06:44

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Feh restore wallpaper problem

You should try it with double quotes.

Anyway, why not give nitrogen a try ? It's really sweet for setting the wallpaper....


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#3 2008-09-07 21:10:19

kramerxiita
Member
Registered: 2008-02-14
Posts: 89

Re: Feh restore wallpaper problem

Double quotes don't work too.

I use feh with Thunar, like here say: http://ubuntuforums.org/showthread.php?p=4680159

Offline

#4 2008-09-07 21:15:57

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Feh restore wallpaper problem

Nitrogen can set wallpapers like that too. I use it with thunar in that same way.
Go ahead and give it a try.

About feh: Have you tried

sh ~/.fehbg &

as is suggested in the Wiki ?


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#5 2008-09-07 21:17:44

kramerxiita
Member
Registered: 2008-02-14
Posts: 89

Re: Feh restore wallpaper problem

Don't work too. I try all ways i find. But...

Thanks, anyway.

Offline

#6 2008-09-07 23:55:26

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: Feh restore wallpaper problem

carlocci ~/funny  $  eval $(cat ~/.fehbg)
feh WARNING: zz.jpg does not exist - skipping
feh WARNING: zzz - File does not exist
feh ERROR: Couldn't load image in order to set bg
carlocci ~/funny  $  eval "\"$(cat ~/.fehbg)\""
bash: feh --bg-center zzz zz.jpg: command not found
carlocci ~/funny  $  eval $(sed -r 's/feh (--bg-[[:graph:]]+) (.*)/feh \1 "\2"/' ~/.fehbg)

arg!!!

Offline

#7 2008-09-08 00:14:36

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: Feh restore wallpaper problem

. $HOME/.fehbg

works for me.

Offline

#8 2008-09-08 06:18:45

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Feh restore wallpaper problem

If . ~/.fehbg does not work, what about renaming the picture file?

Offline

#9 2008-09-08 13:33:38

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: Feh restore wallpaper problem

Ramses de Norre wrote:
. $HOME/.fehbg

works for me.

The problem is that feh doesn't enclose the file name in quotes when it saves it in .fehbg
So you come to have something like

feh --bg-center file with spaces.jpg

you can't even escape quotes because in that case you would find yourself with

"feh --bg-center file with spaces.jpg"

which is recognize as a single command (imagine you had a file called "feh --bg-center file with spaces.jpg" in /usr/bin )
That's why you have to resort to sed/awk to make it work like I did: you need to put the quotes in the right place.

Offline

#10 2008-09-08 13:40:32

kramerxiita
Member
Registered: 2008-02-14
Posts: 89

Re: Feh restore wallpaper problem

eval $(sed -r 's/feh (--bg-[[:graph:]]+) (.*)/feh \1 "\2"/' ~/.fehbg)

This work.

Thanks, carlocci.

Offline

Board footer

Powered by FluxBB