This repository was archived by the owner on Dec 31, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·30 lines (25 loc) · 1.37 KB
/
install.sh
File metadata and controls
executable file
·30 lines (25 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
if [ $UID != 0 ]; then
echo "Please run this installer as root."
exit 1
fi
ICON_LOCATION=/usr/share/pixmaps/reboot-to-windows.svg
EXECUTABLE_LOCATION=/usr/bin/reboot-to-windows
WRAPPER_LOCATION=/usr/lib/reboot-to-windows-pkexec.sh
DESKTOP_FILE_LOCATION=/usr/share/applications/reboot-to-windows.desktop
install -Dm644 icons/reboot-to-windows.svg "$ICON_LOCATION"
install -Dm755 scripts/reboot-to-windows.sh "$EXECUTABLE_LOCATION"
install -Dm755 scripts/reboot-to-windows-pkexec.sh "$WRAPPER_LOCATION"
install -Dm644 reboot-to-windows.desktop "$DESKTOP_FILE_LOCATION"
if [ "$DESKTOP_SESSION" = "plasma" ]; then # If user running KDE Plasma:
# Check for 'qdbus' command. If empty, set to -1.
QDBUS=`which qdbus 2>/dev/null || echo -1`
if [ "$QDBUS" = "-1" ]; then # If qdbus command not found:
echo "Install the 'qt' or 'qt5-tools' or similar package from your package manager to provide support for KDE's reboot prompt."
fi
fi
echo "**********************************************************************"
echo "To allow wheel users to reboot to Windows without a password, copy the polkit files:"
echo " sudo cp ./polkit/wartybix.reboot-to-windows.policy /usr/share/polkit-1/actions/"
echo " sudo cp ./polkit/50-wartybix.reboot-to-windows.rules /usr/share/polkit-1/rules.d/"
echo "**********************************************************************"