Archive

Archive for March, 2014

building Aegisub on Ubuntu

March 23, 2014 Leave a comment

Problem
You want to install Aegisub from source.

Aegisub is a free, cross-platform open source tool for creating and modifying subtitles. Aegisub makes it quick and easy to time subtitles to audio, and features many powerful tools for styling them, including a built-in real-time video preview.” (source)

Aegisub is a wonderful piece of software. It makes subtitle creation almost trivial :)

Solution
Here I show you how to build Aegisub 3.1.2 on Ubuntu 13.10 (64 bit). I guess it would work with later versions too after some tweaks :)

Note that Aegisub requires wxWindows > 2.8!

Installation steps:

# install dependencies
$ sudo apt-get install build-essential libasound2-dev libass-dev libffms2-dev libfftw3-dev libgl1-mesa-dev libglu1-mesa-dev libgtk2.0-dev libhunspell-dev liblua5.1-dev
$ sudo apt-get install intltool
$ sudo apt-get install libboost-all-dev
$ sudo ldconfig    # not sure if necessary here

$ cd /opt/wxWidgets-X.Y.Z
$ ./configure --with-opengl && make && sudo make install
$ sudo ldconfig

$ cd /opt/aegisub-X.Y.Z/aegisub
$ ./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu
$ make && sudo make install

Aegisub’s “configure” gave me the following warning: “configure: error: Could not link against -lGL !“. I could solve this problem with (1) “install libboost-all-dev“, and (2) add “--with-boost-libdir=/usr/lib/x86_64-linux-gnu” to “configure“.

Links

Update (20130330)
I also wanted to install Aegisub on an older laptop of mine that runs Ubuntu 12.04. To make it work, I had to install older versions: wxWidgets-2.9.4 and aegisub-3.0.1. I tried different combinations but it was a failure. If you want to save some headache, use these versions :)

Advertisements

ménage de printemps (spring cleaning)

March 22, 2014 Leave a comment

Problem
My Dropbox folder was at 98.5%, so it was time to do some cleanup. Which directories are the largest? Which files are the largest?

Solution

alias top10dirs='du -hsx * | sort -rh | head -10'
alias top10files='find . -type f -print0 | du -h --files0-from=- | sort -hr | head -n 10'

The first one shows the top 10 largest directories, while the second one prints the top 10 largest files. Directory and file sizes are shown in a human-readable format.

Samples

$ top10dirs 
60M     20090629-deploy
60M     20090327-deploy
56M     kgm
55M     exist-deploy-v3-20100710
55M     exist-deploy-v3-20100521
...
==============================
$ top10files 
60M     ./20090629-deploy/20090629-deploy.zip
60M     ./20090327-deploy/20090327-deploy.zip
55M     ./exist-deploy-v3-20100710/exist-deploy-v3-20100710.zip
55M     ./exist-deploy-v3-20100521/exist-deploy-v3-20100521.zip
49M     ./exist-deploy-v3-20100409/exist-deploy-v3-20100409.zip
...

Credits

  • top10dirs is from here
  • for top10files I wrote a Python script, but reddit user farsass pointed out that it can be solved easier in the shell

Find the largest subdirectories

March 21, 2014 Leave a comment

Problem
The free space on your HDD is low. Which directories are the largest? What consumes so much space?

Solution
Install “ncdu“, which stands for NCurses Disk Usage.

ncdu (NCurses Disk Usage) is a curses-based version of the well-known ‘du’, and provides a fast way to see what directories are using your disk space.” (source: man)

For a command line solution, check out this post: How Do I Find The Largest Top 10 Files and Directories On a Linux / UNIX / BSD?

Categories: bash Tags: , , , ,