4

I'm running i3 on a Lubuntu os with very low end specs. i3 is a great desktop environment, but, every time I log out m y bg picture and screen resolution revert to default.

I was wondering if any one could tell me how to set it so they stay at there current settings.

~Thanks.

2 Answers2

13

i3 is just a window manager, it is not a desktop environment. As such setting the screen resolution or a background image do not fall into the domain of i3.

That is not to say there is nothing you can do. You can just add exec settings for the commands to your ~/.i3/config.

  • Usually the X.org should find and set the correct screen resolution on its own. If this does not work for you for some reason, you could create/modify X.org's configuration file in order to set the correct resolution manually. If you just want to do the settings from within your X session I would suggest xrandr.

    xrandr --output OUTPUT --mode MODE
    

    Where OUTPUT is the name of your output and MODE one of the availabe resolutions in the format WIDTHxHEIGHT. You can get both from the output of xrandr --query. For example:

    Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 8192 x 8192
    DP-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 475mm x 267mm
       1920x1080     60.00*+
       1680x1050     59.95  
       1600x900      60.00  
       1440x900      59.89  
       1280x1024     60.02  
       1280x960      60.00  
       1280x720      60.00  
       1024x768      60.00  
       800x600       60.32  
       640x480       59.94  
    DP-1 disconnected (normal left inverted right x axis y axis)
    DP-2 disconnected (normal left inverted right x axis y axis)
    DP-3 disconnected (normal left inverted right x axis y axis)
    

    Here the connected output is named DP-0 and 1920x1080 is the currently set mode. With xrandr --output DP-0 --mode 1600x900 the resolution could be set to 1600 by 900 pixels.

  • There are many programs that allow you to change the background image. If your current choice has a command line interface, you can just use that. Otherwise I would suggest nitrogen. It has a simple GUI, that allows you to easily choose and apply desktop backgrounds, and the previously saved state can just be restored with nitrogen --restore.

So you could add the following to your ~/.i3/config

exec --no-startup-id xrandr --output OUTPUT --mode MODE
exec --no-startup-id nitrogen --restore
Adaephon
  • 5,634
  • 3
  • 20
  • 25
  • 1
    Having set my resolution to `2560x1600` with `xrandr`, everything is now tiny. Is there a way to set like, 2x scaling? – Michael Dorst Sep 12 '19 at 20:28
0

If you need a GUI front end for xrandr to manage the resolution anywhere (Any DE) use arandr.

sudo pacman -Sy arandr