http://ubuntu-tutorials.com/2007/07/25/how-to-set-default-workspace-size-and-window-effects-in-gnome/
How To Set Default Workspace, Size and Window Effects in Gnome
Among the many cool things that I’ve learned this week at Ubuntu Live there is one that I’m definitely going to keep using! Quickly, before I get started, I need to link back to the Ubuntu Forums post that started this whole thing. There is also a lot more examples and extensions on the wiki, seen here. Unfortunately, outside of these, there is very limited documentation on the web for this tool, so you wont find much more than what you see here. If you do please post a comment with a link.
There are a few steps to this full tutorial so get comfortable and follow along.
Installation
To get the features of this tutorial we will need to install a quick package. It’s pretty small and should just take a minute or two to download and install. Use the following command, or install the package using your favorite package manager:
sudo aptitude install devilspie
What exactly does this package actually do? From the package description:
This tool will find windows as they are created and perform actions on them, such as resizing, moving to another workspace, or pinning them to all workspaces.
In english? You can basically set rules for your favorite applications and make sure they load on the appropriate virtual desktop, at the certain sizes, etc. This has been something that I wish I had for a while and never really looked into. A have a nice organization of applications between my desktops, but all done manually. This automates the whole thing instead.
Configuring
Now that we’ve got the package installed we need to set the configuration of what we’d like it to do.
Create a new directory to store your new devilspie-related configuration file (yes, once you start using this you’ll create more and more–you want them organized). Use the following:
mkdir ~/.devilspie
After this is created we’ll create our custom configuration for the regular applications we launch. For example:
vim ~/.devilspie/firefox.ds
Paste in the following config to your new file:
(if
(is (application_name) "Firefox")
(begin
(set_workspace 2)
(maximize)
)
)
Basically what this is doing is watching for anything launched using the application_name “Firefox”, and give it the following features and options. It’ll load it on virtual desktop number 2 and set the window to maximize. Pretty basic, but so far this has been impossible in gnome. Of course if you’d like it to always load on virtual desktop 1,3,4, etc simply change the number to your preference.
Some more examples for common applications that I use listed below:
vim ~/.devilspie/thunderbird.ds
Paste in the following config to your new file:
(if
(is (application_name) "Thunderbird")
(begin
(set_workspace 3)
(maximize)
)
)
..or for beep-media-player to be on all desktops:
vim ~/.devilspie/bmp.ds
(if (is (application_name) "Beep Media Player") (pin))
…you get the idea. If you’d like to create your own custom rules create a new file in the .devilspie directory and create a debug.ds file. Within that file put:
(debug)
The next time you run devilspie it will read any of the files within .devilspie, which will now include this debugging option. You will see from the debug output the detected application_name of each currently running application. If you don’t know the proper name to use for creating your own rules you may want to use this debug option to help you along.
Persistence
Lastly I’m sure you’ll want these features to run all the time, so you’ll need to set the devilspie application to autostart. You may want to add devilspie to your “Applications > Preferences > Sessions”, which will make it start each time you log in, and read your created window customization options.
Troubleshooting
If you notice your rules don’t seem to be working try the following:
- Make sure devilspie is running (ps ef | grep devilspie, etc)
- Double check your application_name (or similar) via debug
- Double check your *.ds config file syntax
Enjoy. Please leave comments with customizations that you’ve made below. Considering the lack of documentation for this project a good list of examples would be great!
If this site has been useful, please consider participating in the Fundraiser.
Other Points of Interest
[douchebaggery]
On another note, "devilspie" is a stupid name and asking new Linux users to edit files in vim is probably not wise. Wouldn't it make sense to have a GUI to do these tasks? I never cease to be amazed at how low a priority user interfaces are given in the Linux world. UI should be one of the first considerations in applications development for Linux, just like it is for those other operating systems.
[/douchebaggery]
University Update - Firefox - How To Set Default Workspace, Size and Window Effects in Gnome
Just set your window up how you want it to be, click 'remember' in the window menu, and choose the attributes that you want remembered. Very nice.
[1] http://www.chimeric.de/snippets/linux/devilspie#e...
I fully agree with previous posters: This should definitely be part of the standard Gnome capabilities. Even the Gnome developers on their 'simplicity' trip should admit that a simple 'remember' option is not going to confuse anyone.
Or the ability to modify screensaver settings, for that matter and while we are at it...
Anyone have any ideas?
many thanks
TuxJournal.net 2.0 » Archivio » Desktop: mettete le regole alle vostre finestre (3/4)
Thanks for all the great info! I've installed virualbox and devilspie. Only problem is with devlspie cause I keep getting this error and it does not move the windows to other workspaces:
** (devilspie:10241): WARNING **: Workspace number 2 does not exist
(devilspie:10241): Wnck-CRITICAL **: wnck_window_move_to_workspace: assertion `WNCK_IS_WORKSPACE (space)' failed
I did not findany solution yet on the many posts i've googled..
Any ideas please??
found the answer in ubuntuforums:
"because of compiz you have to use set_viewport
instead of set_workspace"
http://code.google.com/p/gdevilspie/wiki/gDevilsp...
uninstalled compiz and tried .It says no error but it won't work.
can any one tell me how to do?
Nenhum comentário:
Postar um comentário