1
I put together a simple script for running Neverwinter Nights from a separate virtual terminal:
#!/bin/bash
read -r -d '' myrcfile <<'EOF'
#!/bin/bash
cd /path/to/game
./nwn
EOF
XINITRC=<(echo "${myrcfile}") xinit -- :1 vt8
While this works, gameplay is rather choppy. For reference, it runs fine from the initial / default X instance.
I fiddled around with schedtool
to see if I could make it any better, and at first it seemed I'd succeeded, but in reality the improvement wasn't because of schedtool but rather because I had [naively] done this:
sudo schedtool ${parms} -e ./nwn
^^^^
... because some of schedtool
's parameters require root (note: ${parms}
is various combinations of schedtool
parameters). schedtool
wasn't responsible for the improvement in speed -- sudo
was. To ensure that was the case I replaced the final line of the inner script with gnome-terminal -c 'sudo ./nwn'
and sure enough it runs flawlessly.
Does anyone have a good suggestion for how to do this?
Here's some of the things I've tried:
- Run X under sudo, then put
su -c ./nwn myusername
in the script - Ran the game & X as my user, then ran
schedtool
from a separate virtual terminal w/sudo
to alter the settings for the currently running process but nothing changed- This seems to indicate
schedtool
isn't going to do any good
- This seems to indicate
This is a decent question. I edited for a bit of clarity and formatting. – JakeGould – 2014-11-30T06:10:18.203
I'll compromise. Some of the changes didn't reflect how I wanted it to read. – Brian Vandenberg – 2014-11-30T06:16:17.710