################################################################################ # ############ . * . ############ # # ############ (SALEM) BEWITCHING ############ # # ############ ^^^ ############ # ################################################################################ "I dispute not that; though I find force to be very confused in this point: but supposing them bewitched, they may be possessed too: and it is an ordinary thing for a possession to be introduced by a bewitching, as there are many instances in History do confirm." - Samuel Willard, 1692, "Some Miscellany Observations on Our Present Debates Respecting Witchcrafts, in a Dialogue Between S. and B." ------------------------------------------------------------------------------ A WCL/Salem session startup, or "bewitching", may be initiated from either the tty1 console by issuing the `wcl' command, or from any display manager by pointing its setup to the /usr/bin/wcl script. From there, Salem takes over the entire process, using 'Bewitch" to configure and launch your preferred window manager, as well as its associated Xstartups. Bewitch is a complex, bash shell program that was written completely from scratch, and out-performs the typical Xsession script. In addition to going far beyond the call of duty, it produces a nicely-formatted standard output file, as well as a one-of-kind processing manifest, internally called "The Montgomery Logue." ** ************ *** ** TTY1 CONSOLE *** ** ************ *** Salem uses wcl-xinit to begin a window session. The wcl-xinit scripture is the WCL structure, alternative to the standard startx script. In our scenario, though, wcl-xinit only launches the X environment, then hands the remainder of duties over to Bewitch, as mentioned above. The command to initiate that process is "wcl", an abbreviation of Witch City Linux. It's also the central script that processes the various options of the Scripture Dashboard that call upon the tasks that comprise the Witch City Linux solution. ++ ++++++++++++ +++ ++ New Session +++ ++ ++++++++++++ +++ The option to the wcl command is the session executable, preceded with the '-x' argument: wcl -x . -------- Examples -------- wcl -x evilwm wcl -x twm ++ ++++++++++++++++ +++ ++ Previous Session +++ ++ ++++++++++++++++ +++ No argument required. The previous session can be launched by simply running the wcl script: wcl. ** **************** *** ** DISPLAY MANAGERS *** ** **************** *** The examples below represent an Arch Linux Amd64 installation, which is the system that the Witch City scripture targets. WCL and most of its associated programs may run in other Systemd-based systems, but I am not concentrating my efforts on those platforms, so you are on your own in those cases. ++ +++++++ +++ ++ LightDM +++ ++ +++++++ +++ Modify the following line in /etc/lightdm/lightdm.conf: #session-wrapper=/etc/lightdm/Xsession session-wrapper=/usr/bin/wcl ++ ++++ +++ ++ SDDM +++ ++ ++++ +++ The Arch Linux Wiki recommends creating an sddm.conf.d directory in /etc, and adding any modifications to the main configuration in a file stored in that directory. I imagine this is because SDDM likely overwrites the main configuration (/usr/lib/sddm/sddm.conf/default.conf) during updates. The file can be named anything of choice, such as 'WCL_Salem.conf' for our purposes, but _must_ contain the following lines (comment optional) to direct the session startup to the 'wcl' launch script: [X11] # Path to a script to execute when starting the desktop session SessionCommand=/usr/bin/wcl Alternatively, the above could be accomplished strictly from the command line as root: # mkdir /etc/sddm.conf.d # cd /etc/sddm.conf.d # touch WCL_Salem.conf (optional) # echo "[X11]" >WCL_Salem.conf # echo "SessionCommand=/usr/bin/wcl" >>WCL_Salem.conf ++ ++++ +++ ++ SLIM +++ ++ ++++ +++ Modify the following line in /etc/slim.conf: #login_cmd exec /bin/bash -login ~/.xinitrc %session login_cmd exec /usr/bin/wcl -x %session ++ +++ +++ ++ GDM +++ ++ +++ +++ IIRC, there used to be a configuration option available in the GDM setup to point to another Xsession script to use. That appears to no longer be the case, unless there is some hidden setting that I am not aware of at the moment. Instead, you can rename the Xsession script in /etc/gdm to something else, and then symlink /etc/gdm/Xsession script with /usr/bin/wcl: # cd /etc/gdm # mv Xsession gdm-xsession.orig # ln -s /usr/bin/wcl Xsession In addition, you will need to uncomment the following line in the [daemon] section of /etc/gdm/custom.conf file, or create it if it does not exist: [daemon] # Uncomment the line below to force the login screen to use Xorg WaylandEnable=false You could check the value of $XDG_SESSION_TYPE to see if you are running Wayland or not, but it's probably a good idea to do so anyway. ++ ++++ +++ ++ LXDM +++ ++ ++++ +++ Like GDM, LXDM doesn't appear to have a specific variable to set the Xsession script. So, again, just rename its Xsession script to something, and symlink it with the wcl script: # cd /etc/lxdm # mv Xsession lxdm-xsession.orig # ln -s /usr/bin/wcl Xsession ++ +++ +++ ++ XDM +++ ++ +++ +++ Simply modify this line in /etc/X11/xdm/xdm-config: FROM: DisplayManager*session: /etc/X11/xdm/Xsession TO: DisplayManager*session: /usr/bin/wcl ++ +++++++ +++ ++ WCL-XDM +++ ++ +++++++ +++ There is a special configuration for Witch City Linux that accompanied this installation. Follow the instructions of the XDM documentation in the README directory for details on setup. ** **************** *** ** ADDITIONAL NOTES *** ** **************** *** (1) I have not explored every display manager available, but I'm guessing all have similar setups you can research to modify. If worse comes to worse, you can always modify the .desktop in /usr/share/xsessions: TryExec= Exec=wcl -x ------- Example ------- TryExec=icewm Exec=wcl -x icewm (2) Bewitch doesn't read window manager options that any of the xsession .desktop files provide. Instead, it reads options from the sessionrc file. If a window manager requires an option, or you wish to provide one, you can issue those options from the sessionrc, such as the following for herbstluftwm: # [:@herbstluftwm:] [--locked] (3) Some .desktop files in /usr/share/xsessions are redundant. For example, startfluxbox and fluxbox both run the startfluxbox script. Likewise, openbox and openbox-session both run openbox-session. Modifying those to reflect startflux and fluxbox, or openbox and openbox-session will only last you through their next updates. Instead, you can modify them and copy the entire xsessions directory to another location, and then modify your display manager configuration to reflect that change. For instance, I generally copy /usr/share/xsessions to /usr/share/xorg-sessions, then change the following line in lightdm.conf: [LightDM] #sessions-directory=/usr/share/lightdm/sessions:/usr/share/xsessions:/usr/share/wayland-sessions sessions-directory=/usr/share/xorg-sessions From there, if I ever need to update those files, I do it manually. ################################################################################ # ############ . * . ############ # # ############ (SALEM) BEWITCHING ############ # # ############ ^^^ ############ # ################################################################################