[opensuse] Executing shell scripts from Konqueror web-browser
Hi, I have a local webpage which displays music album covers from my music collection. Each album cover image is clickable, pointing to a file such as file:////home/bob/AlbumBrowser/Scripts-BHF/ImeldaMay_LoveTattoo-Play.sh which, as you can see is a shell script. The script makes MPD play the album (it could just as easily feed the *.flac or *.mp3 to mplayer or amarok, etc). When I left click on an album cover in Firefox, the music plays, as expected. However Konqueror insists on asking me whether I want to use Kate, Kwrite, or some other text editor to open the *.sh file. Right clicking opens a context menu, which includes the option to 'Open in bash' which is helpful, but I'd like to just left click and have the action executed. I've tried Settings > File Associations > applications > x-shellscript, where I've added bash to the top of the list in Application Preference order, but Konqueror still asks me which editor I want open the shell script in. All the shell scripts are executable. I've googled, but in this case google was not my friend :( Any suggestions, please? TIA, Bob -- Registered Linux User #463880 FSFE Member #1300 GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E openSUSE 11.3 64-bit, Kernel 2.6.36.90-desktop, KDE 4.5.3 Intel Core2 Quad Q9400 2.66GHz, 8GB DDR RAM, nVidia GeForce 9600GT -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 02/13/2011 04:57 AM, Bob Williams wrote:
I've tried Settings > File Associations > applications > x-shellscript, where I've added bash to the top of the list in Application Preference order, but Konqueror still asks me which editor I want open the shell script in. All the shell scripts are executable.
I've googled, but in this case google was not my friend :(
Any suggestions, please?
TIA,
Bob
Bob, I don't know if you have gotten this solved yet, but you are looking in the right places. What about adding an 'xterm -e command options'? Or will Tools -> Execute Shell Command (ctrl+e) work? If Properties -> Permissions -> "is executable" is set you can just run it with ctrl+e. If "is executable" is empty, the just 'ctrl+e' and add 'sh ....' to the beginning of the dialog. There must be some way to associate Execute Shell Command with a left click, but I've not used it. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi David, Once again, thank you for your interest in my problems :) On Tuesday 22 Feb 2011 03:52:32 David C. Rankin wrote:
On 02/13/2011 04:57 AM, Bob Williams wrote:
I've tried Settings > File Associations > applications > x-shellscript, where I've added bash to the top of the list in Application Preference order, but Konqueror still asks me which editor I want open the shell script in. All the shell scripts are executable.
I've googled, but in this case google was not my friend :(
Any suggestions, please?
TIA,
Bob
Bob,
I don't know if you have gotten this solved yet, but you are looking in the right places. What about adding an 'xterm -e command options'?
Not yet solved, but I've gone back to using Firefox, which behaves as intended in this context.
Or will Tools -> Execute Shell Command (ctrl+e) work? If Properties -> Permissions -> "is executable" is set you can just run it with ctrl+e. If "is executable" is empty, the just 'ctrl+e' and add 'sh ....' to the beginning of the dialog.
I think part of the problem is that Konqueror sees a shell script, executable bit set or not, as a text file to be edited, and refuses to acknowledge that I've put /bin/bash as the application to open it with. OTOH, files such as *.rm are seen as appropriate food for Kaffeine, MPlayer, VLC etc. :( Aha! Solved :) The scripts that I want to execute are all of the form path/artist_album-Play.sh or path/artist_album-Enqueue.sh. So I set a couple of filetypes *Play.sh and *Enqueue.sh to be associated with bash.
There must be some way to associate Execute Shell Command with a left click, but I've not used it.
Thank you for prompting me to have one more go at this problem :) Bob -- Registered Linux User #463880 FSFE Member #1300 GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E openSUSE 11.3 64-bit, Kernel 2.6.36.90-desktop, KDE 4.5.3 Intel Core2 Quad Q9400 2.66GHz, 8GB DDR RAM, nVidia GeForce 9600GT -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 02/22/2011 06:20 AM, Bob Williams wrote:
I think part of the problem is that Konqueror sees a shell script, executable bit set or not, as a text file to be edited, and refuses to acknowledge that I've put /bin/bash as the application to open it with. OTOH, files such as *.rm are seen as appropriate food for Kaffeine, MPlayer, VLC etc. :(
Aha! Solved :) The scripts that I want to execute are all of the form path/artist_album-Play.sh or path/artist_album-Enqueue.sh. So I set a couple of filetypes *Play.sh and *Enqueue.sh to be associated with bash.
There must be some way to associate Execute Shell Command with a left click, but I've not used it. Thank you for prompting me to have one more go at this problem :)
I always knew 2 guesses were better than 1 :p -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
Bob Williams
-
David C. Rankin