How to make a desktop icon on centos 7 a trusted app?
up vote
1
down vote
favorite
I am fairly new to Linux. I have successfully created a desktop shortcut using the method where you create a new .desktop file and add in the information.
The issue I'd like to overcome is that the new shortcut has a dummy icon image and gives the 'untrusted application warning' when first launched.
I'd like to be able to create the shortcut and have it already trusted and have the icon appear nicely as soon as the command is executed. I've written a bash script for this and I think there must be a way to set this up so that it works nicely.
The end result is to eventually run a script that configures a new box to have all my desktop shortcuts pre-made and ready to go.
Here's the script:
#! /bin/bash
LT_RED='33[1;31m'
LT_GREEN='33[1;32m'
LT_BLUE='33[1;36m'
NC='33[0m' # NO COLOR
function CreateGeanyEnvVar(){
if [ ! -n "$GEANY_LN" ]; then
printf "${LT_GREEN}n => Creating GEANY_LN env var.${NC}"
GEANY_LN=$HOME/Desktop
else
printf "${LT_RED}n => GEANY_LN already exits.${NC}"
fi
}
function CreateGeanyDesktopIcon(){
printf "${LT_GREEN}n => Creating Geany Desktop Icon.${NC}n"
touch ${GEANY_LN}/geany.desktop
echo "[Desktop Entry]" >> ${GEANY_LN}/geany.desktop
echo "Type=Application" >> ${GEANY_LN}/geany.desktop
echo "Version=1.0" >> ${GEANY_LN}/geany.desktop
echo "Name=Geany" >> ${GEANY_LN}/geany.desktop
echo "GenericName=Integrated Development Environment" >> ${GEANY_LN}/geany.desktop
echo "Comment=A fast and lightweight IDE using GTK+" >> ${GEANY_LN}/geany.desktop
echo "Exec=geany %F" >> ${GEANY_LN}/geany.desktop
echo "Icon=geany" >> ${GEANY_LN}/geany.desktop
echo "Terminal=false" >> ${GEANY_LN}/geany.desktop
echo "Categories=GTK;Development;IDE;" >> ${GEANY_LN}/geany.desktop
echo "MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;" >> ${GEANY_LN}/geany.desktop
echo "StartupNotify=true" >> ${GEANY_LN}/geany.desktop
echo "Keywords=Text;Editor;" >> ${GEANY_LN}/geany.desktop
echo "X-Desktop-File-Install-Version=0.22" >> ${GEANY_LN}/geany.desktop
chmod 755 ${GEANY_LN}/geany.desktop
}
printf "${LT_GREEN}Setup Geany on CentOS 7n${NC}"
printf "${LT_GREEN}*********************************n${NC}"
CreateGeanyEnvVar
CreateGeanyDesktopIcon
linux bash desktop-customization centos-7
add a comment |
up vote
1
down vote
favorite
I am fairly new to Linux. I have successfully created a desktop shortcut using the method where you create a new .desktop file and add in the information.
The issue I'd like to overcome is that the new shortcut has a dummy icon image and gives the 'untrusted application warning' when first launched.
I'd like to be able to create the shortcut and have it already trusted and have the icon appear nicely as soon as the command is executed. I've written a bash script for this and I think there must be a way to set this up so that it works nicely.
The end result is to eventually run a script that configures a new box to have all my desktop shortcuts pre-made and ready to go.
Here's the script:
#! /bin/bash
LT_RED='33[1;31m'
LT_GREEN='33[1;32m'
LT_BLUE='33[1;36m'
NC='33[0m' # NO COLOR
function CreateGeanyEnvVar(){
if [ ! -n "$GEANY_LN" ]; then
printf "${LT_GREEN}n => Creating GEANY_LN env var.${NC}"
GEANY_LN=$HOME/Desktop
else
printf "${LT_RED}n => GEANY_LN already exits.${NC}"
fi
}
function CreateGeanyDesktopIcon(){
printf "${LT_GREEN}n => Creating Geany Desktop Icon.${NC}n"
touch ${GEANY_LN}/geany.desktop
echo "[Desktop Entry]" >> ${GEANY_LN}/geany.desktop
echo "Type=Application" >> ${GEANY_LN}/geany.desktop
echo "Version=1.0" >> ${GEANY_LN}/geany.desktop
echo "Name=Geany" >> ${GEANY_LN}/geany.desktop
echo "GenericName=Integrated Development Environment" >> ${GEANY_LN}/geany.desktop
echo "Comment=A fast and lightweight IDE using GTK+" >> ${GEANY_LN}/geany.desktop
echo "Exec=geany %F" >> ${GEANY_LN}/geany.desktop
echo "Icon=geany" >> ${GEANY_LN}/geany.desktop
echo "Terminal=false" >> ${GEANY_LN}/geany.desktop
echo "Categories=GTK;Development;IDE;" >> ${GEANY_LN}/geany.desktop
echo "MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;" >> ${GEANY_LN}/geany.desktop
echo "StartupNotify=true" >> ${GEANY_LN}/geany.desktop
echo "Keywords=Text;Editor;" >> ${GEANY_LN}/geany.desktop
echo "X-Desktop-File-Install-Version=0.22" >> ${GEANY_LN}/geany.desktop
chmod 755 ${GEANY_LN}/geany.desktop
}
printf "${LT_GREEN}Setup Geany on CentOS 7n${NC}"
printf "${LT_GREEN}*********************************n${NC}"
CreateGeanyEnvVar
CreateGeanyDesktopIcon
linux bash desktop-customization centos-7
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am fairly new to Linux. I have successfully created a desktop shortcut using the method where you create a new .desktop file and add in the information.
The issue I'd like to overcome is that the new shortcut has a dummy icon image and gives the 'untrusted application warning' when first launched.
I'd like to be able to create the shortcut and have it already trusted and have the icon appear nicely as soon as the command is executed. I've written a bash script for this and I think there must be a way to set this up so that it works nicely.
The end result is to eventually run a script that configures a new box to have all my desktop shortcuts pre-made and ready to go.
Here's the script:
#! /bin/bash
LT_RED='33[1;31m'
LT_GREEN='33[1;32m'
LT_BLUE='33[1;36m'
NC='33[0m' # NO COLOR
function CreateGeanyEnvVar(){
if [ ! -n "$GEANY_LN" ]; then
printf "${LT_GREEN}n => Creating GEANY_LN env var.${NC}"
GEANY_LN=$HOME/Desktop
else
printf "${LT_RED}n => GEANY_LN already exits.${NC}"
fi
}
function CreateGeanyDesktopIcon(){
printf "${LT_GREEN}n => Creating Geany Desktop Icon.${NC}n"
touch ${GEANY_LN}/geany.desktop
echo "[Desktop Entry]" >> ${GEANY_LN}/geany.desktop
echo "Type=Application" >> ${GEANY_LN}/geany.desktop
echo "Version=1.0" >> ${GEANY_LN}/geany.desktop
echo "Name=Geany" >> ${GEANY_LN}/geany.desktop
echo "GenericName=Integrated Development Environment" >> ${GEANY_LN}/geany.desktop
echo "Comment=A fast and lightweight IDE using GTK+" >> ${GEANY_LN}/geany.desktop
echo "Exec=geany %F" >> ${GEANY_LN}/geany.desktop
echo "Icon=geany" >> ${GEANY_LN}/geany.desktop
echo "Terminal=false" >> ${GEANY_LN}/geany.desktop
echo "Categories=GTK;Development;IDE;" >> ${GEANY_LN}/geany.desktop
echo "MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;" >> ${GEANY_LN}/geany.desktop
echo "StartupNotify=true" >> ${GEANY_LN}/geany.desktop
echo "Keywords=Text;Editor;" >> ${GEANY_LN}/geany.desktop
echo "X-Desktop-File-Install-Version=0.22" >> ${GEANY_LN}/geany.desktop
chmod 755 ${GEANY_LN}/geany.desktop
}
printf "${LT_GREEN}Setup Geany on CentOS 7n${NC}"
printf "${LT_GREEN}*********************************n${NC}"
CreateGeanyEnvVar
CreateGeanyDesktopIcon
linux bash desktop-customization centos-7
I am fairly new to Linux. I have successfully created a desktop shortcut using the method where you create a new .desktop file and add in the information.
The issue I'd like to overcome is that the new shortcut has a dummy icon image and gives the 'untrusted application warning' when first launched.
I'd like to be able to create the shortcut and have it already trusted and have the icon appear nicely as soon as the command is executed. I've written a bash script for this and I think there must be a way to set this up so that it works nicely.
The end result is to eventually run a script that configures a new box to have all my desktop shortcuts pre-made and ready to go.
Here's the script:
#! /bin/bash
LT_RED='33[1;31m'
LT_GREEN='33[1;32m'
LT_BLUE='33[1;36m'
NC='33[0m' # NO COLOR
function CreateGeanyEnvVar(){
if [ ! -n "$GEANY_LN" ]; then
printf "${LT_GREEN}n => Creating GEANY_LN env var.${NC}"
GEANY_LN=$HOME/Desktop
else
printf "${LT_RED}n => GEANY_LN already exits.${NC}"
fi
}
function CreateGeanyDesktopIcon(){
printf "${LT_GREEN}n => Creating Geany Desktop Icon.${NC}n"
touch ${GEANY_LN}/geany.desktop
echo "[Desktop Entry]" >> ${GEANY_LN}/geany.desktop
echo "Type=Application" >> ${GEANY_LN}/geany.desktop
echo "Version=1.0" >> ${GEANY_LN}/geany.desktop
echo "Name=Geany" >> ${GEANY_LN}/geany.desktop
echo "GenericName=Integrated Development Environment" >> ${GEANY_LN}/geany.desktop
echo "Comment=A fast and lightweight IDE using GTK+" >> ${GEANY_LN}/geany.desktop
echo "Exec=geany %F" >> ${GEANY_LN}/geany.desktop
echo "Icon=geany" >> ${GEANY_LN}/geany.desktop
echo "Terminal=false" >> ${GEANY_LN}/geany.desktop
echo "Categories=GTK;Development;IDE;" >> ${GEANY_LN}/geany.desktop
echo "MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;" >> ${GEANY_LN}/geany.desktop
echo "StartupNotify=true" >> ${GEANY_LN}/geany.desktop
echo "Keywords=Text;Editor;" >> ${GEANY_LN}/geany.desktop
echo "X-Desktop-File-Install-Version=0.22" >> ${GEANY_LN}/geany.desktop
chmod 755 ${GEANY_LN}/geany.desktop
}
printf "${LT_GREEN}Setup Geany on CentOS 7n${NC}"
printf "${LT_GREEN}*********************************n${NC}"
CreateGeanyEnvVar
CreateGeanyDesktopIcon
linux bash desktop-customization centos-7
linux bash desktop-customization centos-7
asked Nov 15 at 22:42
Bretonator
62
62
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375832%2fhow-to-make-a-desktop-icon-on-centos-7-a-trusted-app%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown