File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change 1
- #! /usr/bin/env bash
1
+ #! /usr/bin/env sh
2
2
3
3
set -x
4
4
@@ -8,7 +8,20 @@ HEIGHT=$3
8
8
9
9
RESOLUTION_FILE=" /etc/X11/xorg.conf.d/resolution.conf"
10
10
11
- if [ " $ACTIVATE " = " True" ]; then
11
+ run_xrandr () {
12
+ if get_os2borgerpc_config os2_product | grep --quiet kiosk; then
13
+ USR=" chrome"
14
+ else
15
+ USR=" user"
16
+ fi
17
+
18
+ export DISPLAY=:0
19
+ export XAUTHORITY=/home/$USR /.Xauthority
20
+ echo " The valid resolutions are shown on the left in the list below:"
21
+ xrandr
22
+ }
23
+
24
+ if [ " $2 " != " " ] && [ " $ACTIVATE " = " True" ]; then
12
25
# Make sure the folder exists
13
26
mkdir --parents " $( dirname $RESOLUTION_FILE ) "
14
27
@@ -21,8 +34,8 @@ Section "Screen"
21
34
EndSubSection
22
35
EndSection
23
36
EOF
37
+ elif [ " $ACTIVATE " = " True" ]; then
38
+ run_xrandr && exit
24
39
else
25
40
rm --force $RESOLUTION_FILE
26
41
fi
27
- echo " The valid resolutions are shown on the left in the list below:"
28
- xrandr
You can’t perform that action at this time.
0 commit comments