User Tools

Site Tools


This is an old revision of the document!


The ArchLinux Workstations are themed with either the ACM Logo or LUG logo. They are set to alternate between workstations.

I(clee231)(Chase Lee) have written a script to determine and switch the logos based on hostname.

Currently, the script is setup to run once before logging in the user as root. This means that there needs to be at least one login for the script to run.


This is setup by two files:

  • /etc/lxdm/PreLogin
  • /etc/lxdm/SetLogo

PreLogin - This calls the SetLogo script. Executed by LXDM as root.

SetLogo - Contains a set of all six workstation hostnames, and detects which theme to use.


Up to date as of September 19, 2014.

/etc/lxdm/PreLogin | (Executed as root)

# Note: this is a sample and will not be run as is.
# Note: this is a sample and will not be run as is.
#loltask > /dev/null &
#mount -B /opt/Steam /home/$USER/Steam
#mount -B /opt/Steamlocal $HOME/.local/share/Steam
#if [ "$?" -ne "0" ]
#	mkdir -p $HOME/.local/share/Stean
#	mount -B /opt/Steamlocal $HOME/.local/share/Steam
#chown -R $USER:users $HOME/.local/share/Steam
#/bin/bash /etc/lxdm/SetLogo

/etc/lxdm/SetLogo | (Inherently run as root be previous script.)

# Authors: Chase Lee (clee231), Walter Dworak (walter)
# Date: September 15, 2014
# Version: 1.03
# Description: Determines and sets the login theming based on modulus 2 op on last segment of IPv4 address.
# Dependencies: 
#               - Sed (sed >= 4.2.2)
#               - Bash (GNU Bash >= 4.2) (;-P)
# As of July 16, 2013, there resides 6 workstations in the ACM/LUG office.
_IP="$(ip addr | awk '/inet/ && /enp/{sub(/\/.*$/,"",$2); print $2}' | cut -d'.' -f4)"
_REMAIN=$(expr $_IP % 2)
if [ $_REMAIN -eq 0 ]
        echo "This is an ACM Logo."
        sed -i -e 's/^theme=.*/theme='$_EVEN_THEME'/' /etc/lxdm/lxdm.conf
        echo "This is an LUG Logo."
        sed -i -e 's/^theme=.*/theme='$_ODD_THEME'/' /etc/lxdm/lxdm.conf
linux/lxdm_login_theming_setup.1410817292.txt.gz · Last modified: 2014/09/15 16:41 by walter