Wednesday, December 26, 2012

How to Put a Password on a PDF File on Linux

First you need to have installed the "pdftk" application.


Then type this command into the terminal:
pdftk  original.pdf  output  new.pdf  user_pw  PROMPT

Replace "Original.pdf" with the original name and change "new.pdf" to a name of your choice. Enter a password when prompted. You will now have a password protected PDF.


Saturday, November 17, 2012

How to play movies with subtitles in mplayer

The basic command is:
$ mplayer name_of_movie.avi -vobsub name_of_subtitle 

As you can note, the name of the subtitle is written without any extension which usually are '.idx', '.ifo' or '.sub'.
The next command will do exactly the same than the first:
$ mplayer name_of_movie.avi -vobsub name_of_subtitle -vobsubid 0

If there is a second language available in the captions then you do:
$ mplayer name_of_movie.avi -vobsub name_of_subtitle -vobsubid 1

The name of the subtitles has to be exactly the same than the name of the movie.