You are not logged in.
Pages: 1
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
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 ---
Online
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
Pages: 1
[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 525.5 KiB (Peak: 532.16 KiB) ]