Oops; the output of ps begins with a space, so the 2nd to last line needs to be either
pid=`ps ax | grep -m1 -e '[X] .* vt'$console | cut -d' ' -f 2` or perhaps the more-resilient pid=`ps ax | grep -m1 -e '[X] .* vt'$console | sed -re 's/[^0-9]*([0-9]+).*/\1/'` which is what I'm currently using. -- power-funcs: getXConsole() doesn't always work https://bugs.launchpad.net/bugs/239191 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs