openSUSE Forums > Applications » How do you create an executable script to run from an icon?

Go Back   openSUSE Forums > Applications
Forums FAQ Members List Search Today's Posts Mark Forums Read


Applications Questions about desktops (KDE, Gnome, XFCE, etc.), software applications (configuration, usage, bugs, documentation)

Reply
Page 3 of 3 12 3
 
LinkBack Thread Tools Display Modes
  #21 (permalink)  
Old 29-Jun-2009, 05:03
suse_tpx60s's Avatar
Busy Penguin
 
Join Date: May 2009
Location: EU
Posts: 457
suse_tpx60s hasn't been rated much yet
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 11.1 | KDE4.3.3
ASUS
M3N78 | AMD 64x2 5400+ | nvidia 8200+ | 2GB | openSUSE 11.2 | KDE4.3.3
Reply With Quote
  #22 (permalink)  
Old 29-Jun-2009, 07:36
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,236
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
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.
Reply With Quote
  #23 (permalink)  
Old 29-Jun-2009, 07:52
hcvv's Avatar
Wise Penguin
 
Join Date: Jun 2008
Location: Netherlands
Posts: 1,913
hcvv 's reputation will be famous soon enoughhcvv 's reputation will be famous soon enoughhcvv 's reputation will be famous soon enough
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
Reply With Quote
  #24 (permalink)  
Old 29-Jun-2009, 11:22
suse_tpx60s's Avatar
Busy Penguin
 
Join Date: May 2009
Location: EU
Posts: 457
suse_tpx60s hasn't been rated much yet
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 11.1 | KDE4.3.3
ASUS
M3N78 | AMD 64x2 5400+ | nvidia 8200+ | 2GB | openSUSE 11.2 | KDE4.3.3
Reply With Quote
  #25 (permalink)  
Old 29-Jun-2009, 17:58
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,236
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
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
Reply With Quote
  #26 (permalink)  
Old 01-Jul-2009, 21:44
JosephKK
Guest
 
Posts: n/a
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).
Reply With Quote
  #27 (permalink)  
Old 05-Jul-2009, 15:47
Puzzled Penguin
 
Join Date: Jul 2008
Posts: 22
heseltine hasn't been rated much yet
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
Reply With Quote
  #28 (permalink)  
Old 06-Jul-2009, 08:50
suse_tpx60s's Avatar
Busy Penguin
 
Join Date: May 2009
Location: EU
Posts: 457
suse_tpx60s hasn't been rated much yet
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 11.1 | KDE4.3.3
ASUS
M3N78 | AMD 64x2 5400+ | nvidia 8200+ | 2GB | openSUSE 11.2 | KDE4.3.3
Reply With Quote
Reply
Page 3 of 3 12 3

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2