Thursday, July 9, 2009

A PDF printer for Jaunty

One thing i missed in Jaunty (Ubuntu 9.04) is the ability to print into a virtual printer which gives you a pdf of whatever is printed. This was "in" by default in previous versions of Ubuntu.

I found out that only one packages needs to be installed: cups-pdf

so get your terminal, and type
sudo apt-get install cups-pdf

that's it! you should have a working printer, that allows you to print everything into a pdf file. Take a look at Printing (System>Administration>Printing) to verify if the printer was installed, or simply print something! :)

Monday, July 6, 2009

Installing Google Earth

Google Earth allows you to view the world and allows you to view high-resolution aerial and satellite imagery, photos, elevation terrain, road and street labels, business listings, and more.

To install, go first to the downloads section of Google earth website and download the installer. Try this link.

It should give you a file named: GoogleEarthLinux.bin
Double clicking on it will give you an error, saying that no application is registered to open the file. We need to make it an executable file. In the terminal, go to the directory where you downloaded GoogleEarthLinux.bin, and do the following:
sudo chmod 755 GoogleEarthLinux.bin
Then you can execute the file now by double clicking on it, or in the terminal type:
./GoogleEarthLinux.bin
It should give you a window, aski.ng where you'll want to install Google Earth. Just allow the defaults, and it will install it in your home directory.

After that, it should create a link on your Desktop, simply right click the icon Google Earth, and enjoy!

Segmentation Fault in Google Earth

After installing google earth, i have this error in the console:
Segmentation fault

and in syslog, i find this error:
Jul 6 16:52:48 garu-laptop kernel: [60493.971012] googleearth-bin[25482]: segfault at ceb30e34 ip 00000000f5f0fce6 sp 00000000ff807a68 error 6 in libGL.so.180.51[f5eaa000+8d000]
And from this site, i found the answer.

In the terminal, go to the directory where you installed your google earth. In my case i went to /home/garu/google-earth
cd /home/garu/google-earth
then, create a symlink to libGL.so.1.2. while you're in the directory where you installed google-earth, type the following
ln -s /usr/lib32/libGL.so.1.2 libGL.so.1
Try google earth now, and all should be fine.

Sunday, July 5, 2009

Compile Blender+Yafaray for Turion64x2

hello! long time no post..

i encountered a problem recently on compiling blender+yafaray using the sevenblend script. It gives me this error:

Compiling ==> 'SND_DummyDevice.cpp'
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
intern/SoundSystem/dummy/SND_DummyDevice.cpp:1: error: bad value (nocona -O2 -pipe) for -march= switch
intern/SoundSystem/dummy/SND_DummyDevice.cpp:1: error: bad value (nocona -O2 -pipe) for -mtune= switch
Compiling ==> 'SND_DeviceManager.cpp'
scons: *** [/home/garu/downloads/yafaray/sevenblend-0.2.0-1/.sources/build/linux2/intern/SoundSystem/dummy/SND_DummyDevice.o] Error 1
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
intern/SoundSystem/intern/SND_DeviceManager.cpp:1: error: bad value (nocona -O2 -pipe) for -march= switch
intern/SoundSystem/intern/SND_DeviceManager.cpp:1: error: bad value (nocona -O2 -pipe) for -mtune= switch
scons: *** [/home/garu/downloads/yafaray/sevenblend-0.2.0-1/.sources/build/linux2/intern/SoundSystem/intern/SND_DeviceManager.o] Error 1
scons: building terminated because of errors.
17:31:09 [WARN] *** ********** Check all logs in /home/garu/downloads/yafaray/sevenblend-0.2.0-1/.sources/logs/compile_blender.log **********

By the way, am using a 64-bit ubuntu 9.04. I'm using the 2.6.30 kernel optimized for my processor (turion64x2).

Thanks to jensverwiebe for helping me out..

First, am using the WITH_OPTIM option, so i needed to change the user-config.py. It is supposed to compile an optimized blender+yafaray for your processor. so instead of simply typing ./sevenblend, i type this:
./sevenblend WITH_OPTIM
Go to the user-config directory, and rename user-config.py to user-config.py.bak for backup purposes.

Rename AMD64_user-config.py to user-config.py. This user configuration file is for a 64-bit AMD processor. If you'll be compiling an optimized build of blender+yafaray (using ./sevenblend WITH_OPTIM command), you may want to check out your processor and choose which config file to use. If you have a Core 2 processor, rename CORE2DUO_user-config.py into user-config.py.

Now we'll be editing our user-config.py (formerly AMD64_user-config.py). The error i posted above was due to the fact that my processor need a different flag, it should use k8 rather than nocona. My processor is part of the k8 processor family. Edit this line:
CFLAGS="-march=nocona -O2 -pipe"
and change it into
CFLAGS="-march=k8 -O2 -pipe"
Save the file.

Now, we'll be editing another file named linux2-config.py. It is located at .sources/blender/config. This will only be present if you've already attempted to use the sevenblend script. It will download the source code of blender and everything you need to compile. Look for the following lines:
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
and change them into
REL_CFLAGS = ['-O2','-march=k8']
REL_CCFLAGS = ['-O2','-march=k8']
Save the file and then compile. All should be well after doing this.. :)