2008 November

Nautilus script to install fonts

#!/bin/bash
#
# Autore: Mosconi Marco (brus46)
# Licenza: GPL 2 or later
#
gksu mkdir /usr/share/fonts/truetype/myfonts
for arg do
files=`echo "$arg" | sed 's/ /\\ /g'`
gksu cp "${files}" /usr/share/fonts/truetype/myfonts/
zenity --title=FontInstaller --info --text="${files}"
done

gksu fc-cache -f -v

zenity --title=FontInstaller --info --text="Fonts installed"

exit 0

http://www.sciallo.net/modules/archivio/archivi/Ubuntu_scripts/InstallaFont

By WladyX on 24 November, 2008 | General, Scripts, X11 | A comment?

Using Samba’s smbclient to Backup Files from Linux to a Windows Server

By WladyX on 20 November, 2008 | General | A comment?

Linux labels

Ext2 and ext3 file systems

In order to change the label of an ext2 or ext3 partition, you will need to use: e2fsprogs program utilities. If it is not yet install on your computer, run the following command to install it:

$ sudo apt-get install e2fsprogs

Retrieving the existing label

In order to retrieve the existing label of your partition, simply run:

$ sudo e2label /dev/sdaX
my label

Setting a new label

To set up a new label, you simply have to append the label name at the end of the command line, so it will look like:

$ sudo e2label /dev/sdaX “my new label”

ext2/3 label has to be at most 16 characters long, if longer, label will be truncated

In order to confirm that your changes where properly applied, you can retrieve the partition’s label with:

$ sudo e2label /dev/sdaX
my new label

The new label should be output on the next line.

Deleting an existing label

Label can be deleted by supplying an empty label to e2label with this command line:

$ sudo e2label /dev/sdaX “”

Reiserfs file system

First of all, you need to have reiserfsprogs package installed. If it not yet present on your machine, please run:

$ sudo apt-get install reiserfsprogs

While working on a reiserfs partition, the partition needs to be unmounted.

Now that you made sure that your partition is unmounted, let see how it works.

Retrieving the existing label

To retrieve the existing label, run:

$ sudo reiserfstune /dev/sdaX | grep LABEL

LABEL:

The label is going to be apended to “LABEL: “, if there is no label yet, only “LABEL: ” will appear.

Setting a new label

To set up a new label, you will need to use the -l switch like:

$ sudo reiserfstune /dev/sdaX -l “my new label”

Check for the “LABEL: ” entry in the output, this one should now print:

LABEL: my new label

Reiserfs label has to be at most 16 characters long, if longer, label will be truncated

Removing an existing label

To do so, simply supply an empty label with this command line:

$ sudo reiserfstune /dev/sdaX -l “”

NTFS file system

install ntfsprogs

$sudo umount <drive directory>

$sudo ntfslabel -f /dev/sda5 <newlabel>

How-to get your removable device mounted under an explicit and persistent name | Debian/Ubuntu Tips & Tricks
http://tuxecute.blogspot.com/2008/09/change-your-ntfs-windows-drive-label.html

By WladyX on 17 November, 2008 | General | A comment?

Firefox SiteSeek

Here’s a handy bookmarklet someone made to search
whatever site you’re currently on. Save it as the address line in a new
bookmark and click whenever you need it.

javascript:k=escape(prompt('Enter%20search%20terms%20for'+location.host));k=k.replace('%20','+');location.href='http://www.google.co.uk/search?q='+k+'+site%3A'+location.host;

Gentoo Forums :: View topic – e2fsprogs ss com_err blocks problem

By WladyX on 13 November, 2008 | Firefox, General, Scripts | A comment?

Replace line X with String Y using sed

By WladyX on 11 November, 2008 | General, Scripts | A comment?

Remove all settings for Evolution

If you ever want to delete your entire Evolution account, history,
configuration, settings, etc and start over from scratch, here’s how to
do it:
Back up all of your files first (of course).
$ rm -rf ~/.evolution
$ rm -rf ~/.gconf/apps/evolution
$ evolution –force-shutdown
Find the process id for ‘gconfd’ and kill it:
$ ps -ef|grep gconfd
yourusername 30515 [...]

delete Evolution settings

By WladyX on 5 November, 2008 | General, X11 | A comment?

Evolution — Addressbook access error

- close Evolution
- delete /home/username/.gconf/apps/evolution/addressbook (it will be recreated)
- delete /home/username/.evolution/addressbook (it will be recreated)
- reboot your computer (this is crucial, otherwise the faulty gconf files will be restored)
- launch Evolution and enjoy your working address book

Evolution — Addressbook access error. – Ubuntu Forums