Replacing all tabs with spaces in VIM

To replace all tabs with spaces in a file open in Vim, as explained here, add to your /home/yourUsername/.vimrc file this line:

set expandtab

Note that this modification will apply whenever you edit a file in Vim. You’ll have to reopen Vim for the change to take effect. Then write:

:retab

Now all tabs should be replaced by spaces.

Fixing Matlab start error in Kubuntu 11.10

So after installing Matlab R2011b in my Kubuntu 11.10 system, I got the following error during Matlab startup:

Error: /usr/local/MATLAB/R2011b/bin/util/oscheck.sh: 605: /lib64/libc.so.6: not found

Despite not noticing any problem while using Matlab, the error was bothering me and I looked for a fix. The problem was that the symbolic link /lib64/libc.so.6 didn’t point to the right file. So I removed it by typing in the terminal

(1) sudo rm /lib64/libc.so.6

and made the right link by writing

(2) sudo ln -s /lib/x86_64-linux-gnu/libc.so.6 /lib64/libc.so.6

If this doesn’t work you need to find the actual location of libc.so.6 in your system. To do that, type in terminal

(3) locate libc.so.6

and replace ‘/lib/x86_64-linux-gnu/libc.so.6’ by the actual location in command (2) above. Good luck.

How to set up Dropbox in Kubuntu 11.10?

So you want to get all the cool stuff you have in your Dropbox onto your brand new shiny Kubuntu desktop but you don’t find anything in Muon but the Gnome installer. Lucky for you, I’ve been there.

To run Dropbox on KDE you don’t need to install the nautilus-dropbox package you see in Muon, which is a gnome package. Instead, as explained read here, you can download the client from http://www.getdropbox.com/download?plat=lnx.x86 (x86_64 for 64 bit).

The compressed file you just downloaded contains a folder, ‘.dropbox-dist’, which you should move to your ‘/home/yourUserName’.

After moving the folder, run in Konsole:

~/.dropbox-dist/dropbox

The wizard will then guide you through the installation. In the end you’ll even get that icon that we all love so much in your KDE taskbar.

To autostart Dropbox on startup, you need to create a symbolic link in ~/.kde/Autostart/. Just write in Konsole:

ln -s ~/.dropbox-dist/dropbox ~/.kde/Autostart/dropbox

After completing my installation, I had a permission problem that didn’t allow Dropbox to write some files to my drive. My solution for this was to set myself as the owner of the partition. I did this by adding ‘uid=yourUserName’ to the mounting options of my partition in my /etc/fstab file. You can open /etc/fstab in kate with

sudo kate /etc/fstab

Look for the line corresponding to the drive where you have your Dropbox folder. I edited mine to look like this:

/dev/sda2    /media/volume/    ntfs    user, fmask=0111,dmask=0000,uid=myUserName    0    0

Save and exit Kate. After a reboot, your Dropbox should be able to do a full sync.

Hope it helped!