Announcement

Collapse
No announcement yet.

Create desktop icon for shell script?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Hmm, this has turned out to be a tricky one. To troubleshoot further, I'd suggest:

    1. Post the contents of the .desktop files you created (with both methods), they should be in ~/.local/share/applications/

    2. Make sure they are executable.

    3. Try switching to the Folder View layout in Desktop Settings again, and then drag-and-drop the .desktop file into the desktop (alternatively you can copy the .desktop file in ~/Desktop folder, it should then appear in the Folder View), does it work then?

    4. Do the shortcuts work if you launch them from the applications menu?

    EDIT: Seems like I am chronologically synced with Ggeek
    Last edited by kubicle; Mar 30, 2018, 11:08 PM.

    Comment


      #17
      GreyGeek:

      Sorry -- got busy over the past few days.

      On the second tab did you check the “Run in Terminal” box?
      Yes

      In the first tab did you put the complete path to the script, including the script name (Home/yourname/somedir/script.sh) in the Command line?
      Not at first, as I lacked the actual name of the script. I added that to the .desktop file by editing it in Kate. Still doesn't work.

      Does your script have the execute permission set?
      Yes

      Did you supply a name and description?
      Yes.

      At least, I THINK those answers are correct. I am attaching the .desktop file here below:

      Code:
      [Desktop Entry]
      Comment[en_US]=sync Laptop to Office
      Comment=sync Laptop to Office
      Exec=/home/frank/data/base/fdata/ShellScripts/syncR-O.sh
      GenericName[en_US]=sync Laptop to Office
      GenericName=sync Laptop to Office
      Icon=utilities-terminal
      MimeType=
      Name[en_US]=syncR-O
      Name=syncR-O
      NoDisplay=false
      Path=
      StartupNotify=true
      Terminal=true
      TerminalOptions=
      Type=Application
      X-DBUS-ServiceName=
      X-DBUS-StartupType=
      X-KDE-SubstituteUID=false
      X-KDE-Username=
      Linux: Powerful, open, elegant. Its all I use.

      Comment


        #18
        Kubicle: Sorry, got busy. Just responding now.

        1. Post the contents of the .desktop files you created (with both methods), they should be in ~/.local/share/applications/
        Will attach at the end of this post. Already done for GreyGeek above using his method (unless I get them switched.) :-(

        3. Try switching to the Folder View layout in Desktop Settings again, and then drag-and-drop the .desktop file into the desktop (alternatively you can copy the .desktop file in ~/Desktop folder, it should then appear in the Folder View), does it work then?
        I couldn't make it work It appeared to run, but I got no terminal, and no request for the system password.

        4. Do the shortcuts work if you launch them from the applications menu?
        No. No though I can launch it from Dolphin if I choose "run in Konsole" from the right click context menu. They open in a terminal and run successfully.

        Code:
        [Desktop Entry]
        Categories=Qt;KDE;System;X-KDE-More;
        Comment[en_US]=
        Comment=
        Encoding=UTF-8
        Exec=/home/frank/data/base/fdata/ShellScripts/syncR-O.sh
        GenericName[en_US]=
        GenericName=
        Icon=applications-system
        MimeType=
        Name[en_US]=syncR-O.sh
        Name=syncR-O.sh
        NoDisplay=false
        Path=
        StartupNotify=false
        Terminal=true
        TerminalOptions=
        Type=Application
        X-DBUS-ServiceName=
        X-DBUS-StartupType=
        X-KDE-SubstituteUID=false
        X-KDE-Username=
        Linux: Powerful, open, elegant. Its all I use.

        Comment


          #19
          mmm... is the owner:group YOU?
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #20
            Originally posted by GreyGeek View Post
            mmm... is the owner:group YOU?
            Owner is frank, group is frank

            Yeah, I dunno.

            In any case, I'm going to let this drop. The script does run from Dolphin, and it does what I need it to do. That makes my machine functional until 18.04 is released. I will blow away this install when 18.04 is finally released (or more likely, 18.04.1 sometime in May or June), and learn how to use that. Little point in wasting any more time and energy learning to make a soon to be replaced distro work.

            Thanks for the help, all!

            Frank.
            Linux: Powerful, open, elegant. Its all I use.

            Comment


              #21
              As soon as the Neon team releases it riding on 18.04 I am going to switch by doing a fresh install. It will be good until April of 2023. At 77 it may last longer than I will! [emoji16]
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment

              Working...
              X