well, I installed ubuntu 11.10 on a partition in order to test my scripts before publishing them .. there are cases where it does not work as it should in some operating systems, for example when using python modules related to process or file systems. also I always liked Unix and Linux for working on it, in another life, in the 1990s.
It was time to return to the source (ahah), especially now that linux user interface really rocks, and that installing the sound card or a webcam is no longer limited to a handful of nerds, and still as reliable as Unix OS.
Ubuntu installs itself as easily as windows now. everything is almost ready at the end of the installation and there will be no major problems to access your Windows files on another NTFS or FAT32 partition, or to choose between Windows or Ubuntu at startup. I wrote that 'no major problems' instead of writing 'it's easy' only because I'm very upset when I read 'simply' in the blog of a young geek that tells more than he knows (disease of our time), or the blog of older and incomprehensible nerd and that I can't make it work, because I am (often) in a particular case. but the fact is, most often it will work the first time.
The following will interest the novice Linux user that likes 3D and scripting, and the enthousiast BPYthonist used to windows, which would, one Sunday after his coffee, tell to himself "I'm missing something very great, and it's a shame that my scripts never work on mac or linux, and my big 1TB drive could handle with a small partition with ubuntu in it, just to see. "
you may even have only one copy of the python scripts for both systems, shared using symlinks for linux or equivalent fusion for windows, all in one eclipse + pydev envirronnement + git + svn .. but hey, it's a bit long to tell, and it's a bit young for me to tell you about.
Be careful when tampering with compiz (the engine that provides 3d effects of the ubuntu desktop) it is a little buggy at the moment (october 2011) .. but eventually it will end up good. also if you want to have windows and ubuntu on the same disk it will be faster and easier to install windows first .. "Google is your friend."
ok let's go
in the left bar of the Ubuntu desktop aka the launcher, an icon provides access to a catalog in which Blender can be found. this is cool. except that it is not the latest version. so we will install it from Blender.org :
blender 2.60
the video below shows the lazy way to install Blender 2.60 from blender.org. before I created an 'apps' directory in /home/<login>, where I'll store any applications that I did not download from a linux package manager.
other versions of Blender may be decompressed at the same location in 'apps' or in your /home/<login> user folder or in a /home subfolder of your choice.
blender 2.49b
this is a bit more complicated for Blender 2.49b. sure it's optional but I needed it for several reasons, among others for Blended Cities, that I will continue to maintain a little while writing the version for Blender 'next gen' started this summer. also, a lot of scripts and some functions are not yet available in 2.6. Ubuntu 11.10 is supplied with python 2.7 and 3.2, and Blender 2.49ba needs Python 2.6 to work. Here is the quickest way I found to run Blender on Ubuntu 2.49b (after a morning of struggle during which google was not my friend at all...) :
of course you can install python 2.6. from python.org like for windows as would the venerable and authentic Linux user do (this one does not like unity a lot it seems). but if like me you are new to Linux, or if the last time you installed it was during the Roaring Twenties when every one said that vi was incredibly intuitive, prepare yourself to a lot of disappointments and misunderstandings + few hours of reading things like ". / configure make sudo make altinstall it's easy", it not that hard yes but ok but it's incomplete, with a not-zero-at all probability to end up with the same error message at the end, and to replace the default ubuntu python version (2.7.2 +) by the 2.6.6 or something (which is bad but reversible)
the key information I never found was : don't forget to also install libpython2.6 with python2.6 ;)
a Blender shortcut in Unity
(by the way, Unity is the desktop interface used in Ubuntu 11.10 which replaces Gnome, it has nothing to do with the 3d engine)
Now that you have 2.49b Blender, Blender 2.6, of 2.59, plus two or three versions downloaded from graphicall to establish your brand, it would be convenient to have an effective desktop shortcut.
but it's not so obvious to create one in unity, in some case. it requires a little tweaking. I wanted to be able to run any version of Blender from a single icon (space saving), with or without the console (handy for messages from scripts or for debugging, but cumbersome in other occasions) :
most of the time you can create a new shortcut in the launcher on the left 'quite simply' (hehe), by right clicking on the icon of a running program and by choosing 'Keep in launcher'. but it does not work for Blender (well, for me).
So :
- open a terminal (ctrl alt t) and type: sudo gedit
you just opened a text editor in root mode (Administrator Master Control Program) - open Nautilus (the Ubuntu file explorer) and swim to /usr/share/applications
This is where all of the 'shortcuts' are stored. to display one of these shortcuts in the launcher to the left, select one of them and drag it above the launcher, then release the mouse-left button. - copy and paste the following code in the Gedit text editor :
[Desktop Entry]
Name=Blender 2.60a
GenericName=3D modeller
GenericName[es]=modelador 3D
GenericName[de]=3D Modellierer
GenericName[fr]=modeleur 3D
GenericName[ru]=Редактор 3D-моделей
Comment=3D modeling, animation, rendering and post-production
Comment[es]=modelado 3D, animación, renderizado y post-producción
Exec=/home/littleneo/apps/blender-2.60a-linux-glibc27-i686/blender
Icon=/home/littleneo/apps/blender-2.60a-linux-glibc27-i686/icons/scalable/apps/blender.svg
Terminal=false
Type=Application
Categories=Graphics;3DGraphics;
MimeType=application/x-blender;
X-Ayatana-Desktop-Shortcuts=Blender26aconsole;Blender26;Blender26console;Blender259;Blender259console;Blender249;Blender249console
[Blender26aconsole Shortcut Group]
Name=Blender 2.60a console
Exec=gnome-terminal --command /home/littleneo/apps/blender-2.60a-linux-glibc27-i686/blender
TargetEnvironment=Unity
[Blender26 Shortcut Group]
Name=Blender 2.60
Exec=/home/littleneo/apps/blender-2.60-linux-glibc27-i686/blender
TargetEnvironment=Unity
[Blender26console Shortcut Group]
Name=Blender 2.60 console
Exec=gnome-terminal --command /home/littleneo/apps/blender-2.60-linux-glibc27-i686/blender
TargetEnvironment=Unity
[Blender259 Shortcut Group]
Name=Blender 2.59
Exec=/home/littleneo/apps/blender-2.59-linux-glibc27-i686/blender
TargetEnvironment=Unity
[Blender259console Shortcut Group]
Name=Blender 2.59 console
Exec=gnome-terminal --command /home/littleneo/apps/blender-2.59-linux-glibc27-i686/blender
TargetEnvironment=Unity
[Blender249 Shortcut Group]
Name=Blender 2.49b
Exec=/home/littleneo/apps/blender-2.49b-linux-glibc236-py26-i386/blender
TargetEnvironment=Unity
[Blender249console Shortcut Group]
Name=Blender 2.49b console
Exec=gnome-terminal --command /home/littleneo/apps/blender-2.49b-linux-glibc236-py26-i386/blender
TargetEnvironment=Unity
- usually only the first section [Desktop Entry] is necessary. the seven following sections will show the seven lines of the 'contextual' menu when you right click on the icon as in the image above. each of the seven sections has a name followed by Shortcut Group. the name must also be listed in the bold line X-Ayatana-Desktop-Shortcuts
- names displayed in the menu are the ones you set for the variable name in each section.
- for each Exec line, replace /home/littleneo/apps/ by the path each directory of Blender you unzipped in your /homer/<login>/ ... folder.
- save the file in /usr/share/applications name it for example blender26.desktop (desktop is mandatory)
- drag blender26.desktop above the launcher then release the mouse-left button.
voila, welcome to a better world. click left to start 2.6a, click right to select another version or to display the console.
I hope this will help and that you will spare some hours while migrating to the right side of the force ;)
Bonjour,
Merci pour votre partage.
Comment installé pratiquement python 2.6 pour Blender 2.49b sur ubuntu 12.04_amd64?
Fantastic!
I have a very good 'hands on' manual for blender, but its for 2.49.
I got ubuntu 11.10, and couldn't use this excellent hands on manual with blender 2.6 !!
Spent many hours trying to figure this out...
Thanks for this great tutorial :)