[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#760615: general: Shell scripts do not execute in gui.



Hello Kenji,

On 6.9.2014 Kenji Takashima wrote:

I have been trying to execute multiple shell scripts in gui with no avail. The scripts succesfully executed in a terminal, however in the gui, the files would not execute when clicked on, and, when right-clicked, did not have a "run" option. Other types of executables have worked, though I have not tested that many.

In my GUI scripts *can* be executed by double clicking! But maybe my "GUI" is not the same as your GUI? That's why o it would be good if you could tell us, what "GUI" that GUI of yours is? What is the name of the programm/application, in which you are trying to execute the script?

My GUI is XFCE and in XFCE I open the "Thunar" file browser. I double- click a script in Thunar, but nothing happens. That is because usually scripts write to the "standard out" channel. If you do not run a script in a terminal, then it does not have a "standard out" channel. That's why you will not seem anything happen when the script is executed.

In order to veryfiy that Thunar actually *does* execute a script when I double-click it I did the following, which you can do as well:

Open a terminal and in the terminal write the following:

    cd /tmp
    echo "#!/bin/sh" > foobar
    echo "touch foobar.touched" >> foobar
    chmod +x foobar

Now doublecklick that script. Has the file "foobar.touched" been created on your machine?

Greets,
*t


Reply to: