You are not logged in.
Pages: 1
Hi there. I just installed feh and wanted it to display a wallpaper for me in dwm. I put the following in my .xinitrc file:
exec feh --bg-fill /home/user/wallpaper.jpg
But it doesn't display the wallpaper at all. I then consulted the feh wiki and tried their approach to displaying a wallpaper which is choosing the wallpaper by using the following in the terminal:
$ feh --bg-fill /home/user/wallpaper.jpg
...which displayed the wallpaper, but after I restart Xorg after adding this to my .xinitrc:
sh ~/.fehbg &
...the wallpaper is no longer displaying. Any clues as to why? Thanks in advance.
Last edited by wgetfree (2012-05-22 20:14:25)
Offline
it doesn't need to be executable if it is called with sh. <- was response to disappearing post.
I suspect there is a problem in your xinitrc, can you post that?
There really is no reason to use sh to call your .fehbg, it is one more process than you need to create during startup. Just put "feh --bg-fill path/to/your/wallpaper.png" in your .xinitrc.
Don't use "exec", I'm surprised your wm started at all with this - unless of course that line came after launching your wm, which would then explain why it never set the wallpaper.
In any case, posting your .~/.xinitrc will sort the issue quickly.
Last edited by Trilby (2012-05-22 19:58:47)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Hi there. I just installed feh and wanted it to display a wallpaper for me in dwm. I put the following in my .xinitrc file:
exec feh --bg-fill /home/user/wallpaper.jpg
I believe the comand should be
feh --bg-fill /home/user/wallpaper.jpg
with no `exec'.
From the man pages:
exec [-cl] [-a name] [command [arguments]]
If command is specified, it replaces the shell. No new process is created.
`exec' is typically for a desktop environment or similar where you want X to stop when the process stops running.
Laptop: Arch+i3 Personal file sever: Slackware Work PC: Fedora+wmii
Work file sever: FreeBSD Work application server: Scientific Linux
I'm an addict.
Offline
it doesn't need to be executable if it is called with sh.<- was response to disappearing post.I suspect there is a problem in your xinitrc, can you post that?
There really is no reason to use sh to call your .fehbg, it is one more process than you need to create during startup. Just put "feh --bg-fill path/to/your/wallpaper.png" in your .xinitrc.
Don't use "exec", I'm surprised your wm started at all with this - unless of course that line came after launching your wm, which would then explain why it never set the wallpaper.
In any case, posting your .~/.xinitrc will sort the issue quickly.
I did post it after the line where my wm was executed. I tried taking away the exec part and that still made no difference. My .xinitrc is very basic as this is a brand-new install and haven't really done much to it.
while true; do
xsetroot -name "$( date +"%F %R" )"
sleep 1m # Update time every minute
done &
exec dwm
feh --bg-fill /home/user/wallpaper.jpg
I don't see what could be wrong here.
Offline
Switch the last two lines. That's what Trillby mentioned.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Switch the last two lines. That's what Trillby mentioned.
This worked. Did not see him mention that. Thank you all for your help!
Offline
I suppose I only mentioned it indirectly. But for future reference note the part of the man excerpt ahammel posted: exec replaces the current process, so anything that comes after an exec line in a shell script will never execute.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Pages: 1