Monday, September 7, 2009

Backup using BackInTime

Heard of Mac's Time Machine? BackInTime is something similar.

It makes snapshots of your specified directories, making a copy of the files in your specified destination. Here is something good: you can make backups everyday and not make your backup directory size blow up in size. It only backs up the changed files.

Good eh? Here is something better: you can go to each backups/snapshots (dated in days probably and can even be in minutes or seconds!), and access your files there having different edition than the file you have now (that is if you edited it).

The secret: it makes use of hard links. Here is a good read about hardlinks. It's a discussion about Time Machine and how it works, but the underlying technology is similar.

BackInTime is based from "flyback" and "timevault", two similar softwares with apple's "Time Machine". I tried timevault, and it never worked on my 64bit Ubuntu, so I looked for other alternatives, and I found BackInTime.

To install BackInTime, head over to this link. Download the backintime-common-xx_all.deb and backintime-gnome-xx_all.deb, if you're using Gnome (Ubuntu), or backintime-kde-xx_all.deb if you're using Kde (Kubuntu). Double click on the deb files and click Install.

You may want to visit BackInTime's website for additional details.

Thursday, August 27, 2009

How to Copy & Paste in Terminal

There are two terminals in Ubuntu: the one you invoke with (Alt+F2) "xterm" and the one you invoke with (Alt+F2) "gnome-terminal".

The gnome-terminal has this "paste" function. Right click anywhere on hits area, and you'll have the Paste. The "xterm" has none. So you'll need other key combinations to paste and copy from xterm.

To paste into "xterm" (assuming you copied a text somewhere), press
Shift+Insert


To copy from "xterm", highlight the text using your mouse, then press
Ctrl+Insert

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.. :)

Tuesday, February 24, 2009

How to Compile Blender with Yafaray support in Ubuntu

Blender is the most popular open-source 3D application. it's capable of modeling, texturing, animation, composition, etc.

Yafaray is an external rendering engine, built to simplify (a bit) the setup of lights.


Download the Script to compile

This instruction relies heavily on a Script by Mr. Greenthumb, called sevenblend. So first, download the script here.

extract the files on a folder, say sevenblend.


Download Needed Packages

We need, a number of packages for checking out source files, and compiling. To download, do this on the terminal:

sudo apt-get install subversion libqt4-dev binutils swig scons libpng12-dev gcc g++ libalut-dev libsdl-sound1.2-dev libopenexr-dev libjpeg62-dev python2.5-dev python2.6-dev libtiff4-dev gettext libxi-dev libfreetype6-dev libxml2-dev yasm
Execute the script

Next thing, execute the script. go to the directory where you uncompressed the downloaded script, then execute the script by doing this on the terminal
./sevenblend.sh

Hopefully, it should all work without errors.

If you've tried this using older versions of ubuntu (prior to ubuntu 9.04), delete the .sources directory under sevenblend folder first before doing the "./sevenblend.sh"

Enjoy Blender with yaf(a)ray support :D go to your home directory and look for sevenblend link, double click it and it should run blender.

You can actually optimize the build for your own CPU... that will be the next topic on my next post..