Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to run two commands in one alarm #222

Open
Xpistos opened this issue Sep 20, 2023 · 1 comment
Open

Not able to run two commands in one alarm #222

Xpistos opened this issue Sep 20, 2023 · 1 comment

Comments

@Xpistos
Copy link

Xpistos commented Sep 20, 2023

I am trying to have the alarm open a full page jpeg in xviewer and play an alert ogg vorbis file in audacious with the following command (tested at command line):

xviewer -f /home/christos/Pictures/Family/Sias_Bus.jpg & audacious /home/christos/Pictures/Family/mando.ogg

It does open xviewer full screen but says mandp.ogg is not an acceptable file format.

error1

I have tried to swamp the order and that just sas audacious cannot play a jpeg file.

error2

Finally it will run using "&&" but that only runs the first half of the command and waits for me to close xviewer before playing the sound file.

Can someone tell me what I am doing wrong?

@tatokis
Copy link
Member

tatokis commented Sep 27, 2023

Commands don't run inside a shell by default, which is why you are unable to use &.

Try something like

sh -c "xviewer -f /home/christos/Pictures/Family/Sias_Bus.jpg & audacious /home/christos/Pictures/Family/mando.ogg"

I had a look and it seems that to do this by default, the program would have to escape characters before passing them to the shell, and there doesn't seem to be a straightforward way to do this that I can see with a quick glance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants