Installed bspwm profile with manjaro-architect, now cannot add another session

bspwm
xinitrc

#1

Hello,
I installed bspwm profile with manjaro-architect. Bspwm logs in OK with x (alias for startx). I added budgie-desktop and and jwm, but I cannot start any of these sessions - after x jwm or x budgie I get logged in into bspwm session. What may be wrong? Do I need a DM, do I need dbus-x11?

.extend.xinitrc

#!/bin/sh
#
# ~/.extend.xinitrc
#
# Executed by startx (run your window manager from here)

[[ -f ~/.Xdefaults ]] && xrdb -merge ~/.Xdefaults

DMENU_FN="Terminus-15"
DMENU_NB="#000000"
DMENU_NF="#99CC99"
DMENU_SB="#99CC99"
DMENU_SF="#000000"
DMENU_OPTIONS="-fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB"
#export DMENU_FN DMENU_NB DMENU_NF DMENU_SF DMENU_SB DMENU_OPTIONS
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"

 #Bspwm is kept as default
DEFAULT_SESSION=bspwm-session

.xinitrc

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [[ -f ~/.extend.xinitrc ]];then
	. ~/.extend.xinitrc
else
	DEFAULT_SESSION=xfce4-session
fi

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
        [ -x "$f" ] && . "$f"
    done
    unset f
fi

get_session(){
	local dbus_args=(--sh-syntax --exit-with-session)
	case $1 in
		awesome       ) dbus_args+=(awesome) ;;
		bspwm         ) dbus_args+=(bspwm-session) ;;
		budgie        ) dbus_args+=(budgie-desktop) ;;
		cinnamon      ) dbus_args+=(cinnamon-session) ;;
		deepin        ) dbus_args+=(startdde) ;;
		enlightenment ) dbus_args+=(enlightenment_start) ;;
		fluxbox       ) dbus_args+=(startfluxbox) ;;
		gnome         ) dbus_args+=(gnome-session) ;;
		i3|i3wm       ) dbus_args+=(i3 --shmlog-size 0) ;;
		jwm           ) dbus_args+=(jwm) ;;
		kde           ) dbus_args+=(startkde) ;;
		lxde          ) dbus_args+=(startlxde) ;;
		lxqt          ) dbus_args+=(lxqt-session) ;;
		mate          ) dbus_args+=(mate-session) ;;
		xfce          ) dbus_args+=(xfce4-session) ;;
		openbox       ) dbus_args+=(openbox-session) ;;
		*             ) dbus_args+=($DEFAULT_SESSION) ;;
	esac

	echo "dbus-launch ${dbus_args[*]}"
}

exec $(get_session)


# twm &
# xclock -geometry 50x50-1+1 &
# xterm -geometry 80x50+494+51 &
# xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name login

.zprofile

PATH="/usr/local/sbin:/usr/bin/core_perl:/usr/local/bin:/usr/bin:$HOME/.config/bspwm/panel:$HOME/.bin"
export PANEL_FIFO="/tmp/panel-fifo"
export PATH
export XDG_CONFIG_HOME="$HOME/.config"
export BSPWM_SOCKET="/tmp/bspwm-socket"
export XDG_CONFIG_DIRS=/usr/etc/xdg:/etc/xdg
export PANEL_FIFO PANEL_HEIGHT PANEL_FONT_FAMILY
#[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec starx
# Following automatically calls "startx" when you login:
#[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx -- -keeptty -nolisten tcp > ~/.xorg.log 2>&1

I commented the last line of .zprofile. Maybe I need s.th. instead with
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]?


#2

Installing dbus-11 doesn’t change anything.
Installing and enabling lxdm-gtk3 makes me log in to bspwm no matter which session I select. But after I select JWM, I can log out from bspwm session and thenI get a JWM session with a tray and a JWM menu.


#3

I remembered that I already had this issue


But the solution there doesn’t make much sense to me anymore.


#4

Ok, replacing the .xinitrc file above with the old version from bspwm 16.06

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

[[ -f ~/.Xdefaults ]] && xrdb -merge ~/.Xdefaults

if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
    eval "$(dbus-launch --sh-syntax --exit-with-session)"
fi
DMENU_FN="Terminus-14"
DMENU_NB="#000000"
DMENU_NF="#99CC99"
DMENU_SB="#99CC99"
DMENU_SF="#000000"
DMENU_OPTIONS="-fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB"
#export DMENU_FN DMENU_NB DMENU_NF DMENU_SF DMENU_SB DMENU_OPTIONS
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
if [ -x /usr/bin/xdg-user-dirs-update ]; then

   /usr/bin/xdg-user-dirs-update
fi

 #Bspwm is kept as default
session=${1:-bspwm}

case $session in
    awesome           ) exec awesome;;
    bspwm             ) exec bspwm-session;;
    budgie            ) exec budgie-desktop;; #added now
    catwm             ) exec catwm;;
    spectrwm          ) exec spectrwm;;
    cinnamon          ) exec cinnamon-session;;
    dwm               ) exec dwm;;
    enlightenment     ) exec enlightenment_start;;
    ede               ) exec startede;;
    fluxbox           ) exec startfluxbox;;
    gnome             ) exec gnome-session;;
    gnome-classic     ) exec gnome-session --session=gnome-classic;;
    i3|i3wm           ) exec i3;;
    icewm             ) exec icewm-session;;
    jwm               ) exec jwm;;
    kde               ) exec startkde;;
    lxde              ) exec startlxde;;
    mate              ) exec mate-session;;
    monster|monsterwm ) exec monsterwm;;
    notion            ) exec notion;;
    openbox           ) exec openbox-session;;
    unity             ) exec unity;;
    xfce|xfce4        ) exec startxfce4;;
    xmonad            ) exec xmonad;;
    # No known session, try to run it as command
    *) exec $1;;
esac

allows me no now to login in JWM with x jwm and to Budgie with x budgie! :smile:
@oberon and @Chrysostomus, something needs to be done about .xinitrc…

Will test how it works with LXDM. The .xinitrc in this post doesn’t work with LXDM, I get the described behaviour that bspwm session overrides the selected session.


#5

Well some of the settings packages include an .extend.xinitrc file. Maybe this creates some havoc?


#6

I will compare what .xinitrc files are on my netbook install. I have LXDM-gtk3 there, bspwm as default session and LXDE-gtk3 and JWM in addition to it. I remember that I have your .xinitrc and .extend.xinitrc. The netbook was the problematic machine from the old topic I linked here.


#7

Ok, I have to bump this topic, becasue I cannot use the old .xinitrc


from bspwm edition anymore, because I cannot enter the € sign without making the desktop crash, see here:

The solution to avoid the crash is to install a DM. I installed and enabled XDM and now can enter the € sign. (I had a similar issue with an input event - plug in the power cable - on my netbook. There installing and enabling a DM resolved the issue.)
I also tried more advanced DMs (LightDM and LXDM) which allow selecting sessions - XDM does not allow this from what I was able to find out. But my second session Budgie doesn’t work with LXDM and LightDM anyway for unknown reason.

Bspwm however has some issues when started with a DM: each text file when opened in Nautilus opens in a new Gedit window, I cannot launch gnome-terminal, Evince doesn’t remember where I closed a PDF last time. This is not ideal but I canlive with that.

Please, help me find a solution for having the choice between multiple DE/WM sessions including bspwm! :confused:


#8

Hmm… I have the new default xinitrc. I can start gnome withx gnome and bspwm withx. Lightdm starts bspwm no matter what (although that may be my lightdm configuration).

Could it be that individual entries in xinitrc work, while others are broken?


#9

I installed manjaro-bspwm-setting on a Deepin install and I can log in to bspwm with lightDM.
(sterm doesn’t work, though, and most deepin apps have a thick black border within each bspwm window, so probably a bad combination.)

I will try a new install with Gnome or Budgie and add bspwm.


#10

Sterm can fail if locale is not set. Tmux really wants it to be set.


#11

Ok, will try to fix sterm later.

But I have to tell logging in to Deepin has become weird, because first I get the bespwm session, have to log out and get a Deepin session with limepanel on top. But this gets fixed by commenting out DEFAULT_SESSION=bspwm-session in .extend.xinitrc
So, @oberon’s guess was right.
I will test if this resolves the issue on other installs with bspwm.
Aaand, Gedit starts opening files in an existing window, so this fix is very promising for bspwm with a DM.

Edit: It doesn’t allow me to login to Budgie on my main install.


#12

That sucks. Annoying that xinitrc is loaded with displaymanager.


#13

Ok, I installed dbus-x11 and can now log in to Budgie with lightDM (not with x budgie, x and x bspwm also don’t work anymore), I also can log in to bspwm and text files now get opened in the same Gedit window.

Everything is resolved so far!

To sum up the solution:

  • If you have a problem with crashes occuring after the input of any particular key (like € or power cable plugged in/out) in a session started with x, x bspwm or x budgie or similar
  • and this gets resolved by starting the session with a display manager
  • then you need to comment out DEFAULT_SESSION=bspwm-session in ~/.extend.xinitrc
  • and maybe install dbus-x11 instead of dbus
    • in order to get text files opened in one Gedit window as a new tab
    • and in order to be able to start a Budgie session

[SOLVED] XFCE freeze when type special chars "¿" "&" and others (Manjaro 17.0.5 Gellivara - x86_64 Linux 4.9.51-1-MANJARO )
Установил i3 и xmonad, иксы на Manjaro Stable XFCE перестали загружаться
#14

Did you use openrc base?


#15

no, systemd. I wasn’t able to install Budgie on an OpenRC base due to gnome dependencies.


#16

Interesting, I though dbus-x11 was an openrc package. Thanks for the tip.


#17

I confirmed my fix on the netbook, there I can now log in to any session with LXDM.
Here also dbus-x11 is useful, with dbus text files would open is different Gedit windows and launching Roxterm gives this error


However I can log in to LXDE with normal dbus as well.


#18

Yet another case where dbus-x11 is useful: Pamac.

If you have dbus on your system:

  • you can launch pamac-manager from terminal if you log in via startx (or the alias x);
  • you cannot launch pamac-manager from terminal (you get a segfault) if you log in with a DM;
  • you can launch sudo pamac-manager from terminal if you log in with a DM;
  • you can launch pamac-manager with dmenu or morc_menu if you log in with a DM.

In order to be able to log in with a DM you need to remove ~/.extend.xinitrc or comment DEFAULT_SESSION=bswm-session there.

If you install dbus-x11 (which removes dbus as a conflicting package):

  • you can (suddenly) launch pamac-manager if you log in with a DM;
  • you can also launch it using all the other ways.

Here is a terminal output where I first launch pamac-manager while having dbus installed and having logged in via LightDM. Then I install dbus-x11 and can launch it anymore.

eugen@mjaro ~> pamac-manager

(pamac-manager:20623): Gtk-WARNING **: Theme parsing error: gtk-dark.css:2715:25: 'gtkopacity' is not a valid color name

(pamac-manager:20623): Gtk-WARNING **: Theme parsing error: gtk-dark.css:2725:15: Junk at end of value for padding

(pamac-manager:20623): Gtk-WARNING **: Theme parsing error: gtk-dark.css:2784:13: Junk at end of value for padding

** (pamac-manager:20623): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-IwHWFXGVGD: Connection refused

(pamac-manager:20623): GLib-GIO-CRITICAL **: g_dbus_proxy_new_sync: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

** (pamac-manager:20623): CRITICAL **: file /build/pamac/src/pamac-6.0.3/src/transaction.vala.c: line 18820: unexpected error: Error spawning command line “dbus-launch --autolaunch=6d40cec72aeb4ab2ac14662fecec18df --binary-syntax --close-stderr”: Child process exited with code 1 (g-spawn-exit-error-quark, 1)

** (pamac-manager:20623): CRITICAL **: pamac_user_daemon_get_lockfile: assertion 'self != NULL' failed

(pamac-manager:20623): GLib-GIO-CRITICAL **: g_file_new_for_path: assertion 'path != NULL' failed

** (pamac-manager:20623): CRITICAL **: pamac_user_daemon_get_repos_names: assertion 'self != NULL' failed

** (pamac-manager:20623): CRITICAL **: pamac_user_daemon_get_groups_names: assertion 'self != NULL' failed
fish: “pamac-manager” terminated by signal SIGSEGV (Address boundary error)
eugen@mjaro ~> sudo pacman -S dbus-x11
resolving dependencies...
looking for conflicting packages...
:: dbus-x11 and dbus are in conflict (libdbus). Remove dbus? [y/N] y

Packages (2) dbus-1.10.22-1 [removal]  dbus-x11-1.10.22-1

Total Download Size:   0.27 MiB
Total Installed Size:  1.00 MiB
Net Upgrade Size:      0.14 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
--2017-10-06 16:06:53--  https://mirror.netcologne.de/manjaro/testing/core/x86_64/dbus-x11-1.10.22-1-x86_64.pkg.tar.xz
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving mirror.netcologne.de... 194.8.197.22, 2001:4dd0:1234:1::deb
Connecting to mirror.netcologne.de|194.8.197.22|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 288088 (281K) [application/octet-stream]
Saving to: ‘/var/cache/pacman/pkg/dbus-x11-1.10.22-1-x86_64.pkg.tar.xz.part’

/var/cache/pacman/pkg/dbus-x11-1.10.22-1-x86_64 100%[=====================================================================================================>] 281.34K   709KB/s    in 0.4s    

2017-10-06 16:06:55 (709 KB/s) - ‘/var/cache/pacman/pkg/dbus-x11-1.10.22-1-x86_64.pkg.tar.xz.part’ saved [288088/288088]

(1/1) checking keys in keyring                                                                                     [####################################################################] 100%
(1/1) checking package integrity                                                                                   [####################################################################] 100%
(1/1) loading package files                                                                                        [####################################################################] 100%
(1/1) checking for file conflicts                                                                                  [####################################################################] 100%
(2/2) checking available disk space                                                                                [####################################################################] 100%
:: Processing package changes...
(1/1) removing dbus                                                                                                [####################################################################] 100%
(1/1) installing dbus-x11                                                                                          [####################################################################] 100%
:: Running post-transaction hooks...
(1/2) Updating system user accounts...
(2/2) Arming ConditionNeedsUpdate...
eugen@mjaro ~> pamac-manager

(pamac-manager:20728): Gtk-WARNING **: Theme parsing error: gtk-dark.css:2715:25: 'gtkopacity' is not a valid color name

(pamac-manager:20728): Gtk-WARNING **: Theme parsing error: gtk-dark.css:2725:15: Junk at end of value for padding

(pamac-manager:20728): Gtk-WARNING **: Theme parsing error: gtk-dark.css:2784:13: Junk at end of value for padding

** (pamac-manager:20728): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-IwHWFXGVGD: Connection refused
eugen@mjaro ~> 

#19

Thanks. I think it is time to move to dbus-x11.


#20

dbus-x11 is now included in bspwm edition. It is not in the iso, but comes with the regular installation