However, commands like pgrep ardour6, ps -C ardour6 and pidof ardour6 returns nothing, even if Ardour is running (same goes for Cadence). The same commands used with ‘firefox’ or ‘evolution’ instead returns various info as expected. All programs show up in Task Manager as well, while pgrep xfce4-taskmanager also returns nothing
What could be the reason for this?
EDIT: commands didn’t work becuse I didn’t pay attention to case sensitivity.
Marking this as solved and continuing work on the script in the original thread.
Didn’t really get the script started yet as I stumbled just determining if Ardour is running…
It 's supposed to look something like
#!/bin/bash
if
# check if Ardour is running
pgrep ardour >/dev/null
and
# check if presentation mode is off
then
# switch on Presentation Mode
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T
end
…but like I said, running pgrep ardour from terminal returns nothing, while e.g. pgrep firefo returns the pid of firefox (even when misspelling like here).
#!/bin/bash
pgrep ardour >/dev/null
if [[ $? -eq 0 ]]
then
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T
else
notify-send "ardour is not running!"
fi
BTW You can also bind the xfconf-query -c xfce4-power.... command directly to a keyboard shortcut. That way it would be much easier to toggle it on or off when needed.
Thanks a lot! This is a pointer in the right direction, and running the script while Ardour is not running nicely outputs “ardour is not running” to notifications.
BUT, the output is the same WITH Ardour running, because the stumbling stone remains:
While pgrep firefox does return a pid, pgrep ardour returns nothing
But yet the program “Ardour” is runnning. Task Manager identifies it as Ardour. Granted, if started by commandline I have to type ardour6 but it shouldn’t matter much?
After all pgrep firefo (note the missing x) returns the pid of Firefox.
If the Ardour process is not named with anything like Ardour, then that is rather surprising. If it is so, how do I identify the correct name?
By the way, questions like pgrep xfce4-taskmanager and pgrep cadence are also answered with nothing.