User Tools

Site Tools


linux:lxdm_login_theming_setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:lxdm_login_theming_setup [2017/09/03 21:39]
wtoher Updated scripts while working on dvorak keyboard fix
linux:lxdm_login_theming_setup [2021/05/02 21:36]
Line 1: Line 1:
-====== LXDM Login Theming Setup ====== 
  
-====== Introduction ====== 
- 
-The ArchLinux Workstations are themed with either the ACM Logo or LUG logo.  They are set to alternate between workstations. 
- 
-====== Setup ====== 
- 
-<WRAP center round info 60%> 
-Setup the [[linux:​acm_custom_repo|ACM custom repo]] on the workstation first 
-</​WRAP>​ 
- 
-Install themes with this command and follow the post install instructions 
-<​code|bash>​ 
-pacman -S acm-lug-lxdm-themes 
-</​code>​ 
- 
-Unpack {{:​acm-themes.tar.gz|this archive with the ACM and LUG themes}} into /​usr/​share/​lxdm/​themes 
- 
-This is setup by several files: 
- 
-  * /​etc/​lxdm/​LoginReady 
-  * /​etc/​lxdm/​PreLogin (unused) 
-  * /​etc/​lxdm/​PostLogin 
-  * /​etc/​lxdm/​PostLogout 
-  * /​etc/​lxdm/​PreReboot (unused) 
-  * /​etc/​lxdm/​PreShutdown (unused) 
-  * /​etc/​lxdm/​lxdm.conf 
-  * /​etc/​lxdm/​SetLogo 
- 
-The directory also contains the Xsession file, which should not be edited manually 
- 
-** LoginReady ** - This is executed as root when LXDM is ready to show the screen. 
- 
-** PreLogin ** - Executed by LXDM as root. 
- 
-** SetLogo ** - Contains the sed regex for the link and IP, the '​even'​ and '​odd'​ themes settings, and detects which theme to use. 
- 
-====== Scripts ====== 
-Up to date as of **September 3, 2017**. 
- 
-==== /​etc/​lxdm/​LoginReady | (Executed as root) ==== 
-<code bash> 
-#!/bin/sh 
-/​etc/​lxdm/​SetLogo 
-#/​usr/​bin/​xsetroot -solid black 
-/​usr/​bin/​mount 172.29.0.6:/​acm-home /home 
-/​usr/​bin/​mount 172.29.0.7:/​pkgs-64 /​var/​cache/​pacman/​pkg 
-/​usr/​bin/​localectl set-keymap us 
-</​code>​ 
- 
-==== /​etc/​lxdm/​PostLogin | (Executed as logged-in user) ==== 
-<code bash> 
-#!/bin/sh 
-xset dpms 0 0 0 
-</​code>​ 
- 
-==== /​etc/​lxdm/​PostLogout | (Executed as logged-in user) ==== 
-<code bash> 
-#!/bin/bash 
- 
-#umount $HOME/​.local/​share/​Steam 
-xsetroot -solid black 
- 
-##Reset guest directory 
-sudo -n /​usr/​bin/​guestd $USER 
- 
-test -x /​usr/​bin/​pax11publish && /​usr/​bin/​pax11publish -r 
-# Terminate current user session 
-#killall --user $USER -TERM 
-#/​usr/​bin/​loginctl terminate-session $XDG_SESSION_ID 
-xset dpms 300 330 360 
-#if ! pgrep lxdm-greeter >> /dev/null 
-#then 
-#​ /​usr/​bin/​systemctl restart lxdm 
-#fi 
-</​code>​ 
- 
-==== /​etc/​lxdm/​SetLogo | (Inherently run as root be previous script.) ==== 
-<code bash> 
-#!/bin/bash 
-# 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: ​ 
-#               - Awk (Awk >= 4.1.0) 
-#               - Bash (GNU Bash >= 4.2) (;-P) 
- 
-# As of July 16, 2013, there resides 6 workstations in the ACM/LUG office. 
-_EVEN_THEME="​acm"​ 
-_ODD_THEME="​lug"​ 
-_IP="​$(ip addr | awk '/​inet/​ && /​enp/​{sub(/​\/​.*$/,"",​$2);​ print $2}' | cut -d'​.'​ -f4)" 
-_REMAIN=$(expr $_IP % 2) 
-if [ $_REMAIN -eq 0 ] 
-then 
-        echo "This is an ACM Logo." 
-        sed -i -e '​s/​^theme=.*/​theme='​$_EVEN_THEME'/'​ /​etc/​lxdm/​lxdm.conf 
-else 
-        echo "This is an LUG Logo." 
-        sed -i -e '​s/​^theme=.*/​theme='​$_ODD_THEME'/'​ /​etc/​lxdm/​lxdm.conf 
-fi 
-</​code>​ 
linux/lxdm_login_theming_setup.txt ยท Last modified: 2021/05/02 21:36 (external edit)