Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-07-16 07:15:34

postcd
Member
Registered: 2021-07-16
Posts: 1

Whisker menu launcher is so bad in launching commands

Newbie user would expect he can add commands like:
1. ~/scripts/scriptname
2. /home/user/scripts/scriptname;/home/user/scripts/scriptname2
3. if [[ -f ~/file ]]; then rm -f ~/file; else touch ~/file; fi
4. /bin/bash rm file;reboot

into Whisker menu Edit Launcher dialog.

Simply expect that such basic commands would be executed OK similarly as on bash, but no, it return fake message no such file or directory! I think that devs should improve this or at minimum mention allowed format examples right in the Edit Launcher dialog

Last edited by postcd (2021-07-16 07:16:13)

Offline

#2 2021-07-16 11:42:30

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,025

Re: Whisker menu launcher is so bad in launching commands

Hello and welcome.

To file a bug report against whiskermenu, please do so at https://gitlab.xfce.org/panel-plugins/x … n/-/issues.

To answer the why and provide a workaround, the run field entry part of whiskermenu (or the application finder) isn't a complete shell so it can't process all of the special characters. To work around this, you can create a custom search action (in Whiskermenu, right click > Properties > Search Actions) something like:

  • Name = Shell Run

  • Pattern = + (or whatever you would like to use)

  • Command = xfce4-terminal -H -x bash -ic "%s"

...and then run your commands by prefixing it with the Pattern:

+~/scripts/scriptname
+/home/user/scripts/scriptname;/home/user/scripts/scriptname2
+if [[ -f ~/file ]]; then rm -f ~/file; else touch ~/file; fi
+/bin/bash rm file;reboot

Note: if you don't want/need a terminal window to popup displaying the output, you could use a command like:

bash -ic "%s"

...in the Search Action's Command field.


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

Board footer

Powered by FluxBB