File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,10 @@ xdg_install_f() {
6666 # Make Arduino IDE the default application for *.ino
6767 xdg-mime default ${RESOURCE_NAME} .desktop text/x-arduino
6868
69+ if [ x${SUDO_USER} != x ]; then
70+ chown ${SUDO_USER} " ${XDG_DESKTOP_DIR} /${RESOURCE_NAME} .desktop"
71+ fi
72+
6973 # Add symlink for arduino so it's in users path
7074 echo " " # Ensure password request message is on new line
7175 if ! ln -s ${SCRIPT_PATH} /arduino /usr/local/bin/arduino; then
@@ -102,6 +106,9 @@ simple_install_f() {
102106 cp " ${TMP_DIR} /${RESOURCE_NAME} .desktop" " ${XDG_DESKTOP_DIR} /"
103107 # Altering file permissions to avoid "Untrusted Application Launcher" error on Ubuntu
104108 chmod u+x " ${XDG_DESKTOP_DIR} /${RESOURCE_NAME} .desktop"
109+ if [ x${SUDO_USER} != x ]; then
110+ chown ${SUDO_USER} " ${XDG_DESKTOP_DIR} /${RESOURCE_NAME} .desktop"
111+ fi
105112 fi
106113
107114 # Add symlink for arduino so it's in users path
You can’t perform that action at this time.
0 commit comments