mirror of
https://github.com/kasmtech/workspaces-core-images.git
synced 2024-11-21 23:13:08 +01:00
Merge branch 'bugfix/KASM-1851_disable_screensaver' into 'develop'
KASM-1851 Disable Screensaver Closes KASM-1851 See merge request kasm-technologies/internal/workspaces-core-images!11
This commit is contained in:
commit
3a96329f08
@ -57,7 +57,7 @@ function start_kasmvnc (){
|
||||
|
||||
rm -rf $HOME/.vnc/*.pid
|
||||
|
||||
vncserver $DISPLAY -depth 24 -geometry $VNC_RESOLUTION -websocketPort $NO_VNC_PORT -cert ${HOME}/.vnc/self.pem -httpd ${KASM_VNC_PATH}/www -sslOnly -FrameRate=$MAX_FRAME_RATE -interface 0.0.0.0 $VNCOPTIONS
|
||||
vncserver $DISPLAY -depth $VNC_COL_DEPTH -geometry $VNC_RESOLUTION -websocketPort $NO_VNC_PORT -cert ${HOME}/.vnc/self.pem -httpd ${KASM_VNC_PATH}/www -sslOnly -FrameRate=$MAX_FRAME_RATE -interface 0.0.0.0 $VNCOPTIONS
|
||||
|
||||
KASM_PROCS['kasmvnc']=$(cat $HOME/.vnc/*${DISPLAY_NUM}.pid)
|
||||
|
||||
|
@ -3,11 +3,6 @@ set -e
|
||||
|
||||
echo -e "\n------------------ Xfce4 window manager startup------------------"
|
||||
|
||||
### disable screen saver and power management
|
||||
xset -dpms &
|
||||
xset s noblank &
|
||||
xset s off &
|
||||
|
||||
if [ "${START_XFCE4}" == "1" ] ;
|
||||
then
|
||||
echo "Starting XFCE"
|
||||
|
@ -14,6 +14,32 @@ get_rid_of_xfce_battery_widget() {
|
||||
yum remove -y xfce4-power-manager
|
||||
}
|
||||
|
||||
config_xinit_disable_screensaver() {
|
||||
mkdir -p /etc/X11/xinit/xinitrc.d/
|
||||
cat >/etc/X11/xinit/xinitrc.d/disable_screensaver.sh <<EOL
|
||||
#!/bin/sh
|
||||
set -x
|
||||
xset -dpms
|
||||
xset s off
|
||||
xset q
|
||||
EOL
|
||||
|
||||
chmod +x /etc/X11/xinit/xinitrc.d/disable_screensaver.sh
|
||||
}
|
||||
|
||||
replace_default_xinit() {
|
||||
|
||||
cat >/etc/X11/xinit/xinitrc <<EOL
|
||||
#!/bin/sh
|
||||
for file in /etc/X11/xinit/xinitrc.d/* ; do
|
||||
. \$file
|
||||
done
|
||||
. /etc/X11/Xsession
|
||||
EOL
|
||||
|
||||
chmod +x /etc/X11/xinit/xinitrc
|
||||
}
|
||||
|
||||
echo "Install Xfce4 UI components"
|
||||
if [ "$DISTRO" != "centos" ]; then
|
||||
apt-get update
|
||||
@ -43,6 +69,14 @@ else
|
||||
apt-get clean -y
|
||||
fi
|
||||
|
||||
|
||||
if [ "$DISTRO" = "centos" ]; then
|
||||
config_xinit_disable_screensaver
|
||||
else
|
||||
replace_default_xinit
|
||||
config_xinit_disable_screensaver
|
||||
fi
|
||||
|
||||
# Override default login script so users cant log themselves out of the desktop dession
|
||||
cat >/usr/bin/xfce4-session-logout <<EOL
|
||||
#!/usr/bin/env bash
|
||||
@ -72,4 +106,4 @@ cat >>/etc/xdg/Thunar/accels.scm<<EOL
|
||||
(gtk_accel_path "<Actions>/ThunarLauncher/delete" "Delete")
|
||||
(gtk_accel_path "<Actions>/ThunarLauncher/trash-delete-2" "")
|
||||
(gtk_accel_path "<Actions>/ThunarLauncher/trash-delete" "")
|
||||
EOL
|
||||
EOL
|
Loading…
Reference in New Issue
Block a user