Created
September 23, 2022 08:17
-
-
Save Ghostbird/49c4fe7f2a3d248daf4b50c4a549f184 to your computer and use it in GitHub Desktop.
Script that prompts to mark AppImage executable, and subsequently launch it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Put this script somewhere, and mark it as the default program to open AppImage files. | |
# Now if you click an AppImage that's not marked as executable, | |
# it will prompt whether you want to make it so, and launch it. | |
zenity --question \ | |
--title 'AppImage is not executable' \ | |
--text 'This AppImage is not marked as executable. Do you want to mark it as executable and launch the program?' \ | |
--width=512 | |
if [[ $? = 0 ]] | |
then | |
chmod u+x $1 | |
"$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: This is a user-convenience script. It won't cover all scenarios: