To launch your application into a new Xserver instance you simply need to launch the program as follows (I'll use Desura in my example):
xinit /home/honey/desura/desura %U -- :1
Once you run this your screen will flick once or twice as the new X instance is created and the program is automatically launched within it. This new X will be accessible via the keyboard shortcut ctrl+alt+f8, to get back to your previous X instance simply press ctrl+alt+f7.
Now, one other thing to note is that on some Linux distributions you may be greeted with the following message when you try to run xinit as a normal user:
X: user not authorized to run the X server, aborting.
Don't panic, the fix for this is also simple. In terminal run:
sudo nano /etc/X11/Xwrapper.config
This will open a file for editing - we only need to adjust one line. Make sure somewhere in this file is the line:
allowed_users=anybody
Save and close the file and the above xinit file should now work. Happy gaming folks!
~Jeff Hoogland
Would that cause Desura to launch all games on that X Server?
ReplyDeleteYes it does.
Deleteneat
ReplyDeletethanks for the tip!
ever heard of xnest or xephyr?
ReplyDeleteyou can run a gnome desktop in the window of a kde desktop or vice versa ... or any desktop environment combination for that matter
Thats not really practical... If a non-full screen game was desired simply change the game settings.
DeleteWow, so I'm not the only person who does this!
ReplyDeleteTo go the other way around.... On slower computers, you can sometimes get a tiny bit more speed by not running all of those pesky desktop environments and other resource hogs.
ReplyDeleteIn which case, create a desktop file in /usr/share/xessions - a good way to start is to copy the xterm.desktop file and edit it to launch your game (as well as rename it). Then, when you go to log in, change your "session" to that game. I always thought that this would be a brilliant way of turn Linux into a console type setup.
Interesting, but not very useful as the games get spawned without any sound.
ReplyDeleteOr maybe I'm doing something wrong?
you must add your user to the audio group and reboot your computer.
Deletesudo add username audio
That did the trick, thanks.
DeleteDoes this work with Minecraft? I didn't have any luck trying to do so.
ReplyDeleteI get the following messages:
Warning: unknown mime-type for "/path/to/Minecraft/" -- using "application/octet-stream"
Error: no "view" mailcap rules found for type "application/octet-stream"
waiting for X server to shut down ddxSigGiveUp: Closing log
I've managed to launch minecraft in a new xserver, but it did not work very well; I usually get 20fps, but ran like this I got 5fps tops. Still tweaking the setup, gonna see if I can get it working better
DeleteWorked for Desura, but the games got launched behind the Desura window - and there's no alt+tab.
ReplyDeleteAll my Desura games launch full screen so this is a non-issue for me.
DeleteNice way of launching a game. I don't have time to play games like I used to, but if ever the opportunity arises, this is how I will do it. More than likely though I will never play a game on my computers. Not enough time in the day, and ultimately more important things to do with my free time. Nice article though.
ReplyDelete