Just want to preface this by saying I’m fairly new to SysAdmin work. That said, I appreciate any insight and would kindly ask if replies could avoid assuming too much context. :)
I was tasked with opening a specific URL on every machine in the domain at a scheduled time. I set up a workflow (currently running only on manual starts from the Automation Hub) as follows:
Windows: Start-Process "explorer.exe" "[URL]"
macOS: open "[URL]"
Linux (Ubuntu 24 test machine): see below
On Windows and macOS, the commands work perfectly and the workflow ends as soon as the browser launches.
On Linux, however, I ran into issues. The Pulseway agent always seems to execute commands as root (even when the “Run as logged in user” option is selected).
I tried running the command as the seat0 user with runuser -u, but Firefox/xdg-open wasn’t inheriting $DISPLAY/$WAYLAND_DISPLAY, $XDG_RUNTIME_DIR, and $DBUS_SESSION_BUS_ADDRESS correctly.
After a lot of band-aid fixing, I ended up with this super scuffed one-liner (I am aware this is probably very suboptimal, but it at least launches Firefox so I'm not touching it until I know more):
This does successfully launch Firefox with the URL, but the workflow action hangs for ~30 minutes (until max execution time hits, currently set to 1h).
I’ve tried:
>/dev/null 2>&1 &
nohup
disown
spawning a subshell and exiting it in hopes that would trigger the pulseway agent to get a kind of "command executed" signal.
But nothing has worked, the workflow still hangs instead of completing once the command is handed off.
So I think I’m misunderstanding something fundamental either about Linux process handling, or how Pulseway agents execute/track Linux commands within workflows. Happy to provide any further information if needed, thank you in advance!
Hello,
Just want to preface this by saying I’m fairly new to SysAdmin work. That said, I appreciate any insight and would kindly ask if replies could avoid assuming too much context. :)
I was tasked with opening a specific URL on every machine in the domain at a scheduled time. I set up a workflow (currently running only on manual starts from the Automation Hub) as follows:
Windows:
Start-Process "explorer.exe" "[URL]"
macOS:
open "[URL]"
Linux (Ubuntu 24 test machine): see below
On Windows and macOS, the commands work perfectly and the workflow ends as soon as the browser launches.
On Linux, however, I ran into issues. The Pulseway agent always seems to execute commands as root (even when the “Run as logged in user” option is selected).
I tried running the command as the seat0 user with
runuser -u
, but Firefox/xdg-open wasn’t inheriting$DISPLAY
/$WAYLAND_DISPLAY
,$XDG_RUNTIME_DIR
, and$DBUS_SESSION_BUS_ADDRESS
correctly.After a lot of band-aid fixing, I ended up with this super scuffed one-liner (I am aware this is probably very suboptimal, but it at least launches Firefox so I'm not touching it until I know more):
This does successfully launch Firefox with the URL, but the workflow action hangs for ~30 minutes (until max execution time hits, currently set to 1h).
I’ve tried:
>/dev/null 2>&1 &
nohup
disown
spawning a subshell and exiting it in hopes that would trigger the pulseway agent to get a kind of "command executed" signal.
But nothing has worked, the workflow still hangs instead of completing once the command is handed off.
So I think I’m misunderstanding something fundamental either about Linux process handling, or how Pulseway agents execute/track Linux commands within workflows.
Happy to provide any further information if needed, thank you in advance!
Veljko (Max)
Edited by Veljko