BSPWM unable to start: "Another window manager is already running."

As much as I love playing with bspwm, can’t get to find out why it isn’t unable to start normally.
Upon login the screen doesn’t run anything at all but the EOS wallpaper. Can see the mouse prompt and all commands are responsive too, except, when running a terminal and try to run bspwm from there to see what’s happening, i get greeted with this message:

Another window manager is already running.

Like, what other window manager? Have xfce, i3 and bspwm installed, but the window manager running is independent of each session, so it can be ran unless you login first. So, why does bspwm complaints there’s another manager running already?

Now, when I refresh the desktop a couple times, bspwm is able to start just fine, so whatever window manager was running before seems to be gone. Picom launches fine, terminals are transparent, polybar gets loaded, etc.

How can I diagnose what’s causing the problem here? Looked through the logs and didn’t see anything weird happening. Could optmus-manager be to blame here?
Anyway, if I can provide logs just tell me and I’ll see what I can dig.

Thanks my dudes.

Don’t have that option actually. Should I still add it?

Digging a bit further I see that when BSPWM launches it is unable to create its sock needed for the session:
photo_2021-06-21_17-07-52

BSPWM is there but not connected to anything at all.
After reloading the desktop it’s able to connect to its socket:
photo_2021-06-21_17-07-58

So I wonder what’s making it not connect to it’s socket at all?

How are you starting BSPWM? Selecting it on the login screen and typing user/pass or going to a tty session and typing startx ? I don’t think it should matter, but I’ll ask. Also, is there anything in your bspwmrc file that might be impacting this?

I use LightDM for all my session logins, so yes.
My bspwmrc is as follows:

  1 #! /bin/sh
  2 
  3 # Set environment
  4 #export BSPWM_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/bspwm" (breaks system
  5 
  6 ## EXCECUTE PROGRAMS AT START UP ##
  7 
  8 #xrandr --output DisplayPort-0 --primary --mode 2560x1440 --pos 0x1080 --rotate normal --output DisplayPort-1 --off --output HDMI-A-0 --mode 1920x1080 --pos 2560x952 --rotate right --output DVI-I-0 --mode 1920x1080 --pos 320x0 --rota    te normal
  9 xsetroot -cursor_name left_ptr
 10 #nitrogen --restore &
 11 pgrep -x sxhkd > /dev/null || sxhkd &
 12 #bspwm --replace
 13 #pgrep -x bspwm > /dev/null || bspwm -c ~/.config/bspwm/bspwmrc 
 14 #killall sxhkd 2>/dev/null || sxhkd &
 15 nm-applet
 16 fcitx5 &
 17 xfce4-power-manager
 18 optimus-manager-qt
 19 picom --config ~/.picom.conf -b
 20 #bspwm -c ~/.config/bspwm/bspwmrc
 21 /usr/lib/xfce4/notifyd/xfce4-notifyd
 22 #bspwm -s /tmp/bspwm_0_0-state -o 4
 23  
 24  ## LOAD CONFIG FILES ##
 25 
 26 $HOME/.config/polybar/colorblocks/scripts/pywal.sh
 27 $HOME/.config/polybar/launch.sh --colorblocks
 28  
 29  ## BSPWM SPECIFIC SETTINGS ##
 30 
 31 bspc monitor eDP1 -d I II III IV V VI VII VIII IX X
 32 #bspc monitor DVI-I-0 -d 1 2 3 4
 33 #bspc monitor DisplayPort-0 -d 5 6 7 8
 34 #bspc monitor HDMI-A-0 -d 10 11 12
 35 
 36 bspc config border_width         4
 37 bspc config window_gap           12
 38 
 39 bspc config split_ratio          0.52
 40 bspc config borderless_monocle   true
 41 bspc config gapless_monocle      true
 42  
 43  ## COLORS ##
 44 
 45 #source "$HOME/.cache/wal/colors.sh"
 46 #bspc config normal_border_color $background
 47 #bspc config focused_border_color $color1
 48 #bspc config active_border_color $color5
 49 #bspc config urgent_border_color $color3
 50 #bspc config presel_feedback_color $color2
 51  
 52  ## START PROGRAMS WITH SPECIAL SETTINGS (FLOATING, WORKSPACE) ##
 53 
 54 bspc rule -a Gimp desktop='^8' state=floating follow=on
 55 bspc rule -a Thunar desktop='^5'
 56 bspc rule -a mplayer2 state=floating
 57 bspc rule -a Kupfer.py focus=on
 58 bspc rule -a Screenkey manage=off


Do you see anything out of the norm?

Nothing jumps out to me as looking like an issue. To eliminate this being an issue you could try the generic file from here. If that one works, then I would work through your file line by line commenting one out at a time until you find the one that is the issue. If that bspwmrc file still gives you the same issue, then we can move on to something else being the cause.

SOLVED: Turns out the reason why BSPWM wasn’t starting correctly was because the processes needed to be deamonized. Adding the “&” at the end of each process allowed BSPWM to run fine.

xsetroot -cursor_name left_ptr &
    pgrep -x sxhkd > /dev/null || sxhkd &
    nm-applet &
    fcitx5 &
    xfce4-power-manager &
    optimus-manager-qt &
    picom --config ~/.picom.conf -b &
    /usr/lib/xfce4/notifyd/xfce4-notifyd &
    /usr/lib/polkit-kde-authentication-agent-1 &

Like so. Thanks to my good friend Pirate-Caveman over at Telegram for his help :smiley:

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.