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









share|improve this question


























    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









    share|improve this question
























      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









      share|improve this question













      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 15 at 22:42









      Bretonator

      62




      62



























          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          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






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Terni

          A new problem with tex4ht and tikz

          Sun Ra