summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorSimon Rettberg2013-06-22 19:33:20 +0200
committerSimon Rettberg2013-06-22 19:33:20 +0200
commit1126c915edcf371c9981706e97708c5e9984c07a (patch)
tree8b8ea5935591661ed37913852ba3a21ad1a19f30 /remote
parentMerge branch 'master' of simonslx:openslx-ng/tm-scripts (diff)
downloadtm-scripts-1126c915edcf371c9981706e97708c5e9984c07a.tar.gz
tm-scripts-1126c915edcf371c9981706e97708c5e9984c07a.tar.xz
tm-scripts-1126c915edcf371c9981706e97708c5e9984c07a.zip
[kdm] Add comments to kdmrc, change session directory
[dbus] Add rule that allows root to listen to all dbus communication (for debugging) [vmchooser] move session file to new session directory
Diffstat (limited to 'remote')
-rw-r--r--remote/modules/dbus/data/etc/dbus-1/system.d/99-nsa-prism-module.conf14
-rw-r--r--remote/modules/kdm/data/etc/kde4/kdm/kdmrc31
-rwxr-xr-xremote/modules/vmchooser/data/opt/openslx/xsessions/default.desktop (renamed from remote/modules/vmchooser/data/usr/share/xsessions/default.desktop)0
-rw-r--r--remote/modules/xorg/data/etc/X11/Xsession66
4 files changed, 68 insertions, 43 deletions
diff --git a/remote/modules/dbus/data/etc/dbus-1/system.d/99-nsa-prism-module.conf b/remote/modules/dbus/data/etc/dbus-1/system.d/99-nsa-prism-module.conf
new file mode 100644
index 00000000..b6470bd3
--- /dev/null
+++ b/remote/modules/dbus/data/etc/dbus-1/system.d/99-nsa-prism-module.conf
@@ -0,0 +1,14 @@
+<!DOCTYPE busconfig PUBLIC
+ "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+ <policy user="root">
+ <allow eavesdrop="true"/>
+ <allow eavesdrop="true"
+ send_type="method_call"
+ send_destination="*"
+ send_path="/org/freedesktop/DBus"
+ send_interface="org.freedesktop.DBus"
+ send_member="AddMatch"/>
+ </policy>
+</busconfig>
diff --git a/remote/modules/kdm/data/etc/kde4/kdm/kdmrc b/remote/modules/kdm/data/etc/kde4/kdm/kdmrc
index 26da07d2..c72b73be 100644
--- a/remote/modules/kdm/data/etc/kde4/kdm/kdmrc
+++ b/remote/modules/kdm/data/etc/kde4/kdm/kdmrc
@@ -1,6 +1,8 @@
[General]
PidFile=/var/run/kdm.pid
ServerVTs=-7
+# Always spawn :0 (this is the default but it won't hurt)
+StaticServers=:0
[X-*-Greeter]
UseTheme=true
@@ -9,32 +11,41 @@ UseBackground=false
GreetString=OpenSLX Workstation (%h)
SelectedUsers=
UserList=false
+AuthComplain=true
+AntiAliasing=true
[X-:*-Greeter]
AllowClose=false
UseAdminSession=true
-[X-:0-Core]
+[X-:0-Greeter]
+LogSource=/dev/xconsole
+PreselectUser=None
+UseAdminSession=false
+
+[X-*-Core]
AllowRootLogin=true
AllowShutdown=All
AutoLoginEnable=false
-Reset=/etc/kde4/kdm/Xreset
ServerAttempts=2
-#TODO: Xsession doesn't work because scripts are missing under /etc/X11/Xsession.d/
+# Custom directory so kdm never sees any other sessions - it's up to the vmchooser to list them
+SessionsDirs=/opt/openslx/xsessions
+
+# Session is executed to start the user's session (as the user)
+# "One of the keywords failsafe, default or custom, or a string to eval by a Bourne-compatible shell is passed as the first argument."
Session=/etc/kde4/kdm/Xsession
-SessionsDirs=/etc/X11/session,/usr/share/xsessions,/usr/share/apps/kdm/sessions
+# Reset is run after a session terminates (as root)
+Reset=/etc/kde4/kdm/Xreset
+# Setup is executed once before the greeter starts (as root)
Setup=/etc/kde4/kdm/Xsetup
+# Startup is executed on successful authentication, before the session is opened (as root)
Startup=/etc/kde4/kdm/Xstartup
-[X-:0-Greeter]
-LogSource=/dev/xconsole
-PreselectUser=None
-UseAdminSession=false
-
[Shutdown]
+AllowFifo=false
HaltCmd=/usr/bin/systemctl -ff poweroff
RebootCmd=/usr/bin/systemctl -ff reboot
-[xdmcp]
+[Xdmcp]
Enable=false
diff --git a/remote/modules/vmchooser/data/usr/share/xsessions/default.desktop b/remote/modules/vmchooser/data/opt/openslx/xsessions/default.desktop
index d33615cf..d33615cf 100755
--- a/remote/modules/vmchooser/data/usr/share/xsessions/default.desktop
+++ b/remote/modules/vmchooser/data/opt/openslx/xsessions/default.desktop
diff --git a/remote/modules/xorg/data/etc/X11/Xsession b/remote/modules/xorg/data/etc/X11/Xsession
index a9b3d43b..5734d8c4 100644
--- a/remote/modules/xorg/data/etc/X11/Xsession
+++ b/remote/modules/xorg/data/etc/X11/Xsession
@@ -3,36 +3,36 @@
#Workaround to start Xsession. The original Xsession script includes error handling functionality and sources other scrips from the Xsession.d/ directory.
#start selected session
- case "$1" in
- failsafe)
- # Failsafe session was requested.
- if [ -e /usr/bin/xterm ]; then
- if [ -x /usr/bin/xterm ]; then
- exec xterm -geometry +1+1
- else
- # fatal error
- errormsg "unable to launch failsafe X session ---" \
- "x-terminal-emulator not executable; aborting."
- fi
- else
- # fatal error
- errormsg "unable to launch failsafe X session ---" \
- "x-terminal-emulator not found; aborting."
- fi
- ;;
- *)
- # Specific program was requested.
- STARTUP_FULL_PATH=$(/opt/openslx/usr/bin/which "${1%% *}" || true)
- if [ -n "$STARTUP_FULL_PATH" ] && [ -e "$STARTUP_FULL_PATH" ]; then
- if [ -x "$STARTUP_FULL_PATH" ]; then
- exec $1
- else
- message "unable to launch \"$1\" X session ---" \
- "\"$1\" not executable; falling back to default session."
- fi
- else
- message "unable to launch \"$1\" X session ---" \
- "\"$1\" not found; falling back to default session."
- fi
- ;;
- esac
+case "$1" in
+ failsafe)
+ # Failsafe session was requested.
+ if [ -e /usr/bin/xterm ]; then
+ if [ -x /usr/bin/xterm ]; then
+ exec xterm -geometry +1+1
+ else
+ # fatal error
+ errormsg "unable to launch failsafe X session ---" \
+ "x-terminal-emulator not executable; aborting."
+ fi
+ else
+ # fatal error
+ errormsg "unable to launch failsafe X session ---" \
+ "x-terminal-emulator not found; aborting."
+ fi
+ ;;
+ *)
+ # Specific program was requested.
+ STARTUP_FULL_PATH=$(/opt/openslx/usr/bin/which "${1%% *}" || true)
+ if [ -n "$STARTUP_FULL_PATH" ] && [ -e "$STARTUP_FULL_PATH" ]; then
+ if [ -x "$STARTUP_FULL_PATH" ]; then
+ exec $1
+ else
+ message "unable to launch \"$1\" X session ---" \
+ "\"$1\" not executable; falling back to default session."
+ fi
+ else
+ message "unable to launch \"$1\" X session ---" \
+ "\"$1\" not found; falling back to default session."
+ fi
+ ;;
+esac