This tutorial will explain you how to redirect the output of scorched3d to a separate X session (grafic session) to be capable to switch between the desktop & the game with a simple key combination.
in this turial we assume that your default X session is #0, so, we'll add a new session #1, also it's assumed that the path to your scorched3d binary is /usr/bin/scorched3d, you might have to customize them according to your distribution/installation
switching between them will act like Alt+Tab, the shortcut keys are:
Contents |
if your distro is ubuntu, you'll have to do the following step in order to continue:
wich creates an X authorithy file in your home folder
as regular user launch the command:
inside the application, send the command:
you should get an output similar to the following:
yours might be DIFFERENT, it's normal
now we'll add a new key for the X session #1 by typing add :1.0 MIT-MAGIC-COOKIE-1 and copying the long string in at the end of the line wich starts with your yourhostname:0
eg, in this case:
we can check the result by sending the list command again:
when done, send the command:
open your favourite text editor (in this tutorial kwrite) and create the script scorched3d:
add the following lines in it:
beryl crashes when launching another X session, we can temporaneally disable it while running the game by sending the USR2 signal; so the script becomes:
save & close the file
to make the script executable like a binary, you need to send the command:
rename the current game binary:
replace the call with the new script:
get superuser privileges with the following command:
rename the current game binary:
replace the call with the new script:
that's it! when you'll start a game, the video will be redirected to the session #1 instead of #0