How to run QT APP when power button pressed in Ubuntu 20.04
-
Hello dear,
I Want to run my PowerOff Qt app when I press the power button, I have tried this solution:
https://superuser.com/questions/1523918/run-script-when-power-button-pressedmy power.sh in /etc/acpi/
contain :
./home/serviceit/PowerOff
any Solution Please -
Hello dear,
I Want to run my PowerOff Qt app when I press the power button, I have tried this solution:
https://superuser.com/questions/1523918/run-script-when-power-button-pressedmy power.sh in /etc/acpi/
contain :
./home/serviceit/PowerOff
any Solution Please@Service-IT
And what is your question? Have you even verified your script is executed?./home/serviceit/PowerOff
I have no idea what you think the current working directory is when this is executed, nor where
PowerOff
is actually located. -
@JonB said in How to run QT APP when power button pressed in Ubuntu 20.04:
./home/serviceit/PowerOff
./home/serviceit/PowerOff
this command works fine if i execute in command line or execute power.sh in the command line, but not working if the power button of the device is pressed
-
@Service-IT
And what is your question? Have you even verified your script is executed?./home/serviceit/PowerOff
I have no idea what you think the current working directory is when this is executed, nor where
PowerOff
is actually located.@JonB said in How to run QT APP when power button pressed in Ubuntu 20.04:
Have you even verified your script is executed?
What did you do about this?
@JonB said in How to run QT APP when power button pressed in Ubuntu 20.04:
I have no idea what you think the current working directory is when this is executed, nor where PowerOff is actually located.
Already said the above. Why in the world would you use a relative path??