Tips and Tricks
From Unofficial TransGaming Wiki
Reset Gamma & Screen resolution on crash/exit
Here's a trick to get your gamma and resolution reset to the defaults, open ~/.point2play/.winex_ver/winex-##/bin/winex3 with an editor and scroll all the way down, after the final section, add the following commands,
xrandr -s 0 && xgamma -gamma 1.0
(The -s 0 part means "switch to the default resolution" and you can get a list of all the predefined resolutions by executing the command (xrandr) without any parameters)
You could also use;
xrandr -s 1152x864 && xgamma -gamma 1.0
Change the resolution to your liking. I personally use 1152x864. If your game crashes now, the gamma and screen resolution is reset.
Note:This will not work if you kill the Point2Play/Wine process with CTRL + S
Creating an icon in KDE to run a game installed with Point2Play
This lacks proper documentation in my opinion and so i'm adding this here. Creating an icon on your desktop to run games installed with P2P is actually really simple. Here's how to do it;
- Rightclick on your desktop and select Create New => File => Link to application...
- Change the icon name by changing Link to application into the name of your icon.
- Click on the blue gear to change the icon to your liking.
- Then click on the Application tab the only really important input field here is command. Check in Point2Play what the exact name of the game group an game icon that you want to run is. For example if I had the game Thief1 installed and it would say Thief in the right panel and Thief in the left panel, all you need to do is fill in the command;
Point2Play --run "Thief" "Thief"
- Make sure to encapsulate the program group and game icon in order to prevent errors from spaces and other characters.
- Something else that you migth want to turn off is launch feedback, this prevents the loading icon from showing up when you click on the icon of your game. I've always found it annoying to see the mouse cursor with the Launch Feedback icon trailing behind it. To disable it, click on Advanced Options... and uncheck Enable Launch Feedback . Click on Ok twice and you're done. The icon is created clicking it will run the game of your choice.
**note** Full functionality of the Point2Play '-run' function is not available at this time. When using this CLI, the point2play configuration for the specified game will not be used. Instead, the default config, located in ~/.point2play/.winex_ver/cedega-<ver>, will be used.
Point2Play with console output in the background
This also something I find useful for when I debug games. I edited my Point2Play icon to also spawn a terminal where the debug output is printed:
- Right-click on the Point2Play icon
- Select Properties → Application → Advanced Options
- Check on Run in terminal. This will spawn a Konsole window together with Point2Play and you'll be able to see which error output is printed.
- Open the menu item for Point2Play in your favorite text editor
- Change the prog line for Point2Play to "Eterm -e Point2Play" (Replace Eterm with your preferred terminal emulator.)
For ROX pinboard
- Make a new shell script; do the following:
#!/bin/bash Eterm -e Point2Play
(Replace Eterm with your preferred terminal emulator.)
Note: Feel free to add instructions for other WindowManagers.
Manually adding a Cedega install to Point2Play
This information can be found in the Point2Play HowTo Guide, but is replicated here for your use.
You can manually add a Cedega\Winex installation by editing the file ~/.point2playrc (there is also a global template version that can be found at /usr/lib/transgaming_point2play/Point2PlayRC, this is the file used to create your .point2playrc when Point2Play is first started).
As an example:
default=cedega <401f>cedega=/usr/lib/transgaming_cedega:/usr/bin/cedega winex3=/usr/lib/transgaming_winex3:/usr/bin/winex3
See the Point2Play HowTo Guide if you need more information.
Alternative for Alt+Tab
Most of the time, trying to press ALT + TAB in order to switch back to your desktop fails when running games in Cedega. Just recently, mmealman posted quite a nice solution to this semi-problem. On KDE and Gnome there are virtual desktops and you can switch between them with shortcuts. Thus emulating a sort of switching Windows. I only use KDE and thus I can only write up a short howto for the KDE users among us.
If you have any questions regarding this workaround, feel free to ask on this article's talk page.
You can switch to a different desktop with by using the default keys, CTRL + F1 to F12 or set up your own shortcuts by following these steps:
- Open the "Keyboard Shortcuts" configuration module via the KDE Control Panel or type "kcmshell keys" in Konsole to start it directly.
- Click on the "Shortcut Sequences" tab.
- Type "switch" to get a list of the shortcuts for desktop switching. (or just scroll down if you like)
- Bind desktop 1 & 2 (or more) to keys that you prefer. (I used CTRL + ALT + 1 and 2 since I only have two virtual desktops.)
- Click "Apply" and then "Ok". Pressing the keys you've set up switches to each desktop that you configured a shortcut for.
- Now load up a game via Point2Play or Cedega. Then, when the game has loaded, switch to a different desktop by pressing the shortcut you configured, and you should be brought a different desktop. Press the shortcut for the desktop that you originally started the game on, in order to get back to your game.
Note: You will need to make sure that the game uses the same resolution as your desktop. If not, you get a smaller or bigger screenspace when you switch desktops. This depends on which resolution is bigger. If the game resolution is smaller then the desktop screensize will be smaller and you need to pan around the corners with your mouse.
In my Gnome at least (FC3 & Gentoo), no shortcut keys were preset for switching workplaces, and so you will have to create your own.
- Hit up Preferences under the applications menu and then Keyboard Shortcuts, or else open a terminal and type "gnome-keybinding-properties"
- Once in the keyboard shortcuts menu, scroll down to the very bottom. In the left column, four lines up or so, there should be "Switch to workspace 1", "Switch to workspace 2", and so on.
- Click on the line containing the command you wish to make a shortcut for, and the entrance in the right column should change from "Disabled" to "New accelerator. Once it does this, enter whatever key sequence you want for it. Gnome will tell you if the key combo you entered is already in use. I use CTRL + F1; CTRL + F2 etc.
- Click close, and everything should be saved. Try it out just to make sure.
- Now, just load up your game through Cedega in one workspace, and any other applications you want in another. Use the shortcut whenever you want to get back to the desktop, and nothing will be interrupted.
The same thing applies regarding resolution differences as noted in the KDE section. If you are running a game in 1024x768 but your desktop at 1280x1024, when you use the workspace switching shortcut to switch from the game back to a desktop, it will be in 1024x768.
For some fullscreen games (CounterStrike 1.6) I can't get the hotkey to work. However, I set WindowsKey+R to open the Run dialog. I can use that, and once the Run dialog becomes active I am able to use my switch workspace hotkeys.
Just switch viritual desktops with : ALT + CTRL + ← or → You don't even have to set anything up to do so, as icewm defaults for these keys when it comes to switching viritual desktops.
You can also change the default keys by editing ~/.icewm/preferences The following example shows you how to set up keys for switching to workspace 1 and 2:
- 1. Open ~/.icewm/preferences with a text editor.
- 2. Add these two lines:
- 3. Save the file and restart IceWM.
- 4. Press the keys to switch to desktop 1 or 2.
Other functions, desktop switching related, that you can bind are:
For the latter one you can just replace 1 with the workspace number of your choice.
It is possible to create a key shortcut to deactive a mouse/keyboard grab on a window. This can be useful when dealing with a program that tends to crash, and requires DXGrab.
To do this, edit the file XF86Config-4. Look for the line Section "ServerFlags", and add the line Option "AllowDeactivateGrabs" "true" anywhere in the section.
The result should look something like this:
Section "ServerFlags" Option "AllowDeactivateGrabs" "true" EndSection
The usual warnings apply. Back up XF86Config-4 before editing it, and leave any other Option lines alone.
After this is done, hitting CTRL+ALT+/ should deactivate any mouse/keyboard grabs.
Note that this might be a small security risk. If you are using an old screensaver, and have to enter your password upon deactivation, this key sequence might also work on your screensaver. Testing if it does is as simple as pressing CTRL+ALT+/ while the screensaver is running, then trying various methods of switching the window.
Resizable file selector in Point2Play
Annoyed by the fact that you cannot resize your file selector in the install dialog?
Here's how to change it:
- 1. Switch to the root user.
- 2. Make a backup of /usr/lib/transgaming_point2play/p2p_diag.py
- 3. Open /usr/lib/transgaming_point2play/p2p_diag.py with your favorite text editor. (I used mcedit which is part of Midnight Commander)
- 4. Go to line 47 of this file (basically the last line) and change;
self.set_resizable( 0 )
self.set_resizable( 1 )
- 5. Save the file with the same filename.
- 6. (Re)Start Point2Play
The only problem is that after you resize the file selector and quit Point2Play, the window settings are not remembered. I fixed this by applying Window Specific Settings in KDE.
Making your window manager remember the size of your file selector
- Start Point2Play
- Click "Install" → "Browse"
- Rightclick on the titlebar of the "Browse for Program" dialog and select "Configure Window Behaviour"
- From the left menu choose "Window-Specific Settings".
- Click "New" then on "Detect".
- Now your cursor has changed into a cross. Click any of the buttons or side scrollers in the "Browse for Program" dialog. (I clicked on one of the side scrollers.) It will then pop up a dialog with "Information About Selected Window"
- Click "Ok"
- In the KDE Control module, you will see the field "Window Class" filled in with "Point2Play_gui.py Point2Play_gui.py" below this is a dropdown listbox. Make sure that this is set to "Exact Match"
- Go over to the "Window Extra" tab and set the "Window title" listbox to "Exact Match" for "Browse for Program".
- Click on the "Geometry" tab.
- Check on "Size" and select "Remember"
- Click "Ok" → "Apply" → "Ok"
- (Re)Start Point2Play, resize the file selector, quit Point2Play and notice how the size settings are now remembered.
Creating a png icon from the Windows game file
Some games fail to install an icon for Point2Play or create an ugly one so here is a way to extract icons from the windows file. If you are using Cedega 5 the folder path will be .cedega instead of .point2play
- install icoutils, Imagemagick and an image editor (for gentoo: icoutils is marked as "~x86"/"~amd64" and add "png" to your use flags)
- use wrestool to extract the windows icons from .exe file (you should create an empty directory for the output)
wrestool -x -o /temp -R -t3 /home/username/.point2play/.../eve.exe
- convert the files to png files
convert /temp/firstfile /temp/firstfile.png
- rename and edit the png file as you wish (most of the time you have to crop the image)
- copy the icon into the icon directory of the game (/home/username/.point2play/Eve/icons/)
- close Point2Play and edit the "games.ini" file to use your new png icon file
- start Point2Play
As an alternative, there's a nice freeware windows app that runs in Wine/Cedega called IrfanView that can cut the need for multiple apps show above.
- Download IrfanView from http://www.irfanview.com/ and Install on Wine/Cedega
- Use IranView to open the EXE you want. There are big blue forward and back arrows on the toolbar to choose the icon you want if the EXE contains many.
- Choose File: Save As.
- Select PNG from the drop down and choose where to save. You should save to /home/username/.cedega/GAMENAME/icons/. On my install, this shows up as E:\.cedega\GAMENAME\icons from within IrfanView
- Once you pick a location you will be asked to identify the transparent color in the image. If the window is empty, grab the title bar and move it around on the screen and it should show up. Click on the background to make it transparent.
- close Cedega GUI and edit the "games.ini" file to use your new png icon file
- start cedega