openbsd-ports/x11/slim/patches/patch-slim_conf
landry 8e909080f1 Use sessionstart_cmd & sessionstop_cmd to transfer the ownership of
/dev/drm0 to the user logging in, and transfer it back to root upon logout.
If you have customized your /etc/slim.conf file, make sure to merge this
change.

Discussed with & hints by ajacoutot@
2014-01-13 20:00:50 +00:00

69 lines
2.7 KiB
Plaintext

$OpenBSD: patch-slim_conf,v 1.8 2014/01/13 20:00:50 landry Exp $
--- slim.conf.orig Wed Oct 2 00:38:05 2013
+++ slim.conf Mon Jan 13 20:50:42 2014
@@ -1,17 +1,17 @@
# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
-default_path /bin:/usr/bin:/usr/local/bin
-default_xserver /usr/bin/X
-#xserver_arguments -dpi 75
+default_path /bin:/usr/bin:${LOCALBASE}/bin:${X11BASE}/bin
+default_xserver ${X11BASE}/bin/X
+xserver_arguments vt05
# Commands for halt, login, etc.
-halt_cmd /sbin/shutdown -h now
+halt_cmd /sbin/shutdown -ph now
reboot_cmd /sbin/shutdown -r now
-console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
+console_cmd ${X11BASE}/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/usr/bin/head -1 /etc/motd; exec /usr/bin/login"
#suspend_cmd /usr/sbin/suspend
# Full path to the xauth binary
-xauth_path /usr/bin/xauth
+xauth_path ${X11BASE}/bin/xauth
# Xauth file for server
authfile /var/run/slim.auth
@@ -32,16 +32,18 @@ authfile /var/run/slim.auth
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
-# login_cmd exec /bin/sh - ~/.xinitrc %session
-login_cmd exec /bin/bash -login ~/.xinitrc %session
+login_cmd exec /bin/sh -l ~/.xinitrc %session
+# login_cmd exec /bin/bash -login ~/.xinitrc %session
# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
#
-# sessionstart_cmd some command
-# sessionstop_cmd some command
+# transfer /dev/drm0 ownership to the logged in user
+sessionstart_cmd chown %user /dev/drm0
+sessionstop_cmd chown root /dev/drm0
+
# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
@@ -54,7 +56,7 @@ login_cmd exec /bin/bash -login ~/.xinitrc %
sessions xfce4,icewm-session,wmaker,blackbox
# Executed when pressing F11 (requires imagemagick)
-screenshot_cmd import -window root /slim.png
+screenshot_cmd import -window root /tmp/slim.png
# welcome message. Available variables: %host, %domain
welcome_msg Welcome to %host
@@ -84,7 +86,7 @@ reboot_msg The system is rebooting...
current_theme default
# Lock file
-lockfile /var/run/slim.lock
+lockfile /var/run/slim.pid
# Log file
logfile /var/log/slim.log