LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 08-05-2020, 09:28 AM   #1
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 216

Rep: Reputation: Disabled
can't seem to make wallpaper permanent in feh


I'm running dwm as my window manager.
I've appended ~/.fehbg & to my ~/.xinitrc file and the contents of my ~/.fehbg file reads:
Code:
#!/bin/sh
feh --no-fehbg --bg-scale '/pathtoimage'
And this is the contents of my ~/.xinitrc:
Code:
#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

# Start the window manager:
exec /usr/bin/dwm

# Start the desktop wallpaper application:
~/.fehbg &

but the image won't load automatically on the startup of my xsession. I have to enter feh --bg-scale /pathtoimage every time.

The image in question doesn't have any capital letters or spaces in its name so I don't think I entered the incorrect image name.

Any idea why it's not loading automatically on startup of the Xsession?
 
Old 08-05-2020, 10:45 AM   #2
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: Slackware
Posts: 2,014

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
Silly question but is ~/.fehbg marked executable? I always had to do this when this was my set up.
 
1 members found this post helpful.
Old 08-05-2020, 11:33 AM   #3
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,090
Blog Entries: 1

Rep: Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867
I just use xsetbg

$ xsetbg image.file

Or I get lazy and use xsetroot

$ xsetroot -solid rgb:00/00/00

$ xsetroot -solid Blue4
 
1 members found this post helpful.
Old 08-05-2020, 02:07 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 15,308
Blog Entries: 9

Rep: Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401
Quote:
Originally Posted by burning View Post
Code:
~/.fehbg &
exec /usr/bin/dwm
FTFY.
 
1 members found this post helpful.
Old 08-05-2020, 02:36 PM   #5
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: Slackware
Posts: 2,014

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
Ah yes, I missed the forest for the trees: the exec line needs to be last.
 
1 members found this post helpful.
Old 08-05-2020, 08:09 PM   #6
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 216

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
FTFY.
Ah, thanks! Do you know why executing the window manager needs to be last?
 
Old 08-06-2020, 03:15 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 15,308
Blog Entries: 9

Rep: Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401Reputation: 4401
Because 'exec' ends the script. Nothing after that is executed anymore (well there's exceptions to that, but in this case it is true enough).

Last edited by ondoho; 08-06-2020 at 03:17 AM.
 
1 members found this post helpful.
Old 08-06-2020, 11:45 AM   #8
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 216

Original Poster
Rep: Reputation: Disabled
Wink

Quote:
Originally Posted by ondoho View Post
Because 'exec' ends the script. Nothing after that is executed anymore (well there's exceptions to that, but in this case it is true enough).
Ah, thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Feh: using feh to rotate wallpapers Earl Parker II Linux - Desktop 2 08-30-2019 07:16 PM
Keeping a permanent wallpaper with Feh Durin Linux - Desktop 1 09-13-2013 08:51 PM
[SOLVED] Recommended random wallpaper program using feh won't work hilltownboy Linux - Software 7 09-30-2011 09:44 AM
[SOLVED] preserving feh's LXDE wallpaper between sessions pargoo Slackware 7 10-06-2010 12:11 AM
LXer: Set your IP as Wallpaper with convert and feh LXer Syndicated Linux News 0 10-30-2009 04:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration