Xfce Forum

Sub domains
 

You are not logged in.

#1 2016-06-21 22:52:43

Gerryman
Member
From: Califusion
Registered: 2012-03-23
Posts: 15

[Solved] Executable text files

How do I make an executable text file to run in XFCE?

I am running Xubuntu 16.04 on my homemade AMD 64 machine. I have been using the MATE desktop for quite a while and thought I'd give XFCE/Xubuntu a try. In MATE/Caja all I do is create an empty text file, enter the #!/bin/sh line, and then the command line. Then I make the file executable (chmod +x <filename>) and it just works. When I click on it in Caja it executes the command.

Here in XFCE/Thunar I do the same but every time I click on the file it just opens in a text editor.

For example, I have an executable text file to run an older version of LibreOffice that I like to use. Here's the contents of that file:

#!/bin/sh
home/jcig/opt/LO/4.4.7.2/DEBS/install/opt/libreoffice4.4/program/soffice

That's all that is needed in MATE.

Here's the ls output for the file:

jcig@xubuntu:~/bin$ ls -l
total 20
-rwxrwxr-x 1 jcig jcig  84 Jun 21 15:16 LO4472.sh
jcig@xubuntu:~/bin$

So you see, the file is marked executable. How do I make it work like it does in MATE?

Really folks, it shouldn't be this difficult. :-(

I've been searching for the answer online, but haven't found an explanation yet. I think I'm missing something simple. But what?

Last edited by Gerryman (2016-06-22 01:31:04)


Lenovo X140e 11.6" Netbook; AMD A4 64bit CPU, 4GB DDR3 RAM, 500 GB HDD;
AMD 64bit CPU, ASUS MB, 12MB RAM - Homemade Desktop
Xubuntu - Homemade desktop; UbuntuStudio - Lenovo X140e

Offline

#2 2016-06-22 01:00:34

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: [Solved] Executable text files

Having shell scripts execute like that through thunar or from the desktop was deemed a security risk (it was too easy to mistakenly execute a script that would run) so that functionality was turned off by default. You can re-enable that functionality by enabling the misc-exec-shell-scripts-by-default xfconf key. To do so, create the key via the xfce4-settings-editor, or run the following command:

xfconf-query --channel thunar --property /misc-exec-shell-scripts-by-default --create --type bool --set true

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2016-06-22 01:10:43

Gerryman
Member
From: Califusion
Registered: 2012-03-23
Posts: 15

Re: [Solved] Executable text files

Thanks ToZ, I'll give it a shot. :-)


Lenovo X140e 11.6" Netbook; AMD A4 64bit CPU, 4GB DDR3 RAM, 500 GB HDD;
AMD 64bit CPU, ASUS MB, 12MB RAM - Homemade Desktop
Xubuntu - Homemade desktop; UbuntuStudio - Lenovo X140e

Offline

Board footer

Powered by FluxBB