Tag Archives: shell

irssi: remotely attach/create a screen in one line

If you’re a big fan of irssi and you’re running it on a remote server over SSH and inside a screen, then I have a nice tip to share with you.

irssi logo

Just put the following line inside your .zshrc or .bashrc file:

alias rirssi='ssh user@your.server.com -t screen -dRUS irssi irssi'

This simple alias will allow you to:

  • Connect to your remote SSH server
  • Attach to your existing irssi screen named “irssi”
  • If the screen doesn’t already exist:
    • create a new screen
    • start irssi inside it
    • attach the newly created session

Pretty cool isn’t it? ;-)

Create an ebook using images on GNU/Linux

Today, my girlfriend had to create an Ebook (in pdf) using some images acquired from a scanner (using xsane). After searching a while on google how to do that I remembered that ImageMagick was the tool to manipulate images, so I gave it a try. Luckily (for me) it worked!

After this brief introduction, it’s time to share the two-steps solution with you.

Acquire the documents

The first step is to scan all of your documents using xsane. For a good quality use a DPI of 200 or more. You should name them accordingly to the order of inclusion. For example: 0001.png, 0002.png, …

Create the PDF

Now in a console, use this simple command to generate the ebook.

convert -define pdf:use-trimbox=true -compress jpeg -quality 95% *.png ebook.pdf

Remember that it can take some time if you have many pages.

That’s all folks !