The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
2

How can I set a desktop background image in i3?

asked 2012-06-04 13:15:49 +0000

Michael gravatar image

updated 2012-07-02 20:08:02 +0000

joepd gravatar image

How can I set a desktop background image in i3?

edit retag flag offensive close merge delete

3 answers

Sort by » oldest newest most voted
2

answered 2012-06-04 13:17:04 +0000

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

The background image configuration does not depend on the window manager. i3 will not touch the X11 root window (which is the window on which the background is set), so you need to set a background with an external program.

Many people use feh, see https://wiki.archlinux.org/index.php/...adesktopwallpapermanager

To set a static color (not an image), use

xsetroot -solid "#333333"

You can place the feh or xsetroot call either in your ~/.xsession before execing i3, or (in case you don’t use ~/.xsession) in your i3 configuration file ~/.i3/config:

exec --no-startup-id xsetroot -solid "#333333"
edit flag offensive delete link more

Comments

I found that #002244 complements the default window focus color nicely. It's also not too bright to blind you when you close all your windows.

inconceivable gravatar imageinconceivable ( 2015-02-07 07:13:49 +0000 )edit
1

answered 2012-06-04 15:29:04 +0000

Atmoz gravatar image

updated 2012-06-04 15:53:59 +0000

You can use nitrogen (simple GUI with multi-monitor support) to set wallpapers. Restore your settings on startup by adding the following line to your ~/.i3/config:

exec --no-startup-id nitrogen --restore

edit flag offensive delete link more

Comments

I think you want to use `exec --no-startup-id nitrogen --restore` here because nitrogen doesn’t open any windows.

Michael gravatar imageMichael ( 2012-06-04 15:43:51 +0000 )edit

What exactly does --no-startup-id do, and what is the benefit?

Atmoz gravatar imageAtmoz ( 2012-06-04 15:49:17 +0000 )edit

--no-startup-id disables startup notifications for this window. They are used to properly launch windows on the right workspace when starting and to display an hourglass mouse pointer while startup is in progress. In this case you’d end up with an hourglass mouse pointer for 60 seconds.

Michael gravatar imageMichael ( 2012-06-04 15:51:00 +0000 )edit

Thanks for the answer, now I finally know why the mouse pointer always looks like an hourglass on startup :-)

Atmoz gravatar imageAtmoz ( 2012-06-04 15:53:30 +0000 )edit

Why `exec` instead of `exec_always`? Is there something wrong using `exec_always` for a background handler?

Hibou57 gravatar imageHibou57 ( 2013-04-03 16:13:01 +0000 )edit
0

answered 2012-06-04 14:13:57 +0000

miguel gravatar image

If you don't use a graphical login manager which usually reads ~/.xsession, you could set your background when X starts adding a line in your ~/.xinitrc file:

feh --bg-scale /path/to/image

edit flag offensive delete link more

Comments

I've add this line to i3 config file. It works too. ;)

DasLampe gravatar imageDasLampe ( 2012-06-04 17:40:48 +0000 )edit

In that case you could use `exec --no-startup-id feh --bg-scale /path/to/image`

miguel gravatar imagemiguel ( 2012-06-04 17:47:09 +0000 )edit

I use this one. Perfect !

Benoitt gravatar imageBenoitt ( 2012-06-05 13:01:30 +0000 )edit

Question Tools

1 follower

Stats

Asked: 2012-06-04 13:15:49 +0000

Seen: 72,529 times

Last updated: Jun 04 '12