Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

2 votes
3 answers
2918 views
i3wm: How to automatically switch workspace when a window of a specific application requests focus?
I tried `focus_on_window_activation` with `focus`, but it doesn't do anything. I guess it only works on same workspace. Or maybe I am using it wrong? ``` for_window [class="Chromium"] focus_on_window_activation focus ``` For example in a Thunderbird when I click on a link, I want Chromium to get foc...
I tried focus_on_window_activation with focus, but it doesn't do anything. I guess it only works on same workspace. Or maybe I am using it wrong?
for_window [class="Chromium"] focus_on_window_activation focus
For example in a Thunderbird when I click on a link, I want Chromium to get focus and switch to its workspace (only Chromium, not all applications). Currently it only gets the urgency flag (I believe its usually visualized by a red background of a workspace "button" in a bar).
menfon (262 rep)
Aug 22, 2022, 06:52 AM • Last activity: Jul 28, 2025, 11:05 AM
7 votes
1 answers
2254 views
Set default application to start on save/open file dialog
I am using i3wm on an up-to-date arch installation, and I would love to know how to change the application to open for the save/open file dialog. **How to reproduce** * If I open okular and select "Open File" I am greeted by an ugly file manager * If I click "save PDF" in chromium the same app opens...
I am using i3wm on an up-to-date arch installation, and I would love to know how to change the application to open for the save/open file dialog. **How to reproduce** * If I open okular and select "Open File" I am greeted by an ugly file manager * If I click "save PDF" in chromium the same app opens up **What I have tried** * set the default in exo-preferred-applications * set manually in every mime config file I could find on my machine (inode/directory=Nautilus.desktop;) * and a bunch of other fixes I found online * xdg-open and mimeo are opening the right app when opening a directory I also have gnome installed on my PC, and when starting up chrome on this desktop manager it opens nautilus, so I think it might be handled by the desktop/window manager, thus i3 in my case.
poel22 (71 rep)
Jun 1, 2018, 10:09 AM • Last activity: Jul 28, 2025, 10:09 AM
7 votes
1 answers
3019 views
Second monitor doesn't wake after going to standby (without annoying workaround)
### Background I've had this issue in one way or another for a long time now (years), and in multiple configurations. I've updated the driver & kernel on multiple occasions, and at this point I'm really at a loss as to where the culprit is. It seems to be some kind of race condition where if one mon...
### Background I've had this issue in one way or another for a long time now (years), and in multiple configurations. I've updated the driver & kernel on multiple occasions, and at this point I'm really at a loss as to where the culprit is. It seems to be some kind of race condition where if one monitor is 'ready' before the other, the other just gets 'No Input', despite xrandr (and i3) thinking it's connected and should be working. ### Old setup - One 4K monitor - One 1080p monitor Behavior: Both monitors goes to sleep (from inactivity), and upon moving the mouse only one of them (the 1080p monitor) correctly wakes. The other one wakes a few seconds later, but then shows 'No Input'. Workaround: - Run xrandr.sh (old version, see below for the new version) - I can't say for certain if I had to do something else to get it working (the whole process became muscle memory more or less...) ### New setup - One 4K monitor (same as previous setup) - One 4K monitor (new) Behavior: Similar behavior, but now the behavior applies to the *new* monitor. The old one behaves just fine (just like the old 1080p monitor). Workaround 1 (remembering to wake the monitor first): - (*before waking screens by moving mouse/keyboard*) Wake 'slow' screen by using menu buttons on monitor - When monitor has completed resume from standby and shows menu items, move mouse/keyboard to wake monitors. - Both monitors work correctly! Workaround 2 (forgetting to wake the monitor first): - (*move mouse/keyboard*) Both monitors wake. One works correctly, the other takes more time to wake from suspend and then just shows 'No Input'. - Run xrandr --output HDMI-0 --off, which puts the monitor back in standby. - Apply workaround 1. - Both monitors work correctly! ### Details Nvidia driver version (from Arch repos): 455.45.01-6
$ lspci | grep NV
01:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1070] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)
$ xrandr
Screen 0: minimum 8 x 8, current 7680 x 2160, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 621mm x 341mm
   3840x2160     60.00*+  59.94    50.00    30.00    29.97    25.00    23.98    23.98
   2560x1600     59.97
   2560x1440     59.95
   1920x1080     60.00    59.94    50.00    60.00    50.04
   1680x1050     59.95
   1440x900      59.89
   1440x576      50.00
   1440x480      59.94
   1280x1024     75.02    60.02
   1280x960      60.00
   1280x800      59.81
   1280x720      60.00    59.94    50.00
   1024x768      75.03    70.07    60.00
   800x600       75.00    72.19    60.32    56.25
   720x576       50.00
   720x480       59.94
   640x480       75.00    72.81    59.94
   640x350       70.07
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 connected 3840x2160+3840+0 (normal left inverted right x axis y axis) 1280mm x 720mm
   4096x2160     29.97 +  25.00    24.00    23.98
   3840x2160     29.97*   25.00    23.98    23.98
   1920x1080     60.00    59.94    50.00    29.97    25.00    23.98    60.00    50.04
   1280x1024     60.02
   1280x720      59.94    50.00
   1024x768      60.00
   800x600       60.32
   720x576       50.00
   720x480       59.94
   640x480       59.95    59.93    59.94
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)
dmesg shows nothing out of the ordinary. xrandr.sh:
# This used to be uncommented, but doesn't cut it anymore with the new setup
#xrandr --output HDMI-0 --off

sleep 0.5

xrandr --output HDMI-0 --primary --mode 3840x2160 --panning 0x0
xrandr --output DP-1 --mode 3840x2160 --right-of HDMI-0
### Attempted solutions Over the years, I've googled several times for similar issues, and I've never really found anything promising. I used to think it was something weird with the old 4K monitor (like a bad EDID), but now that I'm having the same issue with the new monitor I've discarded that suspicion. I've found a lot of threads about screens failing to resume after *suspend* (usually fixed with modeset), but in my case there's no real suspend happening, it's simply a screen off/blanking (and it only happens for one of the monitors!). Furthermore, I've also not found any issue similar to mine with respect to the 'race condition'-like nature of the issue/workaround.
erb (123 rep)
Jan 17, 2021, 09:56 AM • Last activity: Jul 20, 2025, 12:09 AM
0 votes
2 answers
5753 views
Polybar i3 no workspace module appearing
I have just switched from the default i3 bar to using polybar (running Fedora 30, i3-gaps). I installed polybar following this guide: https://computingforgeeks.com/install-polybar-status-bar-on-fedora/. I first tried running the default configuration for polybar and it worked except there was nothin...
I have just switched from the default i3 bar to using polybar (running Fedora 30, i3-gaps). I installed polybar following this guide: https://computingforgeeks.com/install-polybar-status-bar-on-fedora/ . I first tried running the default configuration for polybar and it worked except there was nothing on the left where the workspaces should be. I played around a bit to try to get the to work, but nobody in any forums I came across seemed to have a similar situation. I ended up copying the polybar config given in this answer, as they seemed to set up their workspaces in the i3 config the same way that I have: https://computingforgeeks.com/install-polybar-status-bar-on-fedora/ , but the result was the same - no workspace module appearing on my polybar. My polybar config file is:
[global/wm]
margin-top = 100
margin-bottom = 100

[colors]
fg = ${xrdb:color7}
modfg = ${xrdb:color1}
bg = ${xrdb:color0}

white = #d1d1d1
gray = #585858
black = #ce1d1d1d
red = #c795ae
blue = #95aec7
yellow = #c7ae95
green = #aec795


[bar/bar1]
width = 100%
height = 41
top = true
;margin-top = 100

border-top-size = 1  # creating top border space
offset-y = -3   # aligning tray icons with rest of bar
monitor = ${env:MONITOR:}

;background = #141021
background = #000f0f0f # This is the hexcode for transparency (also used in powermenu)
foreground = #c4b7c5


fixed-center = false

font-0 = FontAwesome:pixelsize=10;0
font-1 = PragmataPro Nerd Font:pixelsize=10;0
font-2 = "Font Awesome 5 Free:style=Regular:pixelsize=10;1"
font-3 = "Font Awesome 5 Free:style=Solid:pixelsize=10;1"
font-4 = "Font Awesome 5 Brands:pixelsize=10;1"

modules-left = i3
modules-center = date
modules-right = wireless-network cpu memory filesystem temperature pulseaudio backlight battery powermenu

tray-position = right
;tray-maxsize = 41
tray-background = #000f0f0f
tray-foreground= #000f0f0f

scroll-up = i3wm-wsnext
scroll-down = i3wm-wsprev


overline-size = 2
overline-color = ${colors.white}
underline-size = 4
underline-color = ${colors.white}

;override-redirect = true
;wm-restack = i3


[module/i3]
type = internal/i3

pin-workspaces = false
strip-wsnumbers = true
index-sort = false 
enable-scroll = false

format =  
format-padding-right = 2

label-unfocused-foreground = #8a7f8f
label-unfocused-padding = 1

label-focused-foreground = #c16772
label-focused-padding = 1

label-urgent-foreground = #e4b226
label-urgent-padding = 1


[module/filesystem]
type = internal/fs

; Mountpoints to display
mount-0 = /

label-mounted =  %free%
format-mounted-padding = 2

; Seconds to sleep between updates
; Default: 30
; interval = 10

; Display fixed precision values
; Default: false
fixed-values = true

; Spacing between entries
; Default: 2
spacing = 6




[module/filesystem2]
type = internal/fs

; Mountpoints to display
mount-0 = /media//Data

label-mounted =  %free%
format-mounted-padding = 2

; Seconds to sleep between updates
; Default: 30
; interval = 10

; Display fixed precision values
; Default: false
fixed-values = true

; Spacing between entries
; Default: 2
spacing = 6





[module/cpu]
type = internal/cpu

interval = 1

format = 
format-padding = 2

label =  %percentage%%


[module/memory]
type = internal/memory

interval = 1

format = 
format-padding = 2

label =  %gb_used% (%percentage_used%%)


[module/temperature]
type = internal/temperature

interval = 1

thermal-zone = 0

warn-temperature = 74

format =  
format-padding = 2

format-warn =  
format-warn-padding = 2

label = %temperature-c%

label-warn = %temperature-c%
label-warn-foreground = #e4b226

ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-3 = 
ramp-4 = 


[module/date]
type = internal/date

interval = 1

date = %a %b %d, 
time = %H:%M:%S

date-alt = %A, %d %B %Y
time-alt = %H:%M:%S

format = 
format-padding = 2

label =  %date% %time%


[module/battery]
; Note - if battery isn't showing, try BAT0 or BAT1, etc.
type = internal/battery

full-at = 95

battery = BAT1
adapter = ACAD

poll-interval = 5

format-charging =  
format-charging-padding = 2

format-discharging =  
format-discharging-padding = 2

format-full =  
format-full-padding = 2

label-charging = %percentage%%

label-discharging = %percentage%%

label-full = %percentage%%

ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 

animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-framerate = 500


[module/backlight]
type = internal/backlight

card = intel_backlight

format = 
format-padding = 2

label =  %percentage%%


[module/pulseaudio]
type = internal/pulseaudio
; List sinks via pactl list sinks and look at the Name field

sink = alsa_output.pci-0000_00_1b.0.analog-stereo
;interval = 1

format-volume-padding = 2
format-volume =  
ramp-volume-0 = 
ramp-volume-1 = 
ramp-volume-2 = 

format-muted-padding = 2
label-muted =  0%


[module/powermenu]
type = custom/menu

label-open =   

label-close = cancel

label-close-background = #000f0f0f
label-close-foreground = #ffeefc
label-open-padding-left = 4
label-open-padding-right = 3
label-close-padding = 3

menu-0-0 = lock
menu-0-0-exec = ~/scripts/lock.sh
menu-0-0-background = #000f0f0f
menu-0-0-foreground = #c05c47
menu-0-0-padding-right = 3

menu-0-1 = reboot
menu-0-1-exec = menu-open-1
menu-0-1-background = #000f0f0f
menu-0-1-foreground = #c05c47
menu-0-1-padding-right = 3

menu-0-2 = power off
menu-0-2-exec = menu-open-2
menu-0-2-background = #000f0f0f
menu-0-2-foreground = #c05c47
menu-0-2-padding-right = 3

menu-1-0 = reboot?  
menu-1-0-exec = reboot
menu-1-0-background = #000f0f0f
menu-1-0-foreground = #e4b226
menu-1-0-padding-right = 3

menu-2-0 = power off?  
menu-2-0-exec = poweroff
menu-2-0-background = #000f0f0f
menu-2-0-foreground = #e4b226
menu-2-0-padding-right = 3


[module/wireless-network]
type = internal/network

; Look at ifconfig for interface
interface = wlo1

format-connected = 
format-connected-padding = 2

format-disconnected = 
format-disconnected-padding = 2

label-connected =  %essid%

label-disconnected =  None
And my i3 config is:
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#

# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html  for a complete reference!

set $mod Mod4

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:System San Francisco Display 10

# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8

# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.


# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# start a terminal
bindsym $mod+Return exec gnome-terminal #i3-sensible-terminal
#start a browser
bindsym $mod+numbersign exec firefox

# kill focused window
bindsym $mod+Shift+q kill

# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop

# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right

# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right

# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

# split in horizontal orientation
bindsym $mod+h split h

# split in vertical orientation
bindsym $mod+v split v

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split

# toggle tiling / floating
bindsym $mod+Shift+space floating toggle

# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle

# focus the parent container
bindsym $mod+a focus parent

# focus the child container
#bindsym $mod+d focus child

# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1:" 
set $ws2 "2:" 
set $ws3 "3:" 
set $ws4 "4:" 
#set $ws5 "5:a"
set $ws6 "6:"
set $ws7 "7:"
set $ws8 "8:"
set $ws9 "9:"
set $ws10 "10:"
set $ws11 "11:"
#set $ws1 "1" 
#set $ws2 "2" 
#set $ws3 "3" 
#set $ws4 "4" 
set $ws5 "5"
#set $ws6 "6"
#set $ws7 "7"
#set $ws8 "8"
#set $ws9 "9"
#set $ws10 "10"
#set $ws11 "11"

# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
bindsym $mod+Control+1 workspace $ws11

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
bindsym $mod+Shift+Control+1 move container to workspace $ws11


# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"

# resize window (you can also use the mouse for that)
mode "resize" {
        # These bindings trigger as soon as you enter the resize mode

        # Pressing left will shrink the window’s width.
        # Pressing right will grow the window’s width.
        # Pressing up will shrink the window’s height.
        # Pressing down will grow the window’s height.
        bindsym j resize shrink width 10 px or 10 ppt
        bindsym k resize grow height 10 px or 10 ppt
        bindsym l resize shrink height 10 px or 10 ppt
        bindsym semicolon resize grow width 10 px or 10 ppt

        # same bindings, but for the arrow keys
        bindsym Left resize shrink width 10 px or 10 ppt
        bindsym Down resize grow height 10 px or 10 ppt
        bindsym Up resize shrink height 10 px or 10 ppt
        bindsym Right resize grow width 10 px or 10 ppt

        # back to normal: Enter or Escape or $mod+r
        bindsym Return mode "default"
        bindsym Escape mode "default"
        bindsym $mod+r mode "default"
}

bindsym $mod+r mode "resize"

set $bg-color 	         #44444480
set $inactive-bg-color   #44444480
set $text-color          #f3f4f5
set $inactive-text-color #676E7D
set $urgent-bg-color     #E53935
set $ws-focused-bg 	 #ffc553

# window colors
#                       border              background         text                 indicator
client.focused          $bg-color           $bg-color          $text-color          #00ff00
client.unfocused        $inactive-bg-color  $inactive-bg-color $inactive-text-color #00ff00
client.focused_inactive $inactive-bg-color  $inactive-bg-color $inactive-text-color #00ff00
client.urgent 		$urgent-bg-color    $urgent-bg-color   $text-color 	    #00ff00

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#bar {
#	strip_workspace_numbers yes
#	status_command i3status
#	colors {
#		   background $bg-color
#	           separator #757575
##                  		      border             background         text
#		   focused_workspace  $ws-focused-bg     $ws-focused-bg	    $text-color
#	 	   inactive_workspace $inactive-bg-color $inactive-bg-color $inactive-text-color
#		   urgent_workspace   $urgent-bg-color   $urgent-bg-color   $text-color
#		}
#}
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
exec compton -f -I 0.06 -O 0.6

#GAPS!!!
gaps inner 10
for_window [class=".*"] border pixel 0

#touchpad touch-ups:
exec_always "~/.config/i3/touchpad_options"

#key swaps:
exec_always ~/.config/i3/key_mappings

#media
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound

# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 10 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 10 # decrease screen brightness

# Media player controls
bindsym XF86AudioPlay exec playerctl play-pause
#bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous

#HARRY'S COMMANDS:
#desktop background
exec_always feh --bg-fill ~/Pictures/desktop-photos/roundabout-darkened.png

#lock shortcut:
bindsym $mod+shift+x exec i3lock -c 222222

#set dpi for i3 toolbars
exec_always xrdb -merge ~/.Xresources
exec_always xrandr --dpi 120
EDIT: Done some more troubleshooting and figured out that the issue is in my installation of polybar. If I run it from terminal it tells me that I have no built-in support for internal/i3. The command polybar -v gives me:
polybar 3.3.0-101-gf0c65e6

Features: +alsa +curl -i3 +mpd +network(libnl) +pulseaudio +xkeyboard
Although this is exactly what the guide (linked above, which claimed to be for installation for i3wm on Fedora) told me I should get as the output, it appears that the -i3 (logically) means it lacks i3 support (ref: https://github.com/polybar/polybar/issues/526) . I don't exactly know how to perform the installation correctly, but I will uninstall polybar and look for some better documentation on how to do it.
Harry Cooke (51 rep)
Jul 19, 2019, 04:33 PM • Last activity: Jul 18, 2025, 10:06 AM
4 votes
4 answers
3093 views
Prevent MATE from launching Caja Desktop when running i3
A while back I installed i3 on my MATE box, and I'm quite happy with it, however despite disabling Caja Desktop (`x-caja-desktop`) when setting i3 as the default window manager through dconf editor, every time I install a .deb package via the gui installer, the desktop "window" opens and overlays my...
A while back I installed i3 on my MATE box, and I'm quite happy with it, however despite disabling Caja Desktop (x-caja-desktop) when setting i3 as the default window manager through dconf editor, every time I install a .deb package via the gui installer, the desktop "window" opens and overlays my entire screen. This is incredibly annoying, and hitting super-shift-q to close the window doesn't work, which forces me to just move it to an unused workspace. Is there anything I can do to stop this from happening without installing a different file manager?
Electric Coffee (413 rep)
Apr 26, 2016, 10:21 AM • Last activity: Jul 15, 2025, 04:47 AM
1 votes
1 answers
2240 views
Blank screen at startup, xset is unable to open display ""
Seemingly from out of nowhere, I get a blank screen during startup on Arch Linux. Going into the TTY shows me ``` xset: unable to open display "" Unable to connect to X server ``` I use X11, LightDM and i3. Here LightDM seems to be able to show a blank screen with a cross as a cursor (both during st...
Seemingly from out of nowhere, I get a blank screen during startup on Arch Linux. Going into the TTY shows me
xset:  unable to open display ""
Unable to connect to X server
I use X11, LightDM and i3. Here LightDM seems to be able to show a blank screen with a cross as a cursor (both during startup and after running lightdm in the TTY). I suspect it can be can be caused of i3, since the file ~/.xsession-errors has the content
i3status: trying to auto-detect output_format setting
i3status: auto-detected "i3bar"
i3status: exiting due to signal.
However, running exec i3 -V -d all &>> "$HOME/i3.log" only shows i3: Cannot open display, so perhaps its not i3. When running htop, I can see that Xorg is running with command
/usr/lib/Xorg :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
which should tell me that the correct display indeed is :0. I tried export DISPLAY=":0", but I don't know what to do after this. I did update my system yesterday via pacman, could something there have caused this? I see that i3wm for Arch was updated a couple of days ago, which could explain it. What should I do in order to get it working?
aahlback (31 rep)
Feb 2, 2022, 12:07 PM • Last activity: Jul 13, 2025, 05:05 AM
5 votes
1 answers
2770 views
i3wm running in Arch Linux guest (VirtualBox) stops auto-resizing
I'm trying to get Arch Linux to work on VirtualBox. I've followed the instructions on the [ArchWiki](https://wiki.archlinux.org/index.php/VirtualBox#Installation_steps_for_Arch_Linux_guests) and the OS boots fine (running `linux-lts kernel`, with `virtualbox-guest-dkms` Guest Additions installed). A...
I'm trying to get Arch Linux to work on VirtualBox. I've followed the instructions on the [ArchWiki](https://wiki.archlinux.org/index.php/VirtualBox#Installation_steps_for_Arch_Linux_guests) and the OS boots fine (running linux-lts kernel, with virtualbox-guest-dkms Guest Additions installed). After installing i3, I've added the following to ~/.xinitrc: VBoxClient-all exec i3 This appears to work, but does the auto-resizing only once. After that, the Auto-Resize Guest Display menu and Seamless Mode in host VirtualBox menu become disabled. What I found out, is that if I kill the VBoxClient process and re-initiate it, the auto-resize functionality starts to work again, but disables as soon the first resize event occurs. killall VBoxClient /usr/bin/VBoxClient-all Can anyone suggest a solution?
grittlydev (51 rep)
Sep 2, 2016, 07:26 PM • Last activity: Jul 6, 2025, 04:06 AM
0 votes
0 answers
14 views
The second screen monitor doesn’t work with i3 on VGA
# General overview I connected trough VGA cable a second screen to my laptop running i3, but the second screen stay black. The second screen just show a message “No signal” some seconds, then “Entering sleep mode” and become black. Strangely, when I disconnect the VGA cable, the screen wake up. ####...
# General overview I connected trough VGA cable a second screen to my laptop running i3, but the second screen stay black. The second screen just show a message “No signal” some seconds, then “Entering sleep mode” and become black. Strangely, when I disconnect the VGA cable, the screen wake up. #### Desambiguiation I read here in their that people who get trouble shooting in second screen with i3, get a black screen but with an appearing cursor. In my case, I see nothing. The screen is totally black. #### Softwares’s versions I am using - i3 4.22 - Debian 12 # What I did ## Analyse the situation First I saw what xrandr détect. As you see DP-2 is correctly detected.
% xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080     60.05*+  60.01    59.97    59.96    59.93    40.04
   1680x1050     59.95    59.88
   1400x1050     59.98
   1600x900      59.99    59.94    59.95    59.82
   1280x1024     60.02
   1400x900      59.96    59.88
   1280x960      60.00
   1440x810      60.00    59.97
   1368x768      59.88    59.85
   1280x800      59.99    59.97    59.81    59.91
   1280x720      60.00    59.99    59.86    59.74
   1024x768      60.04    60.00
   960x720       60.00
   928x696       60.05
   896x672       60.01
   1024x576      59.95    59.96    59.90    59.82
   960x600       59.93    60.00
   960x540       59.96    59.99    59.63    59.82
   800x600       60.00    60.32    56.25
   840x525       60.01    59.88
   864x486       59.92    59.57
   700x525       59.98
   800x450       59.95    59.82
   640x512       60.02
   700x450       59.96    59.88
   640x480       60.00    59.94
   720x405       59.51    58.99
   684x384       59.88    59.85
   640x400       59.88    59.98
   640x360       59.86    59.83    59.84    59.32
   512x384       60.00
   512x288       60.00    59.92
   480x270       59.63    59.82
   400x300       60.32    56.34
   432x243       59.92    59.57
   320x240       60.05
   360x202       59.51    59.13
   320x180       59.84    59.32
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 connected (normal left inverted right x axis y axis)
   1280x1024     60.02 +
   1280x960      60.00
   1024x768      60.00
   800x600       60.32
   640x480       59.94
   720x400       70.08
HDMI-2 disconnected (normal left inverted right x axis y axis)
## Trying to force the display on the second screen So, I try to configure DP-2 as the second screen with:
xrandr --output DP-2 --auto --right-of eDP-1 --mode 1280x1024 --primary
But then the second screen doesn’t work either. The Window Manager act like if a second screen exist, but in fact the second screen stay black as described before. # The question What to do to make the second screen work?
fauve (1529 rep)
Jun 27, 2025, 08:58 PM • Last activity: Jun 27, 2025, 10:11 PM
4 votes
2 answers
2180 views
How do I include shortcuts for the gnome setting program and wine apps in dmenu?
I would like to use `dmenu` as my launcher instead of the Gnome3-overlay that is displayed after hitting the super-key. From the Gnome3-overlay, I am able to launch both apps, gnome settings, and wine programs. In `dmenu`, I am so far only able to launch apps, and I can't seem to find the gnome sett...
I would like to use dmenu as my launcher instead of the Gnome3-overlay that is displayed after hitting the super-key. From the Gnome3-overlay, I am able to launch both apps, gnome settings, and wine programs. In dmenu, I am so far only able to launch apps, and I can't seem to find the gnome settings program or any of my wine apps. When I tried other launcher, such as synapse, they were able to find both the settings and wine apps, just like with the gnome-overlay. I prefer dmenu because it is the fastest and most aesthetically pleasing launcher I have come across. Is there a way to include shortcuts to the gnome setting program and my wine apps in dmenu? I am using Antegros Linux with Gnome 3.22 and dmenu 0.1 (specifically, the dmenu2 package from the AUR). --- ### Update For the gnome settings app, I figured out the name is gnome-control-center although it is called "Settings" in the Gnome3-overlay window. Adding the -z flag to dmenu helped by enabling fuzzy matching. I also found out that the keyboard subsection of the settings menu is launched via gnome-control-center keyboard, which is a little bothersome to type every time since it does not autocomplete. It seems like dmenu will find everything that I put on my $PATH, but I am not super keen on including all the desktop shortcuts there. Other launchers such as p-menu includes everything on $PATH and all the .desktop files on the system, which is the preferred behavior to me. p-menu does only seem to launch within a terminal, rather than as a popup (the latter being faster for me), so for the time being, I am using albert, which works great. I would still be interested in dmenu or a similar launcher, if they include .desktop-files.
joelostblom (1971 rep)
Dec 7, 2016, 12:53 AM • Last activity: Jun 22, 2025, 05:04 AM
2 votes
1 answers
3814 views
What can I do to fix occasional lagging of terminal emulator?
My terminal emulators are lagging occasionally. It's not heavy a lag. May be once in 20-30 mins( I think). The terminal becomes unresponsive and all the characters I typed during lag appears suddenly. It's not happening in any other app (even in SMPLAYER during 1080p video playback). The lag occurs...
My terminal emulators are lagging occasionally. It's not heavy a lag. May be once in 20-30 mins( I think). The terminal becomes unresponsive and all the characters I typed during lag appears suddenly. It's not happening in any other app (even in SMPLAYER during 1080p video playback). The lag occurs even during low memory usage(nearly 1 GB free). I thought there might be a problem in xterm and switched to xfce4-terminal emulator. problem still persisted. Then thought there might be a bug in bash and switched to zsh . still no luck. What's happening ? How can I narrow the down problem? system info : Arch + i3 + compton Update1: I thought my history size(1000) might be causing the problem and changed it to 100. And this doesn't seem to work either. Update2: My ~/.bashrc

#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
alias grep='grep --color=auto'

PS1='\[\033[32m\]\u\[\033[33m\]@\[\033[36m\]\h \[\033[31m\]\W\[\033[33m\]\$\[\033[00m\]'


## my settings
alias vi='vim'
alias vi_i3='vim ~/.config/i3/config'
alias pacs='sudo pacman -S'
alias pacss='pacman -Ss'
alias pacsyu='sudo pacman -Syu'
export TERMINAL='xfce4-terminal'
HISTSIZE=100
Update3: But in zsh I used very simple Prompt string without any color. Still it was lagging.
Abinash Dash (631 rep)
May 1, 2019, 05:47 PM • Last activity: May 19, 2025, 12:03 AM
0 votes
1 answers
6184 views
Virtualbox and Manjaro i3 (where is mod key)?
I am using Manjaro with i3 desktop on Virtualbox and I can't seem to figure out what the mod key is (I'm using a standard English keyboard). - I've done the expected finger mashing and have tried several different combinations to no avail. - I know the key to release from the Host is the Right-Cntrl...
I am using Manjaro with i3 desktop on Virtualbox and I can't seem to figure out what the mod key is (I'm using a standard English keyboard). - I've done the expected finger mashing and have tried several different combinations to no avail. - I know the key to release from the Host is the Right-Cntrl key. - I've read that the Windows (Super) key can be the mod key but this has not seemed to be successful for me. For instance, I've been trying to do Super+Enter to open a terminal.
zachaz35 (31 rep)
Mar 31, 2017, 06:28 PM • Last activity: May 16, 2025, 12:07 PM
8 votes
1 answers
4426 views
X11 controlling root window or setting a window to be the background window (wallpaper)
I would like an animated background image. Or better, to make an application be the background, with no interactivity, so I don't accidentally click on it. I've seen many discussions about setting images as background, but is there a way to set an arbitrary application as the background window? I've...
I would like an animated background image. Or better, to make an application be the background, with no interactivity, so I don't accidentally click on it. I've seen many discussions about setting images as background, but is there a way to set an arbitrary application as the background window? I've found this Gifsice snippet on the Arch BBS: gifsicle --animate --new-window root someAnimatedGif.gif but it just opened a regular window (I'm using i3 with LightDM on Arch). I've tried executing it when i3 starts (same result as running it from xterm) and putting it in .Xinitrc, which produced nothing. How/where should I run gifview and is it possible to use another application, such as VLC, as the background window and why does gifview --new-window root not change the root?
Rain Gloom (83 rep)
Aug 5, 2015, 05:07 PM • Last activity: May 15, 2025, 04:10 PM
0 votes
1 answers
1995 views
xrandr - Issues using --left-of to set up a second display
I have two monitors, DP-3 with 2560x1440 resolution, and HDMI-1 with 1920x1200 resolution. I want HDMI-1 to be displayed to the left of DP-3. When I run ```xrandr --output HDMI-1 --auto --right-of DP-3``` everything displays as intended, but when I use ```--left-of``` the entirety of what originally...
I have two monitors, DP-3 with 2560x1440 resolution, and HDMI-1 with 1920x1200 resolution. I want HDMI-1 to be displayed to the left of DP-3. When I run
--output HDMI-1 --auto --right-of DP-3
everything displays as intended, but when I use
--left-of
the entirety of what originally displayed on HDMI-1 gets displayed on the DP-3 monitor and the rest of what was originally displayed on DP-3 extends into the monitor of HDMI-1. There is another thread here from a few years ago where someone was having a similar issue, but the solution posted doesn't work for me. It also is never explained why
--left-of
apparently messes with scaling. I don't know if this helps, but I'm using i3 and LightDM as my windowing and display managers
user522454
Apr 16, 2022, 03:38 PM • Last activity: May 14, 2025, 06:03 PM
94 votes
6 answers
202195 views
i3wm : start applications on specific workspaces when i3 starts
How can I start applications on specific workspaces in i3 when it starts? Why is this not working in my config file? : workspace 1; exec firefox; workspace 2; exec chromium; workspace 1
How can I start applications on specific workspaces in i3 when it starts? Why is this not working in my config file? : workspace 1; exec firefox; workspace 2; exec chromium; workspace 1
Gradient (3749 rep)
Oct 19, 2013, 10:27 PM • Last activity: May 5, 2025, 07:57 PM
0 votes
1 answers
2057 views
Tiling Window manager performance issues i3wm. Is this wm specific or the environment?
I'm doing some development on a Raspberry Pi 4 with 4gb of ram. After about a week of using the default WM, lxde/openbox, I decided a really needed a tiling capability. So much better for development. I've always been a fan of DWM because it's fast and simple. However, in my brief experience with i3...
I'm doing some development on a Raspberry Pi 4 with 4gb of ram. After about a week of using the default WM, lxde/openbox, I decided a really needed a tiling capability. So much better for development. I've always been a fan of DWM because it's fast and simple. However, in my brief experience with i3wm, I like what I believe to be a unique feature when it comes to containerizing desktops. For example, if I'm on desktop 1, and open firefox, then I move to desktop 2 and open two terminals before firefox finishes loading, I want firefox on desktop 1. Not on 2 cluttering up my terminals. The problem is that i3wm is running stupid slow. It's driving me nuts. Does i3 have known performance issues compared to other tiling window managers? Is there a lighter alternative which still behaves as described above? Or is this some other type of issue? I haven't used i3 much but I'm pretty certain I used it about a decade ago without issue, on a desktop which at the time was probably significantly slower than a modern rpi.
mreff555 (131 rep)
Feb 24, 2021, 05:09 PM • Last activity: Apr 26, 2025, 04:09 AM
5 votes
1 answers
2444 views
How do I configure loginctl lock-sessions with i3?
Currently, I'm using i3 with `xscreensaver`. I would like to configure `loginctl` such that `lock-session` and `lock-sessions`. How is this supposed to be done? lock-session [ID...], unlock-session [ID...] Activates/deactivates the screen lock on one or more sessions, if the session supports it. Tak...
Currently, I'm using i3 with xscreensaver. I would like to configure loginctl such that lock-session and lock-sessions. How is this supposed to be done? lock-session [ID...], unlock-session [ID...] Activates/deactivates the screen lock on one or more sessions, if the session supports it. Takes one or more session identifiers as arguments. If no argument is specified, the session of the caller is locked/unlocked. lock-sessions, unlock-sessions Activates/deactivates the screen lock on all current sessions supporting it.
Evan Carroll (34663 rep)
Nov 21, 2020, 05:44 AM • Last activity: Apr 15, 2025, 08:05 PM
2 votes
1 answers
2889 views
i3: Can I temporarily force any new window to open floating?
In the case where I know a window is about to open, sometimes I want it to open normally (making other windows resize to make room), but other times I know I'll want it to float and avoid making things resize. One such scenario is when a lot of terminal windows are open, where resizing them will lea...
In the case where I know a window is about to open, sometimes I want it to open normally (making other windows resize to make room), but other times I know I'll want it to float and avoid making things resize. One such scenario is when a lot of terminal windows are open, where resizing them will lead to their display getting messy, and I'll only briefly want the new window. I don't want to configure rules per application or window class for this, at least not for the purposes of this question. What I'd like is to be able to hold a key as I'm expecting the window to open, and if the key is being held the new window will be forced to float, so other windows do not resize. Is such a thing possible? How might I achieve it?
tremby (563 rep)
Sep 9, 2020, 02:40 AM • Last activity: Apr 7, 2025, 01:13 PM
1 votes
0 answers
216 views
Arch Linux - Monitors will never go to sleep
Through searching I can only find people looking to solve the opposite issue. I am running Arch Linux with i3 as my window manager. I am using i3-lock to handle screen locking. I can lock the screen, however the monitors never go to sleep, and will stay on in perpetuity displaying the i3-lock blank...
Through searching I can only find people looking to solve the opposite issue. I am running Arch Linux with i3 as my window manager. I am using i3-lock to handle screen locking. I can lock the screen, however the monitors never go to sleep, and will stay on in perpetuity displaying the i3-lock blank screen. Here is the [relevant] output of xset q:
DPMS (Display Power Management Signaling):
  Standby: 300    Suspend: 300    Off: 1800
  DPMS is Enabled
  Monitor is On
Here is the part of my i3config where I declare my dpms settings:
exec --no-startup-id xset dpms 300 300 1800
 exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
I am using an AMD 6950XT, here is the (relevant) output of lspci -v:
01:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Upstream Port of PCI Express Switch (rev c0) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 16
	Memory at b0600000 (32-bit, non-prefetchable) [size=16K]
	Bus: primary=01, secondary=02, subordinate=03, sec-latency=0
	I/O behind bridge: 4000-4fff [size=4K] [16-bit]
	Memory behind bridge: b0300000-b05fffff [size=3M] [32-bit]
	Prefetchable memory behind bridge: a0000000-b01fffff [size=258M] [32-bit]
	Capabilities: 
	Kernel driver in use: pcieport

02:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch (prog-if 00 [Normal decode])
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch
	Flags: bus master, fast devsel, latency 0, IRQ 125
	Bus: primary=02, secondary=03, subordinate=03, sec-latency=0
	I/O behind bridge: 4000-4fff [size=4K] [16-bit]
	Memory behind bridge: b0300000-b05fffff [size=3M] [32-bit]
	Prefetchable memory behind bridge: a0000000-b01fffff [size=258M] [32-bit]
	Capabilities: 
	Kernel driver in use: pcieport

03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6950 XT] (rev c0) (prog-if 00 [VGA controller])
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6950 XT]
	Flags: bus master, fast devsel, latency 0, IRQ 179
	Memory at a0000000 (64-bit, prefetchable) [size=256M]
	Memory at b0000000 (64-bit, prefetchable) [size=2M]
	I/O ports at 4000 [size=256]
	Memory at b0400000 (32-bit, non-prefetchable) [size=1M]
	Expansion ROM at b0500000 [disabled] [size=128K]
	Capabilities: 
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21/23 HDMI/DP Audio Controller
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21/23 HDMI/DP Audio Controller
	Flags: bus master, fast devsel, latency 0, IRQ 199
	Memory at b0524000 (32-bit, non-prefetchable) [size=16K]
	Capabilities: 
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

03:00.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 73a6 (prog-if 30 [XHCI])
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device 73a6
	Flags: bus master, fast devsel, latency 0, IRQ 18
	Memory at b0300000 (64-bit, non-prefetchable) [size=1M]
	Capabilities: 
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci

03:00.3 Serial bus controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 USB
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 USB
	Flags: bus master, fast devsel, latency 0, IRQ 127
	Memory at b0520000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: 
	Kernel driver in use: i2c-designware-pci
How can I get my monitors to actually follow the DPMS settings? The monitors stay on 24/7, and I usually end up having to power them off and on, which is annoying.
JLCarveth (75 rep)
Jun 7, 2023, 06:06 PM • Last activity: Mar 18, 2025, 11:35 AM
0 votes
0 answers
26 views
i3 wm is changing my window size when i come back to gnome
I recently installed i3 Window Manager and am still getting used to it. When I switch back to GNOME, my terminal and other applications retain the tiling layout from i3, requiring me to manually resize them each time. Is there a way to prevent this and have my applications open in their default size...
I recently installed i3 Window Manager and am still getting used to it. When I switch back to GNOME, my terminal and other applications retain the tiling layout from i3, requiring me to manually resize them each time. Is there a way to prevent this and have my applications open in their default sizes in GNOME?
lightning space (1 rep)
Mar 6, 2025, 09:55 AM • Last activity: Mar 6, 2025, 04:48 PM
0 votes
0 answers
46 views
SSH Agent Scope Issue with i3 and Detached Process
I have an issue with scope of ssh-initialization. I have following script for ssh-init.sh: ``` #!/bin/zsh check-ssh-agent() { [ -S "$SSH_AUTH_SOCK" ] && { ssh-add -l >& /dev/null || [ $? -ne 2 ]; } } check-ssh-agent || export SSH_AUTH_SOCK=~/.tmp/ssh-agent.sock check-ssh-agent || eval "$(ssh-agent -...
I have an issue with scope of ssh-initialization. I have following script for ssh-init.sh:
#!/bin/zsh

check-ssh-agent() {
    [ -S "$SSH_AUTH_SOCK" ] && { ssh-add -l >& /dev/null || [ $? -ne 2 ]; }
}
check-ssh-agent || export SSH_AUTH_SOCK=~/.tmp/ssh-agent.sock
check-ssh-agent || eval "$(ssh-agent -s -a ~/.tmp/ssh-agent.sock)" > /dev/null

$SCRIPTS_PATH/ssh-add-keys.sh
and I have following script to start obsidian:
#!/bin/zsh

setsid zsh -c "env LANGUAGE=en_GB && source /home/eugene/.scripts/ssh-init.sh && notify-send \"test\" \"$(ssh-add -l)\" --icon \" \" -r 101037 && obsidian" &>/dev/null
and finally, I have a shortcut in i3 config:
bindsym $mod+n exec --no-startup-id $SCRIPTS_PATH/notes-start.sh
Behavior: Terminal Execution: When notes-start.sh is run directly from a terminal, Obsidian successfully accesses the SSH agent. i3 Execution: When notes-start.sh is run from the i3 shortcut, Obsidian fails to access the SSH agent. Verification: notify-send confirms that ssh-init.sh is executed, but ssh-add -l returns an empty list, indicating the agent isn't accessible at that point in the script. Problem Analysis: The issue appears to be related to SSH agent scope and environment variable propagation when launching the application from i3 and using setsid. i3 starts with a minimal environment, separate from the terminal session. setsid creates a new session, potentially isolating the Obsidian process from the environment set by ssh-init.sh. The SSH_AUTH_SOCK variable, that allows applications to connect to the ssh agent, is likely not being passed to the Obsidian process. Questions: How can I ensure the SSH_AUTH_SOCK environment variable is correctly propagated to the Obsidian process when launched via i3 and setsid? Are there alternative methods to detach the process that would preserve the SSH agent environment? Are there any i3 specific environment variable configurations that could solve this issue? How can I debug the environment variables that are present when obsidian is launched? Debugging Steps Taken: - Verified that ssh-init.sh is being executed using notify-send. - Used notify-send to output the results of ssh-add -l within the script. I'm seeking guidance on how to correctly manage the SSH agent scope in this scenario. Any insights into environment variable propagation, setsid behavior, and i3 configuration would be greatly appreciated.
Eugene Shtoka (1 rep)
Feb 26, 2025, 09:03 PM • Last activity: Feb 26, 2025, 11:23 PM
Showing page 1 of 20 total questions