run script in Porteus 5.0 Xfce

Non release banter
Kulle
Warlord
Warlord
Posts: 594
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

run script in Porteus 5.0 Xfce

Post#1 by Kulle » 17 Jul 2022, 15:59

In Porteus 4.0 Xfce
I can reach: doubleclick = run script
with this command:
xfconf-query --channel thunar --property /misc-exec-shell-scripts-by-default --create --type bool --set true
Look here:
run script in Porteus 4.0 Xfce

But this does not work in Porteus 5.0 Xfce :

Code: Select all

guest@porteus:~$ fconf-query --channel thunar --property /misc-exec-shell-scripts-by-default --create --type bool --set true
bash: fconf-query: command not found
Why command not found ??

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

run script in Porteus 5.0 Xfce

Post#2 by Ed_P » 17 Jul 2022, 16:27

Kulle wrote:
17 Jul 2022, 15:59
xfconf-query --channel thunar --property /misc-exec-shell-scripts-by-default --create --type bool --set true
Kulle wrote:
17 Jul 2022, 15:59
fconf-query --channel thunar --property /misc-exec-shell-scripts-by-default --create --type bool --set true
Anyone else see the difference? :)
Ed

Kulle
Warlord
Warlord
Posts: 594
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

run script in Porteus 5.0 Xfce

Post#3 by Kulle » 17 Jul 2022, 16:42

Thanks Ed_P,
that was my fault,
done by "copy and paste"

Kulle
Warlord
Warlord
Posts: 594
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

run script in Porteus 5.0 Xfce

Post#4 by Kulle » 18 Jul 2022, 08:44

Hi Ed_P,
now I tried again.
Entered the command correctly.
The command is accepted, no error message.

But doubleclick = run script doesn't work.
It's a pity because doubleclick=run script is very useful.

But it worked in Porteus 4.0
.
Why this difference?
Explanation? What can to do?

User avatar
M. Eerie
Moderator
Moderator
Posts: 620
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

run script in Porteus 5.0 Xfce

Post#5 by M. Eerie » 18 Jul 2022, 09:30

I've found that you can execute bash scripts if they are located in the desktop, but sadly not inside a thunar window.

Try creating a symlink to your script in the desktop and see what happens.

There must be a workaround to this behavior.
> Does not compute_ 🖖

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

Kulle
Warlord
Warlord
Posts: 594
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

run script in Porteus 5.0 Xfce

Post#6 by Kulle » 18 Jul 2022, 11:19

Hi M. Eerie,
I can't explain this difference.
It works in Porteus 4.0, but doesn't work in 5.0
it's the same Thunar, isn't it? Or not?

User avatar
M. Eerie
Moderator
Moderator
Posts: 620
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

run script in Porteus 5.0 Xfce

Post#7 by M. Eerie » 18 Jul 2022, 19:26

Kulle wrote:
18 Jul 2022, 11:19
it's the same Thunar, isn't it? Or not?
Not a chance. Keep in mind that 4 years have passed between one release and another and during that time the XFCE desktop has been progressively adopting the gtk3 toolkit. Being Thunar an essential part of XFCE, one would expect lots of changes.

In addition to Ed's advice, I can only suggest to:
1) Close all thunar's instances
2) Make sure the script has the executable bit set

Pretty sure you meet all the above conditions, but just in case...

:unknown:
> Does not compute_ 🖖

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

run script in Porteus 5.0 Xfce

Post#8 by ncmprhnsbl » 19 Jul 2022, 04:16

testing:

Code: Select all

xfconf-query --channel thunar --property /misc-exec-shell-scripts-by-default --create --type bool --set true 
works for me here (xfce porteus v5.0 x86_64) without issue ... tested by clicking on a gtkdialog script.
..within thunar, without restarting it.
the main visual difference you'll see, if it's working, is upon rightclick(of an executable file), the first option is "execute" ...
now if it's a script that requires a terminal to output something, this won't launch a terminal for you...

and.. btw this can be done via "xfce4-settings-editor" or "Settings Editor" in the settings menu..
and here's a link to the docs for thunars hidden settings: https://docs.xfce.org/xfce/thunar/hidden-settings
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

donald
Full of knowledge
Full of knowledge
Posts: 2063
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

run script in Porteus 5.0 Xfce

Post#9 by donald » 19 Jul 2022, 04:41

open thunar > navigate to your script > right-click on it > properties > set open with Terminal Emulator

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

run script in Porteus 5.0 Xfce

Post#10 by ncmprhnsbl » 19 Jul 2022, 04:44

donald wrote:
19 Jul 2022, 04:41
open thunar > navigate to your script > right-click on it > properties > set open with Terminal Emulator
hah, thanks donald ;)
edit:
hmm, on second thought, this doesn't seem to work.. there's only the choice: "Other application" with "recommended applications"
choosing xfce terminal from this just leads to failure.
perhaps this is a feature of the older version..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

Kulle
Warlord
Warlord
Posts: 594
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

run script in Porteus 5.0 Xfce

Post#11 by Kulle » 19 Jul 2022, 09:50

Hi ncmprhnsbl,
Yes, when you right-click, the first option is "execute"
You can also do without double-clicking, no significant loss of time.
It's all just a matter of getting used to.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

run script in Porteus 5.0 Xfce

Post#12 by ncmprhnsbl » 19 Jul 2022, 11:58

i might not have been clear: double clicking works here..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

donald
Full of knowledge
Full of knowledge
Posts: 2063
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

run script in Porteus 5.0 Xfce

Post#13 by donald » 19 Jul 2022, 16:05

ncmprhnsbl wrote:
19 Jul 2022, 04:44
donald wrote:
19 Jul 2022, 04:41
open thunar > navigate to your script > right-click on it > properties > set open with Terminal Emulator
hah, thanks donald ;)
edit:
hmm, on second thought, this doesn't seem to work.. there's only the choice: "Other application" with "recommended applications"
choosing xfce terminal from this just leads to failure.
perhaps this is a feature of the older version..
Hmmm..
Thunar..if I set 'open with Terminal Emulator' in properties it will be the default
'double-click' action for scripts.
...double-click a script and it runs.
Done in porteus 5 final (32 bit) allways fresh, nothing changed (xfconf etc)

One has to set it in properties!!
Image

create a small (executeable) test script in /home/guest/ and double-click it.

Code: Select all

#!/bin/bash
uname -rm
sleep 5
galculator

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

run script in Porteus 5.0 Xfce

Post#14 by ncmprhnsbl » 20 Jul 2022, 00:07

donald wrote:
19 Jul 2022, 16:05
Thunar..if I set 'open with Terminal Emulator' in properties it will be the default
which i couldn't find, because in the 64 xfce module, it's not there, presumably removed by fulalas as superfluous.. (it is present in the 32bit version because i'm not quite so fastidious with stripping) or it simply wasn't produced in his build process..
the key point in the "xfce4-terminal-emulator.desktop" is the Exec=exo-open --launch TerminalEmulator line ..which i guess knows how to handle scripts properly..
here's the full xfce4-terminal-emulator.desktop(goes in /usr/share/applications) for any that want restore it's magic(in the 64bit version):

Code: Select all

[Desktop Entry]
Version=1.0
Type=Application
Exec=exo-open --launch TerminalEmulator
Icon=org.xfce.terminalemulator
StartupNotify=true
Terminal=false
Categories=Utility;X-XFCE;X-Xfce-Toplevel;
OnlyShowIn=XFCE;
X-AppStream-Ignore=True
Name=Terminal Emulator
Name[ar]=محاكي الطرفية
Name[be]=Эмулятар тэрмінала
Name[be@tarask]=Эмулятар тэрмінала
Name[bg]=Терминален Емулатор
Name[bn]=টার্মিনাল ইম্যুলেটর
Name[ca]=Emulador de terminal
Name[cs]=Emulátor terminálu
Name[da]=Terminalemulator
Name[de]=Terminal
Name[el]=Εξομοιωτής τερματικού
Name[en_AU]=Terminal Emulator
Name[en_CA]=Terminal Emulator
Name[en_GB]=Terminal Emulator
Name[es]=Emulador de terminal
Name[et]=Terminal
Name[eu]=Terminal emuladorea
Name[fi]=Pääteohjelma
Name[fr]=Émulateur de terminal
Name[gl]=Emulador de terminal
Name[he]=מדמה מסוף
Name[hr]=Emulator terminala
Name[hu]=Terminál emulátor
Name[hy_AM]=Վահանակ
Name[hye]=Վահանակ
Name[id]=Emulator Terminal
Name[ie]=Emulator de Terminal
Name[is]=Skjáhermir
Name[it]=Emulatore di terminale
Name[ja]=ターミナルエミュレーター
Name[kk]=Терминал эмуляторы
Name[ko]=터미널 에뮬레이터
Name[lt]=Terminalo emuliatorius
Name[ms]=Emulator Terminal
Name[nb]=Terminalemulator
Name[nl]=Terminalvenster
Name[nn]=Terminalprogram
Name[oc]=Emulator de Terminal
Name[pl]=Emulator terminala
Name[pt]=Emulador de terminal
Name[pt_BR]=Emulador de terminal
Name[ro]=Emulator de terminal
Name[ru]=Эмулятор терминала
Name[sk]=Emulátor terminálu
Name[sl]=Terminalski emulator
Name[sq]=Emulues Terminali
Name[sr]=Опонашач терминала
Name[sv]=Terminalemulator
Name[th]=โปรแกรมจำลองเทอร์มินัล
Name[tr]=Uçbirim Öykünücüsü
Name[ug]=تېرمىنال Emulator
Name[uk]=Емулятор терміналу
Name[zh_CN]=终端模拟器
Name[zh_HK]=終端機模擬程式
Name[zh_TW]=終端機模擬程式
Comment=Use the command line
Comment[ar]=إستعمل سطر الأوامر
Comment[be]=Выкарыстоўваць загадны радок
Comment[be@tarask]=Выкарыстоўваёце загадны радок
Comment[bg]=Използване на команден ред
Comment[bn]=কমান্ড লাইন ব্যবহার করুন
Comment[ca]=Utilitzeu la línia d'ordres
Comment[cs]=Použít příkazový řádek
Comment[da]=Brug kommandolinjen
Comment[de]=Befehlszeile verwenden
Comment[el]=Χρησιμοποιείστε την γραμμή εντολών
Comment[en_AU]=Use the command line
Comment[en_CA]=Use the command line
Comment[en_GB]=Use the command line
Comment[es]=Use la línea de órdenes
Comment[et]=Kasuta käsurida
Comment[eu]=Erabili komando lerroa
Comment[fi]=Käytä komentoriviä
Comment[fr]=Utiliser la ligne de commande
Comment[gl]=Usar a liña de ordes
Comment[he]=השתמש בשורת הפקודה
Comment[hr]=Koristi naredbeni redak
Comment[hu]=Parancssor használata
Comment[hy_AM]=Գործածել հրամանատողը
Comment[hye]=Գործածել հրամանատողը
Comment[id]=Gunakan baris perintah
Comment[ie]=Usar li linea de comandes
Comment[is]=Nota skipanalínuna
Comment[it]=Usa la linea di comando
Comment[ja]=コマンドラインを使用します
Comment[kk]=Командалық жолды қолдану
Comment[ko]=명령줄 사용
Comment[lt]=Naudoti komandų eilutę
Comment[ms]=Guna perintah suai
Comment[nb]=Bruk kommandlinjen
Comment[nl]=Gebruik de opdrachtregel
Comment[nn]=Bruk kommandlinja
Comment[oc]=Utilizar la linha de comanda
Comment[pl]=Wprowadza i wykonuje wiersze poleceń
Comment[pt]=Utilizar a linha de comandos
Comment[pt_BR]=Usar a linha de comando
Comment[ro]=Utilizați linia de comandă
Comment[ru]=Использовать командную строку
Comment[sk]=Použiť príkazový riadok
Comment[sl]=Uporabite ukazno vrstico
Comment[sq]=Përdorni rreshtin e urdhrave
Comment[sr]=Користите линију наредби
Comment[sv]=Använd kommandoraden
Comment[th]=ใช้บรรทัดคำสั่ง
Comment[tr]=Komut satırını kullan
Comment[ug]=بۇيرۇق قۇرىنى ئىشلىتىدۇ
Comment[uk]=Використовуєте командну стрічку
Comment[zh_CN]=使用命令行
Comment[zh_HK]=使用指令列
Comment[zh_TW]=使用指令列
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

run script in Porteus 5.0 Xfce

Post#15 by Rava » 19 Aug 2022, 01:03

The trick I use in Port 5 - open .sh files with UXTerm

The downside might be that a UXTerm window gets opened… but that might even be helpful when the scripts gives errors.

I prefer UXterm since it opens a smaller window, my setup for xfce-terminal is quite the large font since I run my system on a Full-HD monitor, so the setting for xfce-terminal is Sans Mono 16 … which is nice on my monitor. Your mileage may vary.

For comparison, a downsized screenshot. (Original size would be, of course, 1920x1080, resized to 601x338 )

Image
Top left (black background) xfce-terminal
Top right UXterm (blue background)
Below that the size I coded for my make-ffplay-script (via parameters -x 500 -y 150) when it handles a sound-only file (in this case, its Henry Mancini - Jazz@Mancini (Full Album)-56zg9zDk3so.webm - thanks for M. Eerie for finding that gem.) In this case, it is not done via the make-ffplay-script created script, but by my separate "ffplay-hide_banner" script in /usr/local/bin/ that handles my manually clicked multimedia files.

When you zoom into the screenshot you will see that you can still read the text in the xfce-terminal - but the text from the UXterm is hard to read since the resizing made the resulting text too small. The UXterm is also via make-ffplay-script - but only the resulting UXterm part, the actual video ffplay window is on another desktop.
Currently I have 7 desktops open. As seen in its "Workspace Switcher" in the panel.
Cheers!
Yours Rava

Post Reply