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 myusernamein the script - Ran the game & X as my user, then ran
schedtoolfrom a separate virtual terminal w/sudoto alter the settings for the currently running process but nothing changed- This seems to indicate
schedtoolisn't going to do any good
- This seems to indicate