Sunday, November 4, 2007

Step 3: finishing touches

First of all, I am going to assume you have accelerated videodrivers working with compositing enabled. There are hundreds of how-to's to achieve that, and in most cases its almost automatic.

Then configuring Compiz is something I'm not going to explain in detail either. The short version is:

sudo apt-get install compizconfig-settings-manager
Then go to system > preferences > appearance > visual effects > custom

In the preferences enable the 3D cube and cube rotation plugins, configure them as you see fit.

Wallpaper

If you've seen my video, you may have noticed I have different wallpapers on different sides of the cube. This is something normally not supported, but there are ways to achieve it.

First, let me say I just bumped into this tutorial:
http://ubuntuforums.org/showthread.php?t=600909

I have not tried this yet, and it does look tricky and intimidating, but feel free to give it a try and let me know if it worked.

The method I used is far simpeler, but does have a drawback: you loose your desktop icons. If you don't mind that, then all you have to do is first disable nautilus painting the desktop. In a terminal type:

gconf-editor
Browse to apps > nautilus > preferences > show_desktop and unselect it.



Next, we define the wallpapers in Compiz setting manager.
Go to Desktop Cube > Appearance
And in background images add the ones you want:



As you can not see :) I used 3x the ubuntudragon, and 1x the windowsdragon wallpaper for the 4 sides of my cube.

If you liked the one's I used, you can download them from here:
http://www.gnome-look.org/content/show.php/Ubuntu+Dragon+%2B+Windows+Dragon+wallpaper?content=69464

Launching of VirtualBox

An easy way to launch VirtualBox is creating a starter on your panel (right click on it > add to panel > custom launcher) , or even adding it in your session list if you want to start it automatically each session. The command to use is simply:

VBoxManage startvm name_of_your_virtual machine
That's all follks!

18 comments:

Chris said...

Loving you <3

Jaap-Jan van der Veen said...

Hmm, I am missing something. I already figured out the steps that you outlined in step 3, because you posted on ubuntuforums.org how to disable Nautilus rendering the desktop and replacing the icons and I already added a panel icon to start this virtual machine, so that's nothing new to me. :)

But in your movie, I see three cubes with gnome panels on the top and bottom and on the fourth, the Windows XP panel, you only have a gnome panel on the top and the Windows XP taskbar is sitting on the bottom of your screen. How did you manage to do that, hiding the gnome panel on the fourth side of the cube?

Maybe a tip: you can hide the taskbar item for VirtualBox, meaning you can't find it in the taskbar panel.

In CompizConfig Settings Manager, find the 'Window Rules' section. There, in the textbox next to 'Skip taskbar', type 'title=^name of the virtual machine.*VirtualBox$'. In my case, the virtual machine is called 'vista', so that line becomes: title=^vista.*VirtualBox$ . You can also use that for 'Skip pager' (meaning you won't find it when alt-tabbing), 'Non resizeable windows', 'Non minimizable windows', 'Non maximizable windows' and 'Non closable windows', but that's up to you.

If one of this textboxes aren't empty you can append the pipe '|' symbol (not acting as a pipe, but as an or) to the line which already exists. For this to work, the 'Regex Matching' plugin in Compiz must be enabled.

And there is more, you can make your VirtualBox start on the fourth side of the cube by default, again with CompizConfig. This time, go to the 'Place Windows' section and to the 'Fixed Window Placement' tab.

You can add a new window to the 'Windows with fixed viewport' section, by clicking on 'Add', ofcourse. The 'Viewport positioned windows' textbox must contain the same name mentioned above, with that title= stuff. 'X Viewport positions' are the sides of the cube. Counting starts from zero, so the first side is '0'. If you want it on the fourth side, you enter '3' there. 'Y Viewport positions' can be left to '0'.

I won't explain why: I don't know and honestly, I don't care, so if someone can explain it, be my guest. :P I only know that it has to do with the 'Vertical virtual size' option, found under 'General Options' under the 'Desktop size' tab. You can also set it in the 'Preferences' of the 'Workspace Switcher' applet, but I don't know how it works. :)

Please note that if you start your VirtualBox, it won't start directly on the viewport you choose, but on the viewport that is active. However, once Windows is started up, it will be moved to the fourth viewport automatically.

I hope someone found this comment useful. :)

P4man said...

"How did you manage to do that, hiding the gnome panel on the fourth side of the cube?"

Its not hidden, the windows taskbar sits above the gnome one. Well, not always, but when it doesnt, just press ctrl+L twice.. or 2x twice until it does :) Pressing super (/windows) key sometimes helps too. Seamless mode is still a bit buggy.

Thanks for the other tips, I don't boot often, so its not worth it to me, but it might be interesting for others !

Laura said...

If i try
sudo apt-get install compiz-config-settings-manager

i get
E: couldnt find package compiz-config-settings-manager

I have compiz runnig and i useGLDesktop to configure it ...hmm

Laura said...

You need to type
sudo apt-get install compizconfig-settings-manager

There is a typo in teh above instructions

Laura said...

you can use the synaptic package manager too

P4man said...

Thanks for pointing that out, I corrected the type.

Tommy said...

Great tutorial, P4man... hopefully you're still reading these comments, though, because I feel like I'm missing something :)

In your video, it looks like the windows apps were treated as distinct applications (as far as compiz is concerned - you were able to shift-switch to them individually, and it looked like they had the emerald window borders as well). When I put my virtualbox in seamless mode, however, the entire virtualized environment is treated as one application (if that makes sense... I can have twenty different windows apps open, and they all show up as one entry in shift-switch). Did I do something wrong?

P4man said...

You did nothing wrong. You just didn't look careful enough at the video :) The apps I task switch between are simply native Linux apps, and indeed virtual box is represented as just one window. Nothing to do about that I'm afraid.

Anonymous said...

Very spiffy stuff! Thanks for the tutorial. I don't know where your video is. Can you leave a note here?

Thanks,
oboedad55

Skinny said...

Look at the navigation top right, there you will see step 1, 2, 3.. Above that there is into+video. Its right there :)

oboedad55 said...

And right you are! Give me a break, it was 4:30 am when I was doing this stuff. :-)

Anonymous said...

Great tutorial...just started using Linux 2 hours ago and was able to set up everything in the tutorial with virtually no problems

Anonymous said...

>First of all, I am going to assume you have accelerated videodrivers working with compositing enabled. There are hundreds of how-to's to achieve that, and in most cases its almost automatic.

Fifteen minutes with Google, and I can't find one of those "hundreds" of tutorials. I'm grateful for your tutorial, which went well up to that point, but please don't *assume* that we have everything running like you. If we did, we probably wouldn't need the tutorial.

Thanks, Tom

Adam said...

Thanks very much for this tutorial, it is great and really helpful.

Just one thing I'd like to mention is that disabling nautilus from drawing the desktop gave me significant problems, and other users should be aware of this.

I was new to linux, and only figured out that this was causing my problems after 2 or 3 weeks (since I'd made so many initial changes). One of the problems, for example, was MATLAB not functioning (keyboard stopped working).

Nonetheless, thanks for the help :)

Wouwou said...

How does windows run from linux?
Atm i'm dual booting on a Macbook Pro between windows and os x.

But perhaps Dual boot OS X and Linux with virtual windows on linux would be the best?

But how would the speed be..?

Skinny said...

You can check the video to have an idea. It runs faster than you'd think, for most things (that are not too graphically intensive, and certainly nothing 3D) its pretty much as fast as native windows, just with 1 CPU core rather than howewer many you have. Might hurt when encoding video's or compiling but for other tasks, its more than adequate.

On OS-X you can run Parallels instead of VirtualBox, which has some additional advantages like (limited) 3D acceleration.

Alex. said...

Hey! This is cool. It's much more natural to differentiate between the four desktops by means of different wallpapers, I agree.

...However, is there any way to keep the icons on the desktop displayed, though, without a "3rd party" app to intermediate this?

Cheers!