Transitioning from i3+Plasma to i3. KDE graphical login clashing with .xinitrc?

My original install was with KDE. Then I installed i3-gaps on top of it and got it running with Plasma, which has been awesome. But I'd like to begin my transition to i3, preferably while maintaining access to i3+Plasma.

At boot, the system loads into the graphical login screen that had always loaded with KDE, and I can choose between [i3/i3+Plasma/Plasma] from a drop-down menu.

Now, all of these options seem to work correctly, but the i3 option seems to be bypassing .xinitrc. I suspect this is due to the graphical login, but I don't really understand how that piece loads.

So, what are my issues...

  1. I don't understand what's happening - and that's a Linux no-no for me.
  2. I'd like to control my wm's better. Like, I was trying to load a different .config/i3/config for i3 vs i3+Plasma via my .xinitrc as seen below.
  3. KDE processes are running under the i3 option, including kwalletd5, kglobalaccel5, baloo_file.

Here's my...

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


sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap # NEW KEYMAPPING
# changes Caps_Lock->Hyper_R and Shift+Caps_Lock->NoSymbol for usage with i3
# See https://wiki.archlinux.org/index.php/xmodmap#Modifier_keys


#DEFAULT_SESSION=startkde


#################################################################
## merge in X database resources

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


#################################################################
## set keymappings

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

# keyboard auto-repeat delay and repeat-rate in ms
xset r rate 600 25

#################################################################
## load any scripts in xinitrc.d

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



#################################################################

touch $HOME/.xinitrc-activated


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|i3-gaps) cat $HOME/.config/i3/config.i3 > $HOME/.config/i3/config
		                 dbus_args+=(i3 --shmlog-size 0) ;;
		jwm) dbus_args+=(jwm) ;;
		kde) cat $HOME/.config/i3/config.plasma > $HOME/.config/i3/config
			 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)

Note that the touched file .xinitrc-activated is never created.

I should note that I don't particularly need the graphical startup screen. I mainly don't understand X well enough to know what's going on, but I do see that the startup screen is reading options found in

ls -l /usr/share/xsessions/
-rw-r--r-- 1 root root  197 May 17 08:51 i3.desktop
-rw-r--r-- 1 root root  174 May 17 08:51 i3-with-shmlog.desktop
-rw-r--r-- 1 root root 2.5K May 27 01:01 plasma.desktop
-rw-r--r-- 1 root root  185 Mar 19 13:32 plasma-i3-gap.desktop

Thank you

.xinitrc is only read if you use startx. Not an i3 user, so not sure what you should use instead....
.xprofile
.profile
Are examples which may work :smiley:

:edit: .xprofile

https://wiki.archlinux.org/index.php/Xprofile

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

Forum kindly sponsored by