Shortcuts: chaining command together

I use the build in shortcuts settings a lot to launch my most used apps.
But some apps take longer to load, so I want to show a message to notify me the app is launching (when I takes some time, I tend to think I didn't press the correct shortcut).

This command works from the terminal but not when used as a shortcut: notify-send "Blender" "Launching..." && blender

I could be wrong, but i think notify-send must have the full path of the executable in the command.

1 Like

If the command cannot run by itself in the terminal, a full path is required.
To avoid this, one must register the app in usr something directory (my memory fails...).

[edit]
I found it back :slight_smile:
sudo mv xxxxxx{app name} /usr/local/bin

sudo chmod 755 /usr/local/bin/xxxxxx{app name}

1 Like

The command works in the terminal but not when launches as a shortcut.

1 Like

(T_T)
I think we need @Aravisian' advice.

1 Like

Which command?

1 Like
notify-send "Blender" "Launching..." && blender

As stated above, the Launcher command must include the full Path to the Executable File.

Hanne, tried this one in several ways.

Used the command like yours for the short key command, tried Frenchpress's and Aravisian's way with the permission and full path to the desktop file in /usr/share/application/, even tried it with at script leading the command to it and combining it with the short key. But sorry to say.......it just won't budge.

1 Like

I wonder if a bash script is needed. Create the bash script with

#!/bin/sh

SERVICE='blender'

notify-send /bin/blender "Starting blender ..." && pkexec /bin/blender

fi

Then creating a launcher for the script, instead.

That bash script above is just a fly-by-night example I made up off the top of my head...

2 Likes

Yeah, but the problem is try launching it with a key combination adding it in Gnome - Settings - Keyboard Shortcuts.

Have tried. It doesn't work , but I don't know about XFCE of course.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.