mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-30 19:52:13 +01:00
Linux: fix icon permissions if installed via sudo
This commit is contained in:
parent
6b770d0190
commit
c3675a8bef
7
build/linux/dist/install.sh
vendored
7
build/linux/dist/install.sh
vendored
@ -66,6 +66,10 @@ xdg_install_f() {
|
|||||||
# Make Arduino IDE the default application for *.ino
|
# Make Arduino IDE the default application for *.ino
|
||||||
xdg-mime default ${RESOURCE_NAME}.desktop text/x-arduino
|
xdg-mime default ${RESOURCE_NAME}.desktop text/x-arduino
|
||||||
|
|
||||||
|
if [ x${SUDO_USER} != x ]; then
|
||||||
|
chown ${SUDO_USER} "${XDG_DESKTOP_DIR}/${RESOURCE_NAME}.desktop"
|
||||||
|
fi
|
||||||
|
|
||||||
# Add symlink for arduino so it's in users path
|
# Add symlink for arduino so it's in users path
|
||||||
echo "" # Ensure password request message is on new line
|
echo "" # Ensure password request message is on new line
|
||||||
if ! ln -s ${SCRIPT_PATH}/arduino /usr/local/bin/arduino; then
|
if ! ln -s ${SCRIPT_PATH}/arduino /usr/local/bin/arduino; then
|
||||||
@ -102,6 +106,9 @@ simple_install_f() {
|
|||||||
cp "${TMP_DIR}/${RESOURCE_NAME}.desktop" "${XDG_DESKTOP_DIR}/"
|
cp "${TMP_DIR}/${RESOURCE_NAME}.desktop" "${XDG_DESKTOP_DIR}/"
|
||||||
# Altering file permissions to avoid "Untrusted Application Launcher" error on Ubuntu
|
# Altering file permissions to avoid "Untrusted Application Launcher" error on Ubuntu
|
||||||
chmod u+x "${XDG_DESKTOP_DIR}/${RESOURCE_NAME}.desktop"
|
chmod u+x "${XDG_DESKTOP_DIR}/${RESOURCE_NAME}.desktop"
|
||||||
|
if [ x${SUDO_USER} != x ]; then
|
||||||
|
chown ${SUDO_USER} "${XDG_DESKTOP_DIR}/${RESOURCE_NAME}.desktop"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add symlink for arduino so it's in users path
|
# Add symlink for arduino so it's in users path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user