first commit
This commit is contained in:
31
run_at_boot.txt
Normal file
31
run_at_boot.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
# warning change the default paths of venv and python script in this file and one.py
|
||||
{
|
||||
only if you changes the default path on dhruv's mini-pc or else shred to another computer.
|
||||
}
|
||||
|
||||
|
||||
echo $DISPLAY
|
||||
echo $XAUTHORITY
|
||||
{
|
||||
(myenv) dhruv@H81-Motherboard:~/Desktop/python_power_button__based__rustdesk_toggler$ echo $DISPLAY
|
||||
echo $XAUTHORITY
|
||||
:0
|
||||
/run/user/1000/gdm/Xauthority
|
||||
(myenv) dhruv@H81-Motherboard:~/Desktop/python_power_button__based__rustdesk_toggler$
|
||||
}
|
||||
|
||||
|
||||
sudo crontab -e
|
||||
|
||||
{
|
||||
# saved this to lastline
|
||||
@reboot DISPLAY=:0 XAUTHORITY=/run/user/1000/gdm/Xauthority /home/dhruv/Desktop/python_power_button__based__rustdesk_toggler/myenv/bin/python /home/dhruv/Desktop/python_power_button__based__rustdesk_toggler/one.py >> /home/dhruv/logs/cron_pushbutton.log 2>&1
|
||||
@reboot sleep 30 && DISPLAY=:0 XAUTHORITY=/run/user/1000/gdm/Xauthority /home/dhruv/Desktop/python_power_button__based__rustdesk_toggler/myenv/bin/python /home/dhruv/Desktop/python_power_button__based__rustdesk_toggler/one.py >> /home/dhruv/logs/cron_pushbutton.log 2>&1
|
||||
|
||||
}
|
||||
|
||||
chmod +x /home/dhruv/Desktop/python_power_button__based__rustdesk_toggler/one.py
|
||||
|
||||
mkdir /home/dhruv/logs/
|
||||
|
||||
cat /home/dhruv/logs/cron_pushbutton.log
|
||||
Reference in New Issue
Block a user