Miraculix
04-15-2008, 05:32 PM
Hm the title might be a little confusing, so here's the explanation:
You want to play the game in full-screen, but you want to be able to switch desktops, windows etc, as if the game was in windowed mode. Well, here's how to do it:
Open Synaptic, and search for a package called devilspie. Install it. Terminal command:
sudo apt-get install devilspie
What is this program? Well, when it's loaded, it monitors every window that is being opened, and if you have set any rules for that specific window, it will apply them. For example, you can set a rule to move Firefox on desktop 2 each time it's opened, or start Xchat minimized, etc etc. We will use this program to set some rules for the Regnum game window.
Okey, once you have this program installed, you need to launch it. No use doing it straight away, since if it does not find any set rules, it will automatically quit. So how do we set rules? Very easy: Devilspie looks for *.ds files under ~/.devilspie and executes any rules set there. Okey, so we will just go ahead and create that directory first:
mkdir ~/.devilspie
Now we need to create some rules for it. I won't go into details about what devilspie can do, you can find that info here (http://foosel.org/linux/devilspie), here (http://live.gnome.org/DevilsPie) and here (http://burtonini.com/blog/computers/devilspie). All you need to know for now is that you can set rules for a window and it will execute them.
Let's create the rules we need for regnum. What's needed to be done? Well, if you run the game in windowed mode, but on your desktop's resolution, you'll notice 2 things:
a) The bar on top with the close/minimize buttons shifts the window lower and some part of it is clipped from the screen
b) The gnome bars are hiding/shifting the game window too.
We need devilspie for a), and some gnome tweaking on b).
We need to tell devilspie to remove that bar from the game window each time it starts, and move it so that it is centered and fills the screen. So let's create that rule file:
gedit ~/.devilspie/regnum.ds
Paste the following code into that file:
(if
(matches (application_name) "Untitled window")
(begin
(undecorate)
(geometry "+0+10")
)
)
(I know, it's weird that the RO window has no title ^^)
Save the file & exit the editor.
What this does is, each time Regnum Online is opened, it will remove the decoration (the bar with the minimize/close button) and will position it so that it is all over the screen.
Okey, now we need to start devilspie:
devilspie &
You might want to add this to your startup session, you can do so under System->Preferences->Sessions and add "devilspie" in your startup programs, so you don't have to manually start it each time.
We still have the problem of the gnome bars being on our desktop. The most effective way I have found to get around them is to enable the arrows that hide them, and slide them away before I start the game. So, right click on each of the bars (top & bottom) and choose: Properties, tick: "Show Hide Buttons" and "Arrows on hide buttons".
You need to manually hide the bars *before* the game is launched. I like to hide the top bar to the right and the bottom to the left so it doesnt hide anything from the game window.
Okey, now you are ready to start the game. Configure it to run in your max desktop resolution, windowed mode. Hide your gnome bars, and click "Enter Game World".
If all went well, you should be playing RO in windowed mode, but still be all over your screen. You can unhide your bars at any time by clicking on the arrows and switching to another desktop, window, etc etc.
Hope this helps someone ;)
You want to play the game in full-screen, but you want to be able to switch desktops, windows etc, as if the game was in windowed mode. Well, here's how to do it:
Open Synaptic, and search for a package called devilspie. Install it. Terminal command:
sudo apt-get install devilspie
What is this program? Well, when it's loaded, it monitors every window that is being opened, and if you have set any rules for that specific window, it will apply them. For example, you can set a rule to move Firefox on desktop 2 each time it's opened, or start Xchat minimized, etc etc. We will use this program to set some rules for the Regnum game window.
Okey, once you have this program installed, you need to launch it. No use doing it straight away, since if it does not find any set rules, it will automatically quit. So how do we set rules? Very easy: Devilspie looks for *.ds files under ~/.devilspie and executes any rules set there. Okey, so we will just go ahead and create that directory first:
mkdir ~/.devilspie
Now we need to create some rules for it. I won't go into details about what devilspie can do, you can find that info here (http://foosel.org/linux/devilspie), here (http://live.gnome.org/DevilsPie) and here (http://burtonini.com/blog/computers/devilspie). All you need to know for now is that you can set rules for a window and it will execute them.
Let's create the rules we need for regnum. What's needed to be done? Well, if you run the game in windowed mode, but on your desktop's resolution, you'll notice 2 things:
a) The bar on top with the close/minimize buttons shifts the window lower and some part of it is clipped from the screen
b) The gnome bars are hiding/shifting the game window too.
We need devilspie for a), and some gnome tweaking on b).
We need to tell devilspie to remove that bar from the game window each time it starts, and move it so that it is centered and fills the screen. So let's create that rule file:
gedit ~/.devilspie/regnum.ds
Paste the following code into that file:
(if
(matches (application_name) "Untitled window")
(begin
(undecorate)
(geometry "+0+10")
)
)
(I know, it's weird that the RO window has no title ^^)
Save the file & exit the editor.
What this does is, each time Regnum Online is opened, it will remove the decoration (the bar with the minimize/close button) and will position it so that it is all over the screen.
Okey, now we need to start devilspie:
devilspie &
You might want to add this to your startup session, you can do so under System->Preferences->Sessions and add "devilspie" in your startup programs, so you don't have to manually start it each time.
We still have the problem of the gnome bars being on our desktop. The most effective way I have found to get around them is to enable the arrows that hide them, and slide them away before I start the game. So, right click on each of the bars (top & bottom) and choose: Properties, tick: "Show Hide Buttons" and "Arrows on hide buttons".
You need to manually hide the bars *before* the game is launched. I like to hide the top bar to the right and the bottom to the left so it doesnt hide anything from the game window.
Okey, now you are ready to start the game. Configure it to run in your max desktop resolution, windowed mode. Hide your gnome bars, and click "Enter Game World".
If all went well, you should be playing RO in windowed mode, but still be all over your screen. You can unhide your bars at any time by clicking on the arrows and switching to another desktop, window, etc etc.
Hope this helps someone ;)