You are not logged in.

#1 2011-05-15 16:50:45

brandon88tube
Member
Registered: 2009-11-06
Posts: 84

Set wallpaper without a program?

Is there a manual way to set a wallpaer in X without having a program such as nitrogen or feh?

Offline

#2 2011-05-15 17:31:55

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: Set wallpaper without a program?

No. Something has to tell xorg what to use as the root window. If you only want to set your wallpaper, try using imlibsetroot from the AUR.

Last edited by Stebalien (2011-05-15 17:32:09)


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#3 2011-05-15 17:33:44

brandon88tube
Member
Registered: 2009-11-06
Posts: 84

Re: Set wallpaper without a program?

I was just wondering if I could make a simple script, but it doesn't seem like it would be that easy after all.

Offline

#4 2011-05-15 17:43:00

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Set wallpaper without a program?

Yes, you can make a script that utilizes feh, xsetroot, hsetroot or whatever wallpaper tool you wish (more or less).

An example of using feh in .xinitrc here:

https://wiki.archlinux.org/index.php/Fe … er_manager

Offline

#5 2011-05-15 19:34:34

brandon88tube
Member
Registered: 2009-11-06
Posts: 84

Re: Set wallpaper without a program?

What about something like xsetroot?

Offline

#6 2011-05-15 20:16:35

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: Set wallpaper without a program?

AFIAK, xsetroot will not allow you to set complicated backgrounds (images), only a single color or simple bitmap. Take a look at the manual.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#7 2011-05-15 21:17:01

ethail
Member
From: Spain
Registered: 2011-02-10
Posts: 225

Re: Set wallpaper without a program?

nitrogen is another tool for the job. First you set the background you want (only once) then, you restore the previous settings (nitrogen --restore) to load the previous background between sessions.


My GitHub Page

Best Testing Repo Warning: [testing] means it can eat you hamster, catch fire and you should keep it away from children. And I'm serious here, it's not an April 1st joke.

Offline

#8 2011-05-17 22:48:39

Loser777
Member
Registered: 2011-05-12
Posts: 28

Re: Set wallpaper without a program?

I've tried using feh with
"sh ~/.fehbg &" added to ~/xinitrc but the background will remain black whenever I reboot...
.fehbg has the following code:
feh  --bg-scale '1305545346351.jpg'


Do I need to make further adjustments to config.h?

Last edited by Loser777 (2011-05-17 23:59:44)

Offline

#9 2011-05-18 00:19:53

repo
Member
Registered: 2011-03-04
Posts: 14

Re: Set wallpaper without a program?

yeah, don't use images downloaded from 4chan.
seriously, try "feh --bg-scale /path/to/1305545346351.jpg" from the console instead. that will edit the .fehbg file properly.
also, check https://wiki.archlinux.org/index.php/Feh

Offline

#10 2011-05-18 00:48:57

Loser777
Member
Registered: 2011-05-12
Posts: 28

Re: Set wallpaper without a program?

repo wrote:

yeah, don't use images downloaded from 4chan.
seriously, try "feh --bg-scale /path/to/1305545346351.jpg" from the console instead. that will edit the .fehbg file properly.
also, check https://wiki.archlinux.org/index.php/Feh

I used feh --bg-fill /home/myusername/wall.jpg (different image) and while .fehbg was changed correctly the wallpaper still does not load when I startx.

.xinitrc still reads as
exec dwm
sh ~/.fehbg &

Last edited by Loser777 (2011-05-18 00:50:24)

Offline

#11 2011-05-18 01:06:41

repo
Member
Registered: 2011-03-04
Posts: 14

Re: Set wallpaper without a program?

change your .xinitrc to

sh ~/.fehbg &
exec dwm

Offline

#12 2011-05-18 01:40:43

Loser777
Member
Registered: 2011-05-12
Posts: 28

Re: Set wallpaper without a program?

repo wrote:

change your .xinitrc to

sh ~/.fehbg &
exec dwm

Well, that worked quite nicely, thanks! Why does the order matter in this circumstance?

Offline

#13 2011-05-18 01:52:37

askreet
Member
Registered: 2010-01-16
Posts: 9

Re: Set wallpaper without a program?

sh ~/.fehbg & = start the shell (/bin/sh) and load commands from a file (~/.fehbg), and continue to run other commands without waiting for this to complete (&)

exec dwm = go run a binary called (dwm) and wait for it to finish

Since dwm is your window manager, you're not actually running feh until you exit your window manager, so this is why the order matters.

For the record there is no reason to add & after feh, it does not hang around long.

Offline

#14 2011-05-18 02:19:41

Loser777
Member
Registered: 2011-05-12
Posts: 28

Re: Set wallpaper without a program?

askreet wrote:

sh ~/.fehbg & = start the shell (/bin/sh) and load commands from a file (~/.fehbg), and continue to run other commands without waiting for this to complete (&)

exec dwm = go run a binary called (dwm) and wait for it to finish

Since dwm is your window manager, you're not actually running feh until you exit your window manager, so this is why the order matters.

For the record there is no reason to add & after feh, it does not hang around long.

That makes a lot of sense! so should
exec dwm &
sh ~/.fehbg

also work? I remember I couldn't start x with that in .xinitrc.

Offline

#15 2011-05-18 19:41:36

nybegynner
Member
From: Norway
Registered: 2010-02-07
Posts: 36

Re: Set wallpaper without a program?

problem?

Offline

#16 2011-05-18 20:53:14

frony0
Member
From: United Kingdom
Registered: 2011-05-01
Posts: 44

Re: Set wallpaper without a program?

Loser777 wrote:

Should
exec dwm &
sh ~/.fehbg

also work? I remember I couldn't start x with that in .xinitrc.

exec is a command that replaces the shell with a given program, so saying "exec dwm &" is a little self-contradictory... If you want that to work, you should remove the "exec"


Make it idiot-proof, and someone will breed a better idiot.
-- Oliver Elphick

Offline

Board footer

Powered by FluxBB