Set an active workspace in a shell script on Linux -
i have shell script sole purpose launch deterministic code. when running, latest opens few non-interactive terminals, can pain.
i working on linux centos few different workspaces. consequently want make shell script consider 1 of workspaces "active workspace" instead of 1 working on; non interactive terminals open in other workspace.
i looked "wmctrl -s" has switch workspace on.
any ideas ?
thanks !
one solution using xvfb. creates virtual x display not visible you. after installing xvfb, using xvfb-run
convenient.
xvfb-run -n 98 -- ./your_script.sh
should job. displays terminal inside non-visible virtual x display.
if want watch terminal inside xvfb, may use vnc.
run xvfb in display :3
xvfb :3 -screen scrn 1924x1024x24
start vnc server,
x11vnc -display :3 -rfbport 25900
and run script
display=:3 ./your_script.sh
you can use vnc client , connect 25900
port watch it.
Comments
Post a Comment