Sunday, May 6, 2012

[FIX] VLC 2.0 Subtitle Autodetection

Since upgrading vlc to version 2.0, when the subtitles are placed on a subdirectory (like ./Subtitles) vlc doesn't autodetect them. I found out that this is a bug and that it'll be fixed on vlc 2.0.2.

In the mean time I created a workaround that consists of a simple shell script that figures out the subtitles path, and then calls the vlc executable with --sub-autodetect-path parameter. Unfortunately, it only works when directly opening a file: vlc2 video_file or opening a video file via file manager. If you try to open a video file on an already running instance (e.g. Ctrl+O) it won't work, but the workaround can be used to open multiple files.

Install

Open a terminal window and run:

wget http://goo.gl/Efwyg -O vlc.desktop
wget http://goo.gl/bF6Mg -O vlc2
chmod +x vlc.desktop && chmod +x vlc2
mv vlc.desktop $HOME/.local/share/applications
mv vlc2 $HOME/bin # or replace $HOME/bin with one directory that's in your $PATH

Usage

Via terminal:
vlc2 file1 [file2...]
Via file manager:
Just select one or more files to open with vlc.

References

Subtitle Autodetection Path Preference not working? - VideoLan Forums

Saturday, May 5, 2012

Install pastie in [X]Ubuntu 12.04 Precise (deb)

Pastie is a clipboard manager program. In Oneiric it could be installed by adding a 3rd partie ppa, however at the moment there isn't a Precise build. I tried to manually install the deb package for Oneiric on Precise and it worked.

Install

First install the python-gnome2 dependency:

sudo apt-get install python-gnome2 python-keybinder

Then navigate to http://goo.gl/UtNPI and download the deb file (something like pastie_0.6.7.5~ppam1_all.deb).

Finally install the deb file, either by opening it with "Ubuntu Software Center" or using a terminal window:

sudo dpkg -i pastie*.deb

Friday, May 4, 2012

Install OpenJDK 7 in [X]ubuntu 12.04/12.10

OpenJDK is the official Ubuntu supported solution for running and compiling Java programs. In this solution separated packages are provided for each need.

Install

Open a terminal window and run:

sudo apt-get install openjdk-7-jre # to be able to run
sudo apt-get install openjdk-7-jdk # to be able to compile
sudo apt-get install icedtea-7-plugin # to be able to run applets on browser

References

Ubuntu package information

Install Oracle Java 7 in [X]Ubuntu 12.04 Precise via PPA

Oracle Java is the alternative to OpenJDK package, but is not longer available in Ubuntu repositories (due to some change in Java License). Oracle Java remains my choice because I find it to work better with some applications (specially java web applets).

If you want to give OpenJDK a try, view here instructions to install it.

“WebUpd8” team provides a PPA with one package that automatically downloads and installs Oracle Java JDK/JRE/Plugin 7 from its official website and installs it on your computer.

Install

Open a terminal window and run:

sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java7-installer

References

Web Upd8

Thursday, May 3, 2012

Install HandBrake in [X]Ubuntu 12.04 (deb)

As I mentioned on the previous post, HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder, and it can be installed in Xubuntu 11.10 via ppa. However packages for Precise are yet to be released. Luckily, if you manually download the deb files you'll be able to install them correctly.

Install

First, open http://goo.gl/zIohH in your web browser and download the version you're interested in (handbrake-gtk is the version with graphical interface and handbrake-cli is the version for command line interface), also make sure you download the correct version (i386 or amd64) for your Xubuntu installation (type uname -m on terminal, if you're unsure).

Once downloaded, click the deb files to open and installed them via "Ubuntu Software Center" or open a terminal window and run:

sudo dpkg -i handbrake-*.deb

References

official HandBrake releases for Ubuntu

Install HandBrake in [X]Ubuntu 11.10 (ppa)

HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder.

Personally I use it to transcode some videos so that I can see them on my Android smartphone. It has already some presets with enconding settings specific for iPhone, iPad and Android.

It includes one with a graphical interface and one with command line interface. I find them both very useful. For instance, even though we can create a queue of jobs with the graphical interface I use the version with the command line interface when I want to automate some other things with a shell script.

Install

Open a terminal window and run:

sudo add-apt-repository ppa:stebbins/handbrake-releases -y && sudo apt-get update

If you only want to install the version with graphical interface, type:

sudo apt-get install handbrake-gtk

If you want to install the version with command line interface, type:

sudo apt-get install handbrake-cli

If you want to install both versions, type:

sudo apt-get install handbrake-*

References

official HandBrake releases for Ubuntu

Wednesday, May 2, 2012

[FIX] Multimedia keys, Clementine and Xubuntu 12.04

Clementine is my preference for listening and manage my music collection, and one thing that I like about clementine is that it integrates well with my Xubuntu desktop. However the version in the precise repository (1.0.1+dfsg-1ubuntu2) doesn't work with keyboard multimedia keys.

I've tried the development version (1.0.1-362-gd34c6e6~precise) and the problem is fixed.

Install

Open a terminal window and run:

sudo add-apt-repository ppa:me-davidsansome/clementine-dev -y && sudo apt-get update && sudo apt-get install clementine -y

References

Clementine Development ppa