
Make Executable (Skip Executable Bit)
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
I hate this, I downloaded an untrusted application and want to execute it and THERE IT IS. This damn Executable Window.
Well I am to lazy to open the SHell and change its chmod.
Or even rightclick and change those Settings is to hard ;)
So I made this little Script. It allows you to directly change the chmod of the given File.
Note: This doesnt work on Remote Folders or Windows Partitions!
Just Rightclick of the given File and `Make Executable ! :)`
Installation is simple.
Just run the Program without any arguments.
The script prompts for the Installation.
Type: `y` if you hadn`t change your Home-Directory.
brucelee
10 years ago
Here's a small script which I use and makes the wine launcher skip the executable bit check:
#!/bin/bash
if [ "$(id -u)" != "0" ]; then printf "\n * You must run this script as root.\n\n"; exit 0; fi
echo '[Desktop Entry]
Type=Application
Name=Wine Windows Program Loader
Exec=wine start /unix %f
MimeType=application/x-ms-dos-executable;application/x-msi;application/x-win-lnk;application/x-ms-shortcut
Icon=wine
NoDisplay=true
Icon=wine
StartupNotify=true' > /tmp/wine.desktop
sudo cp --remove-destination /tmp/wine.desktop /usr/share/applications/wine.desktop
sudo rm -f /tmp/wine.desktop
Just put this in a file and run it as root. It should fix it. No need to call a script for each .exe you want to run.
Report
inameiname
10 years ago
!/bin/bash
# Change the Install_Path.
INSTALL_PATH="/home/$USER/.gnome2/nautilus-scripts"
# Set IFS so that it won't consider spaces as entry separators. Without this, spaces in file/folder names can make the loop go wacky.
IFS=$'\n'
# See if the Nautilus environment variable is empty
if [ -z $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS ]; then
# If it's blank, set it equal to $1
NAUTILUS_SCRIPT_SELECTED_FILE_PATHS=$1
fi
# Loop through the list (from either Nautilus or the command line)
for ARCHIVE_FULLPATH in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; do
NEWDIRNAME=${ARCHIVE_FULLPATH%.*}
FILENAME=${ARCHIVE_FULLPATH##*/}
NAME=${ARCHIVE_FULLPATH##*/.*}
if [ "$ARCHIVE_FULLPATH" ];then
gnome-terminal -x sudo chmod +x "$ARCHIVE_FULLPATH"
zenity --info --text="File "$ARCHIVE_FULLPATH" is now executable! :)"
else
# Install Script
echo "Installing Nautilus-Extension.."
echo "Install Script in: $INSTALL_PATH - Is that right? [y/n]"
read input
if [ "$input" == "y" ];then
mv "$0" "$INSTALL_PATH"
echo "Installation Successfully! :)"
else
echo ""
echo "Enter the /home/<name> NAME of your Homedir."
echo "Example: your home is /home/jjd - so type: jjd:"
read homedirname
sleep 1
echo "Installing Nautilus-Extension to /home/$homedirname/.gnome2/nautilus-scripts"
mv "$0" "/home/$homedirname/.gnome2/nautilus-scripts"
echo "Done! :)"
fi
fi
done
Report