Tuesday, December 20, 2011

How to install razor-qt in Debian Squeeze

According to its developers, Razor-qt is an advanced, easy-to-use, and fast desktop environment based on Qt. It works fine with weak machines, and contains most of the necessary DE components:

Friday, December 16, 2011

A note on \cite completion in vim latexsuite

vim latexuite has a built in \cite completion feature (and a lot more nice stuff). According to its documentation, by pressing F9 inside a \cite{} environment, the list of bibliography items should appear. For me, it did not work because of two reasons.

Thursday, December 15, 2011

How to avoid installing unnecessary packages

A little bit less than a month ago, Jeff Hoogland, the developer of Bodhi Linux, wrote a nice howto about how to avoid installing the unnecessary recommended packages using apt-get.

# apt-get install --no-install-recommends packagename

Tuesday, December 13, 2011

Repeat last action in LibreOffice

"A long time ago in a galaxy far, far away...." I used MS Office. One of the features I liked was repeating the last action by pressing F4. I've missed this one much from LibreOffice (LO). There are many sources of LO shortcuts on the net (see e.g. this, or that), but all of them forget to mention my shortcut of most need (does this sentence make any sence??). Looking around, finally, I found it somewhere. Honestly, I have no clue where (that is why I have this blog). So, meine damen und herren, the shortcut for repeating the last action in LibreOffice is

Ctrl+Shift+Y

;)

Monday, December 12, 2011

How to convert the character encoding of a text file

The role of character encodings is to make life easier. However, sometimes I think it just makes it much miserable. So, a tool for changing the encoding of text files can be really useful. libc-bin package contains a command, iconv,  that does exactly that for us. Its usage is pretty simple. E.g.

$ iconv --from-code=ISO-8859-1 --to-code=UTF-8 iso.txt -o utf.txt

Concatenate pdf files

Well, I know the net is full of information about the concatenation of pdfs, but I never find them when I'm in hurry. So, just as a reminder for myself:

$ gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
-sOutputFile=output.pdf file1.pdf file2.pdf file3.pdf [...] lastfile.pdf


gs is provided by ghostscript package. In order to install it, type in a terminal emulator:

# aptitude install ghostscript

Tuesday, December 6, 2011

Using spell check in vim

Vim is my text editor of choice. It is flexible, efficient, and .... well, I could specify much more features, but honestly, using vim makes you feel geek. And that's enough form me. :)) Yeah, of course Emacs is cool also. :)) Anyway, having spell check in vim (just as in any text editors) is a minimal requirement in 2011. Of course, Vim 7 has built in spell checking. In order to switch it on, add the following lines to your .vimrc file:

Monday, December 5, 2011

How to allow users to administer printers

By default, Debian users are not allowed to administer printers. Only the root can do that. However, it is really easy to give permission for a user to mess up the printer setting. Just add the user to the lpadmin group:

# usermod -aG lpadmin username

Thursday, December 1, 2011

How to get rid of annoying udevd error messages

Using Debian Squeeze, there is a high chance that you have error messages during boot time saying something like: "udevd[...] : SYSFS{}= will be removed in a future udev version, please use ATTR{}= to match the event device...". You can do 2 things:

Saturday, November 26, 2011

Convert end-of-line character from DOS to UNIX

End-of-line (EOL) characters signifies the end of a line of a text (how surprising!). Just to make life more difficult, different operating systems use different EOL marker. In short, some of them use simply a line feed (LF, or '\n' in C/C++), others use carriage return (CR, or '\r' in C/C++) individually, or CR followed by LF. Unix-like systems (Unix, BSD, Linux, Mac OS X) use LF, while Windows (DOS) uses CR+LF. Thus, if you work under Linux and copy a text from a file formatted in Windows and paste it in vim, you will have empty lines after every line endings. It can be annoying. Fortunately, you can change the EOL marker of any text files easily. To do that, you need a package called flip.

Thursday, November 24, 2011

How to install vim-latexsuite in Debian Squeeze

After installing vim-latexsuite, it is not enabled by default. If you want to use it your user, you should enable it by vim add-on manager. Execute the following command in a terminal emulator (e.g. gnome-terminal):

Wednesday, November 23, 2011

How to add Debian Mozilla Team's archive key to apt keyring

The Debian Mozilla Team provides various versions of some Mozilla related packages for use on different Debian systems. Their homepage serves as an excellent basis for adding their repositories to /etc/apt/sources.list, and for installing different versions of Iceweasel (Firefox) and Icedove (Thunderbird). So, I do not repeat it here. However, in order to add their archive key to the apt keyring, one has to install debian-keyring first.