-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDisableCursor.sh
More file actions
executable file
·39 lines (30 loc) · 1.25 KB
/
Copy pathDisableCursor.sh
File metadata and controls
executable file
·39 lines (30 loc) · 1.25 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
31
32
33
34
35
36
37
38
39
#!/bin/bash
##################################################
# Simple script to disable mouse cursor if it has been
# re-enabled using the EnableCursor script
##################################################
# Logo Call
echo "###################################################"
echo "###################################################"
echo -e "\n"
cat jhart_shell_logo.txt
echo -e "\n"
echo "###################################################"
echo "###################################################"
##################################################
_Cursor_Enabled=$(ls /etc/lightdm/ | grep "lightdm.conf.DSbackup")
echo -e "\nChecking to see if mouse cursor is already disabled."
if [ "" == "$_Cursor_Enabled" ];
then
echo "Now backing up the lightdm.conf file and then editing the file to disable the mouse cursor."
sleep 5
sudo cp /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.DSbackup
sudo sed -i 's/#xserver-command=X/xserver-command=X -nocursor/' /etc/lightdm/lightdm.conf
echo "Mouse cursor has been disabled. Please reboot your pi for changes to take effect."
else
echo "Nothing to be done. Your mouse cursor has already been disabled."
sleep 3
fi
##################################################
echo "All done!! Thank you -JHart"
exit