You are not logged in.
Hello,
Bunsenlabs Helium in menu.xml, I've the following code
<item label="Sabnzbdplus1">
<action name="Execute">
<command>
x-terminal-emulator -T 'sabnzbdplus' -e sabnzbdplus
</command>
</action>
</item>
<item label="Sabnzbdplus2">
<action name="Execute">
<command>
x-terminal-emulator -T 'sabnzbdplus2' -e firefox-esr http://127.0.0.1:8080/sabnzbd
</command>
</action>
</item>
I invoke Sabnzbdplus1 and then Sabnzbdplus2. What I want is to invoke these separate commands in one single command. I tried several things like && as follows
x-terminal-emulator -T 'sabnzbdplus' -e sabnzbdplus && firefox-esr http://127.0.0.1:8080/sabnzbd
But was not succesful. Any idea? Thanks in advance.
Best regards,
Reinier
Last edited by hhh (2020-04-14 18:38:32)
Offline
I usually find it easier to put multiple commands in a script eg
#!/bin/bash
# sabnzbdplus.sh
sabnzbdplus && firefox-esr http://127.0.0.1:8080/sabnzbd
If your command needs to run in a terminal then adjust the script accordingly.
<item label="Sabnzbdplus">
<action name="Execute">
<command>
sabnzbdplus.sh
</command>
</action>
</item>
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
Hi Damo,
Thanks for your reply. Unfortunately, your solution seems not to work: sabnzbdplus starts correctly but only when I close sabnzbdplus, Firefox starts (this behaviour I do remember when I was searching for solutions).
Normally, starting sabnzbdplus would invoke Firefox automatically. That worked for me in Bunsenlabs Helium. However, after some updates, there arised a problem, which I think causes Firefox not to start:
/usr/bin/xdg-open: 630: /usr/bin/xdg-open: exo-open: not found
I was not able to install the missing software.
Bunsenlabs Lithium does not have the problem. Any idea? Thanks.
Best regards,
Reinier
Offline
Hi Damo,
Thanks for your reply. Unfortunately, your solution seems not to work: sabnzbdplus starts correctly but only when I close sabnzbdplus, Firefox starts (this behaviour I do remember when I was searching for solutions).
Normally, starting sabnzbdplus would invoke Firefox automatically. That worked for me in Bunsenlabs Helium. However, after some updates, there arised a problem, which I think causes Firefox not to start:
/usr/bin/xdg-open: 630: /usr/bin/xdg-open: exo-open: not found
I was not able to install the missing software.
Bunsenlabs Lithium does not have the problem. Any idea? Thanks.
Best regards,
Reinier
Do you have exo-utils installed? That package provides the exo-open command.
Last edited by DeepDayze (2020-04-14 16:27:59)
Real Men Use Linux
Offline
Thank you. That did the job!
Reinier
Offline
Thank you. That did the job!
Reinier
So your 2 scripts work now?
Real Men Use Linux
Offline
Hi,
Only this script in menu.xml is necessary:
<item label="Sabnzbdplus">
<action name="Execute">
<command>
x-terminal-emulator -T 'sabnzbdplus' -e sabnzbdplus
</command>
</action>
</item>
and firefox-esr http://127.0.0.1:8080/sabnzbd starts automatically.
It is the same script I used last year before the problem a few months ago arised.
Thanks again!
Best regards,
Reinier
Offline
Making this [SOLVED].
-hhh moderator-
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
Great that you solved it!
x-terminal-emulator -T 'sabnzbdplus' -e sabnzbdplus && firefox-esr http://127.0.0.1:8080/sabnzbd
But was not succesful.
Generally, something like this is possible with openbox' rc.xml, but will not work exactly like this for 3 reasons:
openbox does not automatically execute a shell when executing commands, so the whole command would need to be passed to a shell first for things like && and & to work
the && waits for the first command to return a value before it runs the second command. A single & will put the first command in the background instead, then immediately launch the second.
openbox' XML parser won’t be able to deal with the & as such, it needs to be written like this: &
All in all, writing a miniscript and pointing openbox to that might the easiest solution, but this would also work:
<command>
dash -c 'x-terminal-emulator -T 'sabnzbdplus' -e sabnzbdplus & firefox-esr http://127.0.0.1:8080/sabnzbd'
</command>
Offline
Hello,
Thanks for the additional information. It does not work as it should:
I remove exo-utils from my system and run your command:
dash -c 'x-terminal-emulator -T 'sabnzbdplus' -e sabnzbdplus & firefox-esr http://127.0.0.1:8080/sabnzbd]http://127.0.0.1:8080/sabnzbd'
-> Firefox starts with http://127.0.0.1:8080/sabnzbd with error message 'Problem loading page'
-> Sabnzb starts
Then:
dash -c 'x-terminal-emulator -T 'sabnzbdplus' -e sabnzbdplus && firefox-esr http://127.0.0.1:8080/sabnzbd]http://127.0.0.1:8080/sabnzbd'
-> Sabnzb starts
and Firefox does not start with http://127.0.0.1:8080/sabnzbd
so I reinstall exo-utils and run
x-terminal-emulator -T 'sabnzbdplus' -e sabnzbdplus
succesfully.
Best regards,
Reinier
Last edited by hhh (2020-04-16 16:58:40)
Offline
I remove exo-utils from my system and run your command:
<command> dash -c 'x-terminal-emulator -T 'sabnzbdplus' -e sabnzbdplus & firefox-esr http://127.0.0.1:8080/sabnzbd]http://127.0.0.1:8080/sabnzbd' </command>
-> Firefox starts with http://127.0.0.1:8080/sabnzbd with error message 'Problem loading page'
-> Sabnzb starts
You probably just need a delay between starting the application and the browser.
You could try waiting for however long sabnx needs to fire up, then reload the page in your browser (F5 or Ctrl-F5).
Or you add a delay in your command:
<command>
dash -c 'x-terminal-emulator -T 'sabnzbdplus' -e sabnzbdplus & sleep 5; firefox-esr http://127.0.0.1:8080/sabnzbd]http://127.0.0.1:8080/sabnzbd'
</command>
PS: please use code tags for code. Thanks.
Offline
PS: please use code tags for code. Thanks.
Fixed by me, I think.
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline