Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Problems at use | Problèmes à l'utilisation Quick Browser - bash scripts don't run
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Problems at use | Problèmes à l'utilisation

Subjects Author Language Messages Last message
Quick Browser - bash scripts don't run [Bug #295]
Thorsen V English 18 Guest [Read]
13 April 2018 à 07:10

Thorsen V, Thursday 09 August 2012 à 00:38 | Quote


Subscription date : 22 February 2012
Messages : 11
I've configured a quick browser icon in my main dock to point to a folder that contains various shortcuts.

Most of these work as expected when selected (program starts) but the bash scripts open in an editor rather than being executed. Is theee was way to get round this?

(The scripts do work when launched from Nautilus say, or the terminal, that is they are set to execute)

fabounet, Thursday 09 August 2012 à 18:03 | Quote


Subscription date : 30 November 2007
Messages : 17118
when you click on a script in Nautilus, it asks you to run or edit it.
of course you probably want to ru it, but I guess that the default behavior is to edit it !
(cairo-dock and nautilus are both based on gvfs to open files)

so there is maybe an option to look for in gconf (or dconf)

a workaround would be to change the command and run the script in a terminal:
xterm -e path-to-the-bash-script

Thorsen V, Thursday 09 August 2012 à 18:54 | Quote


Subscription date : 22 February 2012
Messages : 11
fabounet :
when you click on a script in Nautilus, it asks you to run or edit it.
of course you probably want to ru it, but I guess that the default behavior is to edit it !
(cairo-dock and nautilus are both based on gvfs to open files)

so there is maybe an option to look for in gconf (or dconf)

a workaround would be to change the command and run the script in a terminal:
xterm -e path-to-the-bash-script

Okay, thanks.

I'm not very keen on the workaround. I'll have to have a rethink.

JFTR I think this is the reason nautilus runs scripts rather than edits them. The "Executable Tet Files" option:
http://i50.tinypic.com/2vjx1cw.jpg

A similar option in the dock maybe?

fabounet, Friday 10 August 2012 à 15:46 | Quote


Subscription date : 30 November 2007
Messages : 17118
ok, so it seems they forced their own solution here ...
but I think that a .sh file should have a different mimetype than a usual text file
therefors it should be possible to handle it differently with gvfs
can you please try
xdg-open <path-to-your-bash-script>


also, look in ~/.local/share/applications/mimeapps.list if you can set up explicitely how to open script or executable files.

Thorsen V, Friday 10 August 2012 à 17:06 | Quote


Subscription date : 22 February 2012
Messages : 11
fabounet :
ok, so it seems they forced their own solution here ...
but I think that a .sh file should have a different mimetype than a usual text file
therefors it should be possible to handle it differently with gvfs
can you please try
xdg-open <path-to-your-bash-script>


also, look in ~/.local/share/applications/mimeapps.list if you can set up explicitely how to open script or executable files.


xdg-open opens .sh files using gvim, which seems to agree with the option in mimeapps.list:

application/x-shellscript=userapp-gvim-JZGMFW.desktop;gedit.desktop;


This doesn't just apply to shell scripts BTW. Python scripts have the same behaviour running from the dock applet. They open in a text editor rather than executing

It's more like a similar mechanism to a command line execution is needed. Something like, "if the execute bit of the text file is set and the first two bytes of the text file are shebang, then run the command interpreter specified by the rest of the line, on the rest of the file." Something like that.

matttbe, Saturday 11 August 2012 à 10:30 | Quote


Subscription date : 24 January 2009
Messages : 12573
Yes, good idea! There is maybe a function to do that with one line with GIO :http://developer.gnome.org/gio/stable/
But is it only for this applet or for all?

fabounet, Tuesday 14 August 2012 à 17:25 | Quote


Subscription date : 30 November 2007
Messages : 17118
so the dock is just following the mime types as they are defined for the user.
i think the best way would be for you to change this mime association, if possible.

if not, we can modify the dock to bypass the mime rule as you proposed, but that sounds a bit hackish

matttbe, Tuesday 14 August 2012 à 23:03 | Quote


Subscription date : 24 January 2009
Messages : 12573
Yes but it can be interesting to launch scripts directly from this applet (or display a dialogue to say that it's a script and it can be launched or opened by a text editor) and detect if the user is dropping a script or a text file into the dock.

Thorsen V, Wednesday 15 August 2012 à 23:46 | Quote


Subscription date : 22 February 2012
Messages : 11
From GContentType maybe g_content_type_can_be_executable http://developer.gnome.org/gio/stable/gio-GContentType.html#g-content-type-can-be-executable

g_content_type_guess can take a file name or a few bytes to look for a signature to obtain the type string.

My user-case is I have a directory called shortcuts that has a bunch of things mainly, backup scripts and searching "tools". Most of these are bash scripts that either run in a shell (that they self-launch), or run in the background and do something to indicate they've completed, or run zenity for a windowed interface where needed.

In the past I've simply run these from the directory but it seems to me that this functionality is not inappropriate for the quick browser widget

fabounet, Thursday 16 August 2012 à 16:27 | Quote


Subscription date : 30 November 2007
Messages : 17118
ok, well I think we can add it in the integration plug-ins or in the quick-browser applet directly.

Thorsen V, Thursday 16 August 2012 à 23:13 | Quote


Subscription date : 22 February 2012
Messages : 11
fabounet :
ok, well I think we can add it in the integration plug-ins or in the quick-browser applet directly.

cool

Emily724, Friday 10 November 2017 à 10:18 | Quote


Subscription date : 07 November 2017
Messages : 2
call charges allied with calling foreign numbers on a telephone.    iFacetimeapp.com    telephone call with the meeting.On throughout the call also.    

Guest, Monday 08 January 2018 à 06:09 | Quote

https://www-shareit.com/pc-windows/

Most of these are bash scripts that either run in a shell (that they self-launch), or run in the background and do something to indicate they've completed, or run zenity for a windowed interface where needed.

Aaradhya, Saturday 27 January 2018 à 12:27 | Quote


Subscription date : 27 January 2018
Messages : 11
Good and Awesome I am happy to join this community very informative thank you for sharing

Guest, Saturday 03 February 2018 à 09:38 | Quote

You could see the get in touch with web page available on    mybkexperience    the sight regarding the dining establishment. You could participate.

Kevin jhone, Friday 30 March 2018 à 03:17 | Quote


Subscription date : 30 March 2018
Messages : 79
Opening Day is nearly here for the Angels.
    baltimore orioles jersers The Angels will cap their exhibition schedule with two more Freeway Series games against the Dodgers at Dodger Stadium before heading to Oakland for their regular-season opener against the A's at 1:05 p.m. PT on Thursday.
    cincinnati reds jersers Here's what you need to know about the Angels before they officially kick off their 2018 campaign.
    detroit tigers jersers Projected Opening Day lineup
Ian Kinsler, 2B
Mike Trout, CFwholesale baseball jersers
Justin Upton, LF
Albert Pujols, 1B
    atlanta braves jersers Kole Calhoun, RF
Zack Cozart, 3B
    los angeles dodgers jersers Andrelton Simmons, SS
Shohei Ohtani, DH
    baltimore orioles jersers Martin Maldonado, C
Garrett Richards, RHP

Key roles
    miami marlins jersers • Kinsler is expected to be the Angels' primary leadoff man and serve as the spark plug for the club's revamped lineup. The veteran second baseman will add some pop to the top of the order and also possesses the ability to draw walks, deliver a strong contact rate and steal bases. That skill set has allowed Kinsler to be productive in the leadoff spot for much of his career, yielding a .271 batting average with an .800 OPS over 1,056 games.
Kinsler's solo home run
Kinsler's solo home run
00:39
Mar. 12th, 2018
    minnesota twins jersers • The Angels are unlikely to name a designated closer at the outset of the season, though Blake Parker, Cam Bedrosian and Jim Johnson all have varying levels of experience pitching the ninth inning. The Angels are more likely to keep their bullpen roles fluid and deploy their relievers based on matchups and leverage.
     st. louis cardinals jersers • Luis Valbuena and Pujols are projected to split time at first base, with Pujols playing the field a few times a week to free up at-bats for Ohtani at the designated hitter spot. The Angels tended to sit the left-handed-hitting Valbuena against lefties last season, so Pujols or Jefry Marte could get the majority of starts at first against left-handed starters.
Injury updates
    oakland athletics jersers • Andrew Heaney (left elbow inflammation) is expected to open the season on the disabled list, though the Angels are not overly concerned about the setback. Heaney, who underwent Tommy John surgery in July 2016, has been cleared to resume throwing, but he will still need to return to the mound and rebuild his stamina before he'll be ready to pitch for the Angels.
    boston red sox jersers Though the club still plans to use a six-man rotation in 2018, it will open the season with five starters, as it can use an early off-day to delay using a sixth starter until April 12. If Heaney isn't ready by then, the Angels could call up Parker Bridwell or Nick Tropeano from Triple-A Salt Lake.
    
    

Guest, Friday 13 April 2018 à 07:07 | Quote

<a href="https://imessageforiphone.com/">imessage</a>
<a href="https://imessageforiphone.com/">imessage apple</a>
<a href="https://imessageforiphone.com/">imessage online</a>
<a href="https://imessageforiphone.com/">imessage app</a>
<a href="https://imessageforiphone.com/">imessage download</a>
<a href="https://imessageforiphone.com/">imessage iphone</a>
Message is one of the best application for iOS devices like iPhone or iPad. iMessage works with the latest version of iOS right now and let the user send Text like messages with Multimedia options. Its one-stop app has all the features which can useful to everyone.

Guest, Friday 13 April 2018 à 07:08 | Quote

https://imessageforiphone.com/
Message is one of the best application for iOS devices like iPhone or iPad. iMessage works with the latest version of iOS right now and let the user send Text like messages with Multimedia options. Its one-stop app has all the features which can useful to everyone.

Guest, Friday 13 April 2018 à 07:10 | Quote

gbwhatsapp
gbwhatsap
gbwhatsapp apk
gbwhatsapp download
gbwhats app
GBWhatsapp Apk is the most Famous Android application which already has downloaded many version all over the Countries

Problems at use | Problèmes à l'utilisation

Subjects Author Language Messages Last message
Quick Browser - bash scripts don't run [Bug #295]
Thorsen V English 18 Guest [Read]
13 April 2018 à 07:10

Post a message

Anti-spam filter 6 (*) times (*) 2 =
            
Did you know ? The RSS tag can display the last 5 articles of a feed : [rss]http://...[/rss]


Glx-Dock / Cairo-Dock List of forums Problems at use | Problèmes à l'utilisation Quick Browser - bash scripts don't run Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.