File Synchronization

Unison is a file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.


Unison shares a number of features with tools such as configuration management packages (CVS, PRCS, Subversion, BitKeeper, etc.), distributed filesystems (Coda, etc.), uni-directional mirroring utilities (rsync, etc.), and other synchronizers (Intellisync, Reconcile, etc).

Other applications


Linux


rsync is an open source utility that provides fast incremental file transfer.
In Ubuntu you can install from the application menu Grsync, a simple graphical interface for rsync.

Windows


SyncToy is a free PowerToy designed by Microsoft that provides an easy to use graphical user interface that can automate synchronizing files and folders. It is written using Microsoft's .NET framework.

GUI for the alternativates system

Galternatives is a GUI to help the system administrator to choose what program should provide a given service.

It updates the /etc/alternatives links, which defines default applications for the traditional Unix/Linux system, for example which java virtual machine should be used in case there are several versions installed on the system, which webbrowser will be launched etc.



Basically, it is a graphical front-end to the update-alternatives command-line tool.

Install on Ubuntu


sudo aptitude install galternatives


Finally, we could create a launcher in our main menu (System-->Preferences-->Main Menu):

P2P network down-/uploader

mldonkey is a multi-platform, multi-protocol client application.
It includes support for eDonkey2000, Overnet, BitTorrent, Gnutella and Fasttrack.

It can also be used as file downloader, like wget, FlashGet, GetRight.
So if you have a big file for download, just add it and mldonkey takes care of downloading, taking in account your download-limit.

mldonkey installs as a background daemon and does everything without your interaction.
Of course, you'll have to add something to download.
Therefore, we need to access mldonkey somehow, as it acts like a service without GUI.

There are several possibilities, sorted by the easiest to the more complex one:
  1. Install and use a GUI client application. In Ubuntu there comes one called mldonkey-gui. There are others out there which can be found on the web page.
    They communicate with mldonkey-server on the socket 4001 by default.
  2. Use the web interface provided by mldonkey-server.
    Just open your favourite webbrowser on http://localhost:4080.
  3. On the web interface you can do almost everything, but if you need something special just open a shell and issue
    telnet localhost 4000.
    Here you can manage mldonkey-server with a huge set of commands (use longhelp to see all of them).
Okay, doesn't seem to be the most easiest usage.
That's right, but this application is really powerful and gives you access to all download schemas at once.

Some setup notes


  • The Ubuntu package doesn't enable BitTorrent by default, so in the web interface just tick it in Options...Net...enable_bittorrent(true)
  • Where are my downloaded files?
    On Ubuntu they are downloaded to /var/lib/mldonkey/incoming.
    You should change the settings of the shares to your own folders or just stick with it:
    • Create symbolic links in both incoming folders:
      sudo ln -s /home/yourname/incoming /var/lib/mldonkey/incoming/files/yourname
      sudo chown mldonkey.mldonkey /var/lib/mldonkey/incoming/files/yourname
      The same for incoming/directories.
    • In mldonkey enter yourself as new user:
      useradd yourname  mldonkey yourname
    From now on, when you enter mldonkey with your username, mldonkey will copy all your downloaded files to your ~/incoming folder.


Troubleshooting


Once my harddisk got full and somehow mldonkey got stuck in a very unstable state. It shut down, 'cause of missing download space, but thereafter it didn't wanted to start again. There were no explication in the log files, why it inmediately died after launched, even that I had cleaned up space again for downloads. At the end I had to remove some temporary files with this command and everything worked fine again:
sudo rm /var/lib/mldonkey/*.tmp


Other applications


I used lots of applications in the past from BitComet, Azureus, uTorrent and Lphant.
Especially, I liked lphant, because it is able to download from eDonkey and BitTorrent at once, but I wasn't able to get it run on Linux (it's based on .NET 2.0, so even with Mono and Wine it isn't possible).
In the P2P community, the most used application for BitTorrent is uTorrent, a very light-weight and easy to use program.

Switching to mldonkey


When switching from another eDonkey/eMule client in most of the cases you can import the partial downloaded files to mldonkey.
I successfully imported the data from lphant to mldonkey with the import_temp command.
But be careful, the partial downloaded data will be erased from the imported folder, so just in case make a backup first.
In the Wiki there are guides about importing data from BitTorrent clients, but this seems to be quite complicated. So maybe the easiest way is to copy your .torrent files into /var/lib/mldonkey/torrent/incoming and after a while they'll show up in the download list, but starting from 0%.

Cracking Wireless Networks

Normally, you shouldn't go ahead and connect to your neighbours wireless connection, preventing him from using the full bandwidth he contracted and which he is paying.

My tutorial for Ubuntu Gutsy which uses aircrack-ng will give you full instructions for quickly obtaining a wireless network key, but I highly discourage you to abuse this knowledge.
  • You should only use it if for some reason you couldn't connect to your own DSL connection and quickly need to lookup some help on the net.
  • Or you're in nowhere, far away from your own network connection and quickly need some information or need to send an important email.
  • There will be no harm, if you use someone's network connection for a few minutes, without using a high amount of bandwidth.
  • You shouldn't start to use P2P downloading for example.
You also should be aware that the cracked wireless connections router maybe isn't well protected and leaves your system open to external attacks.

Of course, you could use it also to check your own wireless connection setup to see how quickly someone could crack yours.

Visual Diff and Merge tools

Meld
Working with source controls systems implies to view differences between versions, merge changes.
Or you just want to see quickly a difference between two files or folders.

On Linux you could stick to good and old tool diff, but it's a command line tool and it gets very confusing when viewing differences between big files.

WinMerge
It's much better to use visual tools for these task, moreover they integrate well with source control tools like explained in one of my previous topics.


For Ubuntu there is meld.

For Windows I recommend WinMerge.

GUI for subversion

First of all, I recommend all programmers to hold their sources, even personal stuff, in a source control system.
It makes things much easier if you have to perform some roll-back of parts of your code, or even have to find out bug regressions.

With subversion its so easy to have your own subversion repository and one day I'll talk about this.

To handle subversion from command line isn't very simple, especially if you want to compare what changed, if you have to resolve merge conflicts or you just want to investigate which projects are located inside a repository.

There are several implementations of GUIs out there for subversion.

Update: My latest recommendation is subcommander!

On KUbuntu the one I recommend is kdesvn that can be installed directly from the applications menu.
It permits to browse existing repositories and perform all possible operations like checkin/outs, merges, diffs, change properties, etc.
A very nice feature is its integration with the dot utility for painting Revision Graphs. You'll have to install the GraphViz package: sudo apt-get install graphviz

eSvn integrates better into Ubuntu than kdesvn, is almost equal, but has some limitations when browsing repositories (you can't see the log for a certain tag, for example). I still recommend it when you use Ubuntu. Another advantage: It's multi-platform, and is available for Windows also.

On Windows there is a very powerful tool called TortoiseSVN. Unfortunately, it hasn't been ported to Linux yet.
Tortoise has some special features for integration with issue tracking systems like Jira, integration into VisualStudio, aso.

Other applications

Previously, I recommended RapidSVN, but it doesn't support repository administration, nor it doesn't support double-clicking a file to see its content (you first have to checkout to a working folder).
On Ubuntu you find also SVN Workbench, but this tool doesn't support browsing existing repositories.

Create ISO dump from CD/DVD

Visually with K3b


K3b is a CD/DVD creator for Linux (optimized for KDE). It is the best disc burn tool, also for Ubuntu.

You can get the ISO dump with these steps:
  1. Insert CD/DVD and select Copy CD...

  2. Select Only create image in the Options tab.

  3. Write the image name in the Image tab.


These steps will just read the CD into the specified ISO image.

From the Command Line


On Linux systems you don't need any additional software for creating an .iso file from your CD or DVD.

# cat /dev/cdrom1 > mydisc.iso # if you know your cdrom device
cat /dev/`ls -l /dev | grep "^b.*cdrom.*" | awk '{print $9}'` > mydisc.iso
# You'll get an Input/output error, just ignore it.

You can use this .iso file in virtual machines or for burning copies.

Problem:

Only the first session of a multi-session disc will be stored. So this solution doesn't work with this kind of discs.

Therefore, you should use AcetoneISO, which can extract multi-sessions discs, and mount any kind of disc images. Read more about this tool in this separate post.

Have a look at this post to see how you can mount such .iso files as regular folder on your system.

VirtualBox

innotek (now SUN)s VirtualBox is a general-purpose full virtualizer for x86 hardware (including Linux and Windows).
There exists an Open Source edition, but it is less powerful.


See my full article about this software, solutions for problems on Ubuntu systems etc.

Ubuntu .:. Sound Preferences


What to do when Ubuntu doesn't seem to work with your laptops sound buttons, nor doesn't seem to store your settings.

The Problem:

So we installed Ubuntu and our headphones or speakers seem to explode when the desktops entering sound is played for the first time.

We change the volume with the sound buttons to a lower value, but when we shutdown the system the next start our speakers explode again.

Read my solution here.

Combined Community Codec Pack


Combined Community Codec Pack is a DirectShow filter pack for Windows systems.

It covers a huge amount of video codecs and filters, and as far as I know the only one that officially is supporting the Matroska format (I like this one especially).

It is also unofficially endorsed by On2, the makers of the VP series of codecs (VP3, VP6, VP7) as a reliable codec pack to use for decoding video.

Also recommended by a large number of anime fansubbing groups, this filter pack is a must to install into a fresh Windows copy.

Avant Window Navigator


Avant Window Navigator is a dock-like navigation bar for the Ubuntu desktop that positions itself at the bottom of the screen.

It can be used to keep track of open windows and behaves like a normal window list.


Have a look here for a video to see it in action and for instructions about its installation.

Thunderbird

Mozillas Thunderbird

Useful extensions:
There are lots of extensions available, but only some should be installed, 'cause a huge amount of extensions installed, will slow down the overall performance.
This is the list of extensions, I really recommend to have:
  • Addressbooks Synchronizer
    Synchronizes selected addressbooks
    • with local files (resp. files on network shares)
    • with files via FTP or WebDAV (http or https)
    • with files stored in an IMAP folder
  • Lightning
    An integrated calendar for Thunderbird.
  • MoreColsForAddressBook
    Adds to the address book more features, like the possibility to edit some properties in multiple contacts with just one action, adds an extra tab with the birthday date, the spouse name etc.
    It can be used in conjunction with ThunderBirthDay (see below).
  • MR Tech Local Install
    The primary goal of this extension is to provide the tools needed to install and manage extensions and themes locally.
    (Note: This extension can be used also in Firefox.)
  • NotTo
    Enables you to avoid sending mail to specific recipients when you use mailing list containing a lot of recipients and you wish to avoid sending the mail to specific individuals.
  • Quote Colors
    Configure text and background colours for different quote levels in mail/news messages.
  • Signature Switch
    Switch the signature on/off or choose a new one from your predefined set.
    Additional features include the support of fortune-cookie-files and automatic switching based on recipients.
  • ThunderBirthDay
    Display birthdays from the Thunderbird address books as events in Lightning.
    Needs the MoreColsForAddressBook extension as well.
  • WebMail
    This extension integrates web site based email accounts (like Hotmail, Yahoo, AOL, ...), which allows Thunderbird to download and to send emails using the web site.
Note: On Ubuntu you shouldn't install any extension directly from your applications menu, but from the .xpi, otherwise Thunderbird can't update them automatically anymore.

Related software:
You might like to use Mail Notification for receiving advises about new mail arrivals in your mail accounts.

Wubi

Wubi is an unofficial Ubuntu installer for Windows users that will bring you into the Linux world with a single click. Wubi allows you to install and uninstall Ubuntu as any other application. If you heard about Linux and Ubuntu, if you wanted to try them but you were afraid, this is for you.



Advantages


  • It does not require you to modify the partitions of your PC, or to use a different bootloader.
  • Just run the installer, no need to burn a CD.
    (Wubi will download the selected ISO that you selected. You can choose between Ubuntu, Kubuntu, Xubuntu, UbuntuStudio. You could later burn the ISO onto a CD if you want.)
  • Wubi keeps most of the files in one folder, and If you do not like, you can simply uninstall it.


On my laptop, I started by using Ubuntu from a LiveCD (very slow on startup and not very handy). Then I installed it on an external USB drive (much faster and very useful as you work directly with partitions).
Having Ubuntu installed into a 10 Gb file in your Windows system is handy if you don't want to carry your external USB drive all the time.
Of course, it is a bit slower than using it from a partition, but if you make sure that the file is defragmented than it is very usable.

Tips & Tricks


Upgrade to Ubuntu 7.10


If you installed Ubuntu 7.04 with Wubi and you want to upgrade to 7.10, don't upgrade the system with Ubuntu's update-manager as it will leave you with an unusable system. Read more about the correct procedure.

Instead, you should use the latest Alpha version of the Wubi installer and make sure that you check your Windows NTFS filesystem to avoid an error during the installation process.
chkdsk /r


Can't find kernel after automatic update


Sometimes the Linux kernel is updated, which includes a change of the grub boot loader.
Unfortunately, this update fails to put the correct path to the new kernel file in the boot loaders menu configuration.

In such a case, when booting into grub you get an error saying that the vmlinuz-2.6.xx-xx-generic can't be found.

We have to edit by hand the file C:\ubuntu\disks\boot\grub\menu.lst file.
Search all entries like
root        (hd0,1)/ubuntu/disks

and change them to
root        (hd0,1)/ubuntu/disks/boot


To do this we have two options:
  1. Launch Windows and edit the file with your favorite text editor.
    Then restart the system and launch the Wubi Ubuntu system.
  2. When booting Wubi, press the Escape key so you can see grub's boot menu.
    • Press 'e' above the first entry.
    • Search the line that reads as mentioned above.
    • Press 'e' again.
    • Add /boot at the end of the line.
    • Press 'Esc' two times, then 'b' which should boot into your Wubi system.
    • Once started you can edit the file with
      gedit /host/ubuntu/disks/boot/grub/menu.lst

Firefox Extensions

Extensions are small add-ons that add new functionality to Firefox, from a simple toolbar button to a completely new feature. They allow you to customize Firefox to fit your own needs and preferences, while letting us keep Firefox itself light and lean. It is important to install only a few extensions, because unfortunately, Firefox gets slower the more you install (on Windows my Firefox needed almost a minute to come up). To make it worse, normally you can find up to three extensions for the same purpose. So here I'll give you a set of extensions I use, because they a useful and work fine:


  • Adblock Plus Get rid of all those ads and banners on the internet that often take longer to download than everything else on the page.


  • Better Gmail 2 is a compilation of Greasemonkey user scripts that add features to Gmail, improving Gmail's overhauled interface graphically and make it more usable. Each feature can be enabled or disabled.


  • Download Statusbar Allows you to keep track of ongoing and completed downloads in a hide-away statusbar.


  • DownloadHelper is for downloading videos and images from many sites with minimum effort. Using DownloadHelper, you can easily save videos from most of the popular video sites. It is also possible to capture all the images from a galery in a single operation. It also gives you access to a big list of video sites where it can be used.


  • DownThemAll! Lets you download all the links or images contained in a webpage and much more: you can refine your downloads by fully customizable criteria to get only what you really want.

  • DragDropUpload lets fill an upload input of a form using the drag and drop service from the system. Just drop the file into the input box and then send it. No more using the Browse button hassle.


  • FireFTP is an integrated FTP client.


  • Foxmarks Bookmark Synchronizer Automatically synchronizes your bookmarks between two or more computers running Firefox. It also lets you access your bookmarks from any computer anytime via my.foxmarks.com.


  • Hyperwords With Hyperwords all the text on the web becomes interactive: Select any word on any page and choose a command.


  • repagination See more search results etc. on one page, concatenating several pages together. Very useful for forums, where you want to see all posts at once.


    This one doesn't work on Ubuntu Hardy yet!


  • ScrapBook [Tips&Tricks about ScrapBook] Helps you to save whole web page trees and manage the collection. You can mark passages of the page, delete content etc. If you used Spiderzilla before, try this one.

  • SpamAvert generates temporary e-mail addresses for all those pesky online registration forms.


  • Tab Mix Plus Enhanced browser tab handling. This is a must-have extension. Tip: Disable Firefox's internal session handling and use the one from this extensions, it's much more powerful.


    This one doesn't work on Ubuntu Hardy yet!

    Have a look at this post for installing a temporary development version, which is compatible already.



  • WebMail Notifier checks multiples of your webmail accounts and notifies the number of unread emails.


    This one is much more powerful than Gmail Notifier, because it not only checks GMail accounts, but also Hotmail, Yahoo and several other ones (you can add your own userscripts to support even more).


Note:On Ubuntu you should never install extensions from Synaptic, aptitude or the main menu, because otherwise Firefox's internal extension handler can't update those extensions any longer.

Last.fm Player

Last.fm Player

Last.fm is a service that keeps track of what music you listen to, and then produces a large number of features personalized to you.

You can use Last.fm to listen to music, find out about artists you may like, other people with similar music taste, gigs in your local area, charts and quilts for your personal site, as well as much more.

Ubuntu Install Instructions


The following commands will add the repositories for Last.FM player, add an authentication key and finally install it.
sudo -i
echo 'deb http://apt.last.fm/ debian stable # Last.FM Player' | tee -a /etc/apt/sources.list
wget -O- http://apt.last.fm/last.fm.repo.gpg | apt-key add -
apt-get update
apt-get install lastfm

More info about these steps can be found here.

As examples, here you can see the webmasters top artists he listened so far or you can listen to similar music of his tastes:









FireFTP


FireFTP is a free, secure, cross-platform FTP client for Mozilla Firefox which provides easy and intuitive access to FTP servers.

Along with transferring your files quickly and efficiently, FireFTP also includes more advanced features such as: directory comparison, syncing directories while navigating, SSL encryption, search/filtering, integrity checks, remote editing, drag & drop, file hashing, and much more!

Similar applications:
Filezilla is a stand-alone FTP client, cross-platform as well.
The Linux version isn't that good as the Windows one, that's why I recommend the Firefox plugin.

KeePass Password Safe

KeePass is a free/open-source password manager or safe which helps you to manage your passwords in a secure way. You can put all your passwords in one database, which is locked with one master key or a key-disk. So you only have to remember one single master password or insert the key-disk to unlock the whole database. The databases are encrypted using the best and most secure encryption algorithms currently known (AES and Twofish).



The database (*.kbd file) can be access from Windows and Linux systems.

Get KeePass

Installation on Ubuntu


The Linux port is named KeePassX and has its own webpage.
Unfortunately, the version that will be installed from the applications main menu isn't the newest, so you should add the following repository to get the latest version:

sudo -i
echo "deb http://ppa.launchpad.net/sniperbeamer/ubuntu/ hardy main #SniperBeamer (KeepassX, ...)" > /etc/apt/sources.list.d/sniperbeamer.list
apt-get update
apt-get install keepassx

Mail Notification


Mail Notification monitors your mailboxes for new mail.

When new mail arrives, Mail Notification alerts you by displaying an icon in the system tray. Moreover, a mail summary can be displayed in the icon tooltip, and notifications containing useful action buttons can be popped up.

Mail Notification can monitor multiple mailboxes concurrently, and supports mbox, MH, Maildir, POP3, IMAP, Gmail, Evolution, Mozilla products (Mozilla, SeaMonkey, Thunderbird, …) and Sylpheed mailboxes.

Install instructions for Ubuntu


sudo -i
apt-get install mail-notification
apt-get install mail-notification-evolution # if you want to use it checking your evolution accounts

streamtuner

streamtuner is a stream directory browser.
Through the use of a plugin system, it offers an intuitive interface to Internet radio directories such as SHOUTcast and Live365.

With streamtuner, you can:
  • Manage your local music collection, with full support for ID3 and Vorbis metadata editing
  • Listen to streams, browse their web page, or record them using programs such as Streamripper
Installation:
streamtuner can be installed directly from the Linux repositories or from the webpage.

Other applications:
vlc (VideoLan-Client) contains also access to a huge directory of online streaming services like streamtuner. You can find it inside the playlist editor. (haven't checked this yet if it is available also on the Windows port of vlc.)

The main difference:
streamtuner doesn't play itself the radio, but uses your preferred multimedia player. For example, I use the default Totem Movie player on Ubuntu.

pidgin

pidgin (formerly known as Gaim) is a multi-protocol Instant Messaging client that allows you to use all of your IM accounts at once.

Install in Ubuntu:
Here you can get instructions about a repository containing pidgin for all Ubuntu versions.

Some notes:

Other applications:

ffmpeg

ffmpeg is a very powerful video coding suite. It is a complete solution to record, convert and stream audio and video. It includes libavcodec, the leading audio/video codec library. ffmpeg is developed under Linux, but it can be compiled under most operating systems, including Windows.

How to enable mp3 support?


Because of license rights, ffmpeg doesn't include encoding support of mp3 by default.
So we have to recompile it or get a non-free version of ffmpeg.

Install from non-free repository


You can find an already compiled version of ffmpeg in the MediBuntu repository.
It contains a ffmpeg compiled with risky option.

Recompile by yourself


In Ubuntu this can be done quite simply.
Just follow these steps in a shell.

  • Install necessary development packs:
    sudo apt-get install quilt libsdl1.2-dev libogg-dev libvorbis-dev liba52-dev
    libdts-dev libimlib2-dev texi2html libraw1394-dev libdc1394-13-dev
    libtheora-dev libgsm1-dev
    liblame-dev libxvidcore-dev libfaac-dev libfaad2-dev libx264-dev

  • Download ffmpeg sources:
    cd /usr/local/src
    sudo apt-get source ffmpeg
    cd ffmpeg

  • The most important step: enable support for mp3, x264, etc:
    export DEB_BUILD_OPTIONS=risky

  • Build installable debian packages
    sudo dpkg-buildpackage
    cd ..

  • Finally, install all generated debian packages:
    sudo dpkg -i ffmpeg_0.cvs20060823-3.1ubuntu4+medibuntu2_x86.deb libavcodec0d_0.cvs20060823-3.1ubuntu4+medibuntu2_x86.deb libavcodec-dev_0.cvs20060823-3.1ubuntu4+medibuntu2_x86.deb ... 

    Essentially, you have to list all generated debian packages here.

    Maybe you could do something like this:
    sudo dpkg -i `ls *.deb`

Test the non-free version


That's it. Now we can test the installation:
 ffmpeg -i some_of_your_movies.avi -ar 44100 test.flv

This should convert one of your AVI movies into a Flash Video.
ffmpeg shouldn't claim any longer about unknown codec for output stream 0.1 (the audio one).