Archive for Tutorials

Script to capture a screenshot (with Chromium) (Command-line)

Introduction

I wanted to take screenshots of about 15 Websites, but didn't want to install any plugins as I wouldn't use them often. I saw a lot of how-to's using import from Imagemagick but they capture the whole screen, not clearly what I was looking for.

Using chromium, xwininfo (from X) and import, I made this bash script which captures only the webpage. See below for the Source code.

How it works

Upon calling chromium-capture:

  • it finds every running chromium browser using xwininfo,
  • gets the window's id of each browser's currently opened tab (because hidden tabs cannot be accessed using xwininfo/import)
  • takes a screenshot of each webpages using import and the windows' ids.
  • saves the screenshot in the current directy as chromium-WINDOWID.png (with WINDOWID = id of the respective window)

You get a screenshot of only the website. All of the arguments and options given to chromium-capture will be used as arguments and options when calling import.

Read the rest of this entry »

© 2010, Arnaud Soyez. Texts and illustrations found in this post are under the preceding copyright, unless specified otherwise.

by-sa
――

How to move F-spot pictures folder to another folder (version 0.6.1.5 or higher)

After my second hard disk started failing, I really thought about moving my +11000 pictures to my young main hard disk, BUT, also keep all my favorites, tags, comments in F-spot.

F-Spot

F-Spot

So here's how I did it:
Read the rest of this entry »

© 2009, Arnaud Soyez. Texts and illustrations found in this post are under the preceding copyright, unless specified otherwise.

by-sa
――

Easy Apache log statistics using Visitors

There are many Apache log analyzers that you can now choose from, but it can be long or confusing to install most of them. I wanted to try and find a simple log analyzer that just does its work using cronjobs. Visitors seems to fit the needs!
We'll also use ip2host to resolve the IP addresses into domain names.
All of this will be run daily by a cronjob.

Screenshot of a report generated by Visitors
Screenshot of a report generated by Visitors

Read the rest of this entry »

© 2009, Arnaud Soyez. Texts and illustrations found in this post are under the preceding copyright, unless specified otherwise.

by-sa
――

Differences between grep, fgrep, egrep...

Grep is a very useful tool in the Unix world. If you don't know it already, it is very much like a search tool. It can search for a text or pattern in one or multiple input files or data coming from (unix) pipes.

Most of the Linux distributions out there offer three ways to use Grep from the command-line (aka terminal): grep, fgrep, and egrep.
Read the rest of this entry »

© 2009, Arnaud Soyez. Texts and illustrations found in this post are under the preceding copyright, unless specified otherwise.

by-sa
――

How To use MySQL Administrator & Query Browser through SSH tunnel

I try to keep my VPS (Virtual Private Server) as light as possible. That's also why I don't have PHPMyAdmin installed and wouldn't want to install it. The only way of accessing MySQL and executing commands is through the mysql CLI (Command Line Interface), but I don't always remember the exact queries to create a user, database or to grant privileges.

I recently decided to look for some GUI (Graphical User Interface) tools to tweak and administrate a MySQL server. I found the quite well-known MySQL Administrator (and Query Browser).

MySQL Administrator

MySQL Administrator

The problem is that by default (and for obvious security reasons), my MySQL server is not accessible from the internet (only accessible by localhost itself). This is where SSH tunnels enter the action!
Read the rest of this entry »

© 2009, Arnaud Soyez. Texts and illustrations found in this post are under the preceding copyright, unless specified otherwise.

by-sa
――

memory saving: Switching to Claws-Mail (with Gmail)

Evolution is a complete solution for mail, calendar, tasks, contact lists, but it uses a lot of resources, and I'm not using all of those features.
Last week I was looking at multiple mail clients (aka mail user agents). I was really interested in Claws-Mail, a fork of Sylpheed. It is very lightweight, and has a bunch of features, not as much as evolution, but it can compete pretty well.
Memory-wise, I switched from 30mb used by Evolution to ~14mb (maximum, but usually ~10mb) used by Claws-mail.

claws-mail

The only problem I was facing is setting it up with Gmail. Here's how I figured it out after a couple days.
Read the rest of this entry »

© 2009, Arnaud Soyez. Texts and illustrations found in this post are under the preceding copyright, unless specified otherwise.

by-sa
――

[Jaunty] Getting the Sound working on the HP Mini 1000 (or 1120NR)

Note that in Karmic Koala 9.10, the sound is working by default!

I had problems having any sound working on jaunty pre-releases (beta and release candidates). I have a HP Mini 1000 1120NR. This workaround should also work for other models.

This is related to this bug report. There is no official fixes yet.

Here's my workaround:

Read the rest of this entry »

© 2009, Arnaud Soyez. Texts and illustrations found in this post are under the preceding copyright, unless specified otherwise.

by-sa
――

Jaunty lpia Installation for HP Mini 1000 SSD

This workaround was used because of a bug which has been FIXED (#355376 and #354226).

DO NOT USE THIS POST unless you know what you are doing.

To install a CLI system on my hp mini 1000, I used the MID Live lpia iso, and when it gets into the graphical interface, I pushed ctrl+alt+f2 to switch to another TTY. And then I installed using cdebootstrap. This is quite an expert installation and it is very long and hard to do.

Read the rest of this entry »

© 2009, Arnaud Soyez. Texts and illustrations found in this post are under the preceding copyright, unless specified otherwise.

by-sa
――