Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: How do you create an executable script to run from an icon?

  1. #21
    Join Date
    May 2009
    Location
    US
    Posts
    867

    Default Re: How do you create an executable script to run from an ic

    Thanks to you both for your references. I'll read up on those. I'm glad it's finally sorted as I was starting to pull my hair out over it
    IBM Thinkpad X60s | Intel L2400 | Intel 945GM | 3GB | openSUSE Tumbleweed
    Dell XPS 13 9360 | openSUSE Leap 42.3

  2. #22
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: How do you create an executable script to run from an ic

    I bet your /VAULT is mounted with noexec. Usually this happens without your explicitly mentioning noexec. If you look at man 8 mount you will see that certain options imply noexec, like user and users. To undo this explicit noexec, you have to put exec after user or after users in the mount options.

  3. #23
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    26,235

    Default Re: How do you create an executable script to run from an ic

    Quote Originally Posted by ken_yap View Post
    I bet your /VAULT is mounted with noexec. Usually this happens without your explicitly mentioning noexec. If you look at man 8 mount you will see that certain options imply noexec, like user and users. To undo this explicit noexec, you have to put exec after user or after users in the mount options.
    Thanks ken_yap, this must be the ultimate answer to this behaviour.
    Henk van Velden

  4. #24
    Join Date
    May 2009
    Location
    US
    Posts
    867

    Default Re: How do you create an executable script to run from an ic

    Quote Originally Posted by ken_yap View Post
    I bet your /VAULT is mounted with noexec. Usually this happens without your explicitly mentioning noexec. If you look at man 8 mount you will see that certain options imply noexec, like user and users. To undo this explicit noexec, you have to put exec after user or after users in the mount options.
    I guess that must be the reason as I certainly didn't explicitly specify exec. Thanks for highlighting that. It's useful to know.
    IBM Thinkpad X60s | Intel L2400 | Intel 945GM | 3GB | openSUSE Tumbleweed
    Dell XPS 13 9360 | openSUSE Leap 42.3

  5. #25
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: How do you create an executable script to run from an ic

    Quote Originally Posted by ken_yap View Post
    I bet your /VAULT is mounted with noexec. Usually this happens without your explicitly mentioning noexec. If you look at man 8 mount you will see that certain options imply noexec, like user and users. To undo this implicit noexec, you have to put exec after user or after users in the mount options.
    Small correction to my typo.

    Another way to work around the noexec is to run the script by doing:

    sh /VAULT/nameofscript

  6. #26
    JosephKK NNTP User

    Default Re: How do you create an executable script to run from an icon?

    On Sun, 28 Jun 2009 17:26:01 GMT, suse tpx60s
    <suse_tpx60s@no-mx.forums.opensuse.org> wrote:

    >
    >I seem to have a problem with the script. It's not doing anything. I
    >tried it as root too to make sure it was not a permission problem.
    >
    >The script is set to be executable so I'd expect clicking on it would
    >execute it - right? When I try launch the script directly it looks like
    >wine is trying to launch it.


    Try changing the "command line" to get the script to execute to
    "[/bin/]sh [./]|[~/]dothis[.sh]". I personally prefer .sh for shell
    scripts to remind me if what it is.
    The stuff inside "[]" may be optional. It kinda depends on other
    things on your system configuration; the "|" is an exclusive or /
    alternative method thing. All of this is pretty standard command line
    typography. See also Backus-Naur [Normal] Form (BNF).

  7. #27

    Default Re: How do you create an executable script to run from an ic

    If I understand your request, you simply want a shortcut icon on the desktop to run a script whenever you wish.

    Here is a very simple way in KDE 4.04 (I'm running SuSE 11) to create a shortcut on the desktop.

    (1) open filemanager (Dolphin)
    (2) navigate to and open Desktop icon
    (3) right click in open area
    (4) hover cursor over "create new" to open options
    (5) select "link to application"
    (6) a properties page will appear - select Application tab
    (7) Browse for the command (ie the file you wish to link to)
    (8) do same with Work path option (ie select its directory path)
    (9) in General tab change icon to heart's desire
    (10) Although permissions refer to root, ignore. Save, and the working icon should appear on the desktop. When ever you click on it, it will run the script.

    Hope this helps.

    Regards,

    Mark

  8. #28
    Join Date
    May 2009
    Location
    US
    Posts
    867

    Default Re: How do you create an executable script to run from an ic

    Thanks. that's pretty much how I did it in the end. The problem was the location of my script file. Once I moved it, the short cut worked.
    IBM Thinkpad X60s | Intel L2400 | Intel 945GM | 3GB | openSUSE Tumbleweed
    Dell XPS 13 9360 | openSUSE Leap 42.3

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •