Wine games in Kubuntu Intrepid
Jonas Norlander
jonorland at gmail.com
Tue Nov 4 12:26:13 UTC 2008
2008/11/3 Jonas Norlander <jonorland at gmail.com>:
> Hi
>
> Some nice tricks with xorg and serverlayout that perhaps will help
> others so I post them here.
>
> I have a two monitor setup on my nvidia card, one 19" and one 17". In
> Hardy playing games (Warcraft 3) with wine worked fine but after I
> haved installed Intrepid I noticed that the game/wine want grab the
> mouse at the edges to my second monitor so it makes it hard to scroll
> in the game with the mouse. And Desktop effects don't play well with
> changing monitor layout/resolution.
>
> One solution was to use nvidia-settings tool to deactivate the second
> monitor and then deactivate the Desktop effects but this mess up the
> desktop and after the game I have to logout, restart X and login
> again.
> So I was thinking why not add a new ServerLayout just for games in
> xorg.conf where the second monitor is disabled and with no desktop
> environment, just the game or a plain window manager?
>
> After some reading and testing i came up with this.
>
> The relevant sections from my xorg.conf. Of course you can add other options.
> #######################################
> Section "ServerLayout"
> Identifier "GameLayout"
> Screen 0 "GameScreen" 0 0
> EndSection
>
> Section "Screen"
> Identifier "GameScreen"
> Monitor "SyncMaster975MB
> Device "GameVideoDevice"
> DefaultDepth 24
> EndSection
>
> Section "Monitor"
> Identifier "SyncMaster957MB"
> EndSectio
>
> Section "Device"
> Identifier "GameVideoDevice"
> Driver "nvidia"
> Option "TwinView" "0"
> Option "ConnectedMonitor" "CRT-0"
> EndSection
> #######################################
>
> To be able to start a X you must change "allowed_users=console" in
> /etc/X11/Xwrapper.config to "allowed_users=anybody".
> You should now be able to start the new layout with a command like "X
> :1 -layout GameLayout" and switch between the layouts with the
> CTRL-ALT-Fx keys. To start a program in the new layout from the old
> start them like this "DISPLAY=:1 xterm".
>
> To be able to use sounds you must add yourself to the audio group. All
> this I am sure could be wrapped up in a script that will start X and
> your programs and added to the menu for easy access.
>
> Any suggestions or improvements please post them.
>
> / Jonas
>
One little update.
If you want a window manager started on the new layout for example fluxbox.
Install fluxbox.
sudo apt-get install fluxbox
Add the programs you want to start to your ~/.xinirc. Make sure they
is putted to the background with an '&' last on ever row, also add
startfluxbox as the last command to run and don't put it in the
background.
echo "xterm -g 80x40+0+0 &" > ~/.xinitrc
echo startfluxbox >> ~/.xinitrc
Then start the X server with xinit.
xinit -- :1 -layout GameLayout -nolisten tcp &
Happy Hacking!
Now it's time for a nice game of Dota.
/ Jonas
More information about the kubuntu-users
mailing list