pump it from pumpa

pump.io is an API rich stream server by E14N, it has the features that you expect from a social network.

If you’re not already on the pump.io network, you might want to sign up & give it a shot.

pumpa

pumpa is a pump.io client which you can use to post/share/like stuff on the pump.io network, among other things.

The news is pumpa is now compatible with gNewSense!

setting up pumpa

First, install git if it is not already installed:

# aptitude install git git-doc

Next, install packages needed to build pumpa:

# aptitude install qt4-qmake libqt4-dev libqjson-dev libaspell-dev

Get a local copy of pumpa:

$ git clone git://gitorious.org/pumpa/pumpa.git

Build pumpa:

$ cd pumpa
$ qmake-qt4
$ make

Run it:

$ ./pumpa

Just follow the on-screen instructions to configure pumpa.

Happy pumping!


[ CC0: No Rights Reserved ]

Create wall calendars with PCAL

PCAL is a console application that allows you to generate wall calendars or organizers in PostScript and HTML formats. PostScript files can be viewed in any PDF reader. HTML files can be viewed in any Web browser. PCAL also allows you to print events in the calendar by defining the events in a flexible configuration file. Resulting calendars are ready for printing.

This article will show you how to:

  • Generate a one-page calendar.
  • Generate a multi-page calendar (a month per page).
  • Generate a multi-page calendar with events.

You can download a ready to use 2014 wall calendar if you don’t have the time to generate it by yourself.

Installing PCAL

Open a terminal by going to Applications → Accesories → Root Terminal and run the following command:

# apt-get install pcal

You can close the Root Terminal after installation, we will use a regular Terminal in the following sections.

Generate a one-page calendar

One-page 2014 calendar

One-page 2014 calendar

Open a terminal by going to Applications → Accesories → Terminal and run the following command:

$ pcal -w -o calendar.ps 2014

The command above means:

  • pcal: the name of the application.
  • -w: indicates that all the months of the year will appear in the same page.
  • -o calendar.ps: indicates the name of the generated file (.ps is the extension used for PostScript files).
  • 2014: indicates the year of the calendar. If you ommit it, pcal will print the calendar of the current year.

Download the resulting file.

Generate a multi-page calendar

First page of a multi-page calendar, January 2014

First page of a multi-page calendar, January 2014

Open a Terminal and run the following command:

$ pcal -P letter -l -o calendar.ps 1 2014 12

Where:

  • -P letter: indicates that the size of the generated document is “letter”.
  • -l: indicates that the document will have “landscape” orientation.
  • 1: indicates the first month in the resulting calendar (January, in this case).
  • 12: indicates that the calendar will have twelve months, starting from the month indicated above. In this case, all months of the year will be printed.

Download the resulting file.

Generate a multi-page calendar with events

July 2014 with daily events

July 2014 with daily events

PCAL can read “date files” or “configuration files” where you can specify the calendar formatting and events that will occur during the year. Configuration files are plain text files.

PCAL comes with a sample configuration file that can be found in the file system in /usr/share/doc/pcal/examples/pcal-cfg.txt.gz. But see the following example to make yourself an idea of how these files work.

Suppose you want to generate a 2014 workout calendar for your friend and it should have the following characteristics:

  • Printable in letter format with landscape orientation.
  • The text displays in Spanish.
  • Every day there will be an event: cardio workout.
  • Mondays, Wednesdays and Fridays, another event: strenght workout.
  • January 31st: a date with a dietitian.

To generate a calendar with the characteristics specified above, write the following configuration file and save it with any name you prefer (you can use Applications → Accesories → gedit Text Editor for this).

NOTE: When saving a configuration file that contains non-Latin characters, select “Western (ISO-8859-15)” in the “Character Encoding” field that appears in the “Save as…” dialog of the text editor you’re using. This way, calendars generated in languages different to English will display correctly. Using this encoding is necessary because PCAL doesn’t have support for UTF-8 yet, unlike most modern software (see “PCAL Shortcommings” in PCAL’s website).

gedit's Save as... dialog

gedit’s Save as… dialog

# ---------------------------------------------------------------------------
# Workout Calendar
# ---------------------------------------------------------------------------

#
# FORMATTING OPTIONS
#

# Paper size
opt -P letter

# Paper orientation
opt -l

# Text language
opt -a es

# First day of the week
opt -F Monday

# Font type
opt -d Times-Roman/18 -t Times-Roman/30 -n Times-Roman/10

#
# EVENTS
#

# Cardio routine
all days       in all    Cardio

# Strength routine
all Mondays    in all    Fuerza
all Wednesdays in all    Fuerza
all Fridays    in all    Fuerza

# Dates
Jan 31 Dietista

Now run the following command in a Terminal replacing the text in capitals with the name you gave to your configuration file and the name you want for the resulting calendar:

$ pcal -f CONFIGURATION_FILE_NAME -o CALENDAR.ps 1 2014 12

Download the resulting file.

Remember that you can learn more about PCAL by reading its manual (you can close the manual pressing the Q key):

$ man pcal

If you know an easier, more flexible way to generate calendars, please let us know!


CC0

Solarize your GNOME Terminal

Solarized dark & light themes

Solarized dark & light themes

Solarize is a colorscheme by Ethan Schoonover which is good on the eyes and allows you to spend long hours before the terminal without much strain.

Solarize your GNOME Terminal:

Install git vcs, if it is not already installed:

# aptitude install git

Then do:

$ git clone git://github.com/sigurdga/gnome-terminal-colors-solarized.git
$ cd gnome-terminal-colors-solarized
$ ./solarize

Now, go to GNOME Terminal & change the Profile to Solarized.

To toggle between dark & light Solarized themes run the ./solarize command.

To Solarize other terminals (konsole, xfce terminal) or you favorite editors look here & here.

Happy Hacking!

Author: rsiddharth

Web site attacked

You may have noticed that our website was down for a while last weekend. That’s because it was under attack. In fact, it has been under attack a lot longer than that. Only now it was bad enough to make the website inaccessible. Luckily, I was still able to log in with SSH. top confirmed the heavy load with load averages of above 40 and Apache using the most resources. Some investigation of Apache’s logs showed a lot of attempts to create a new account and to log in:

117.26.249.115 - - [05/Jan/2014:06:25:41 -0500] "GET /PmwikiVsMoin?action=newaccount HTTP/1.1" 200 3051 "http://gnewsense.org/PmwikiVsMoin?action=login" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36" 
23.90.28.237 - - [05/Jan/2014:06:25:41 -0500] "GET /PmwikiVsMoin?action=login HTTP/1.0" 200 2915 "http://gnewsense.org/PmwikiVsMoin" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36" 
192.227.240.168 - - [05/Jan/2014:06:25:41 -0500] "GET /Main/Deltah HTTP/1.0" 200 3690 "http://www.gnewsense.org/Main/Deltah?action=login" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36" 
222.77.200.70 - - [05/Jan/2014:06:25:41 -0500] "GET /PmwikiVsMoin HTTP/1.1" 200 4253 "http://gnewsense.org/" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36" 
81.52.143.30 - - [05/Jan/2014:06:25:41 -0500] "GET /matkinson HTTP/1.1" 200 3063 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1) VoilaBot BETA 1.2 (support.voilabot@orange-ftgroup.com)" 
117.26.249.115 - - [05/Jan/2014:06:25:46 -0500] "GET /PmwikiVsMoin HTTP/1.1" 200 4253 "http://gnewsense.org/PmwikiVsMoin?action=login" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36" 
23.90.28.237 - - [05/Jan/2014:06:25:46 -0500] "GET /PmwikiVsMoin?action=newaccount HTTP/1.0" 200 3068 "http://gnewsense.org/PmwikiVsMoin?action=login" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36" 
192.227.240.168 - - [05/Jan/2014:06:25:46 -0500] "GET /Main/Deltah?action=login HTTP/1.0" 200 2919 "http://www.gnewsense.org/Main/Deltah" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36" 
91.236.74.103 - - [05/Jan/2014:06:25:46 -0500] "GET /Main/No-Fuss_pc_games_Solutions_-_An_Update?action=login HTTP/1.1" 200 2958 "http://www.gnewsense.org/Main/No-Fuss_pc_games_Solutions_-_An_Update" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36" 
222.77.200.70 - - [05/Jan/2014:06:25:46 -0500] "GET /PmwikiVsMoin?action=login HTTP/1.1" 200 2915 "http://gnewsense.org/PmwikiVsMoin" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36" 
117.26.249.115 - - [05/Jan/2014:06:25:46 -0500] "GET /PmwikiVsMoin?action=login HTTP/1.1" 200 2915 "http://gnewsense.org/PmwikiVsMoin" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36" 
91.236.74.103 - - [05/Jan/2014:06:25:47 -0500] "GET /Main/No-Fuss_pc_games_Solutions_-_An_Update?action=newaccount HTTP/1.1" 200 3110 "http://www.gnewsense.org/Main/No-Fuss_pc_games_Solutions_-_An_Update?action=login" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36"

I wrote a little awk script to count the unique IP addresses in the access log of the past 6 days:

{print $1; ipcount[$1]++; print ipcount[$1];} 
END {for (ip in ipcount) { 
        print ip, ipcount[ip] 
    }}

More than 50000 requests came from a single IP address, dozens of other IP addresses made between 1000 and 10000 requests. Also note the spammy page name in the last entry of the excerpt above. This smells an awful lot like a spammer’s botnet is trying to abuse our wiki for its nefarious purposes.

We’d already taken some measures in the form of textcha’s and a self-organizing access control group. This was enough to stop actual spam on the wiki. The access control group alone would have been enough to stop edits, but the textcha also needs to be filled in when you create a new account on the wiki. We left it in place as a barrier for the spammer to create new accounts. I doubt that the 114 new accounts that were created in the past 2 months are all legitimate, so that slowed it down at best. Unused accounts aren’t too bothersome, so we left it at that.

Now it seems that our spammer has grown tired of being slowed down and has picked up the pace. Apache and MoinMoin were working so hard to process all these new account and login requests that regular users could hardly get through. The spammer still didn’t manage to edit the wiki and the number of accounts didn’t explode, but we’d rather stop all this unwanted traffic at the front door. My predecessor, Karl Goetz, had already installed and configured Fail2ban in an earlier attempt to combat wiki spam.

Fail2ban is a tool that checks log files for suspicious behavior and blocks the offender for a while. I figured that a normal user would not need to create a new account more than twice within a few minutes. So I told Fail2ban to look out for these requests by putting an appropriate regular expression in filter file /etc/fail2ban/filter.d/moinmoin-login.local:

[Definition] 
failregex = ^<HOST> - -.*GET.*action=newaccount HTTP.*$ 
ignoreregex =

An accompanying section in /etc/fail2ban/jail.local tells it to look in Apache’s logs and email some details about the spammer:

[moinmoin-newaccount] 
enabled = true 
filter = moinmoin-newaccount 
logpath = /var/log/apache2/org.gnewsense.access.log 
findtime = 600 
maxretry = 2 
port = http,https 
action = %(action_mwl)s

A few minutes after restarting Fail2ban I could see from “iptables -n -L fail2ban-moinmoin-newaccount” that the firewall rules were trickling in. I made a similar filter and jail for “action=login”. Now the firewall is steadily blocking around 45 IP addresses for each of the filters and the load averages on the server are back to single digits before the decimal character. There should be no problem for regular users to create a new account or log in. Tor users could be affected, but that means that more people should run an exit node.

Author: Sam Geeraerts, gNewSense Project Leader.


CC0

Web site problems

The website is experiencing some heavy load. It looks like it’s under attack. We’re doing our best to block the culprits.

Sam Geeraerts, gNewSense Project leader

Recently, the Web site has been experiencing an abnormal amount of requests from the same IP address, which is causing the service to be very slow. They seem particularly interested in creating new accounts automatically, probably to fill the Web site with spam.

We will keep you updated on the issue.


CC0

The Web site in Malayalam

Windows user

Translation Widget

Yesterday, the Web site theme was updated to use Galaxia 1.5, which includes support for the Malayalam language and localized titles in pages. This means that now users can select Malayam in the Translation Widget to browse the Web site in that language and that page titles can be displayed in a more human friendly way in the browser’s title bar — instead of a title like Main/HowToHelp, now we can change it to just How to help or es/Main/HowToHelp to Cómo ayudar. The support for localized titles may also benefit gNewSense ranking in Web search engines.

To use the Web site in Malayalam:

  1. Go to gnewsense.org (or any other page in the Web site).
  2. Move your cursor over the Translation Widget located on the top right of the page (or focus using the Tab key).
  3. Select മലയാളം.

You should see the main navigation options of the Web site and the page itself update to Malayalam. Some pages may not be translated yet, but Malayalam contributors are working on it.

Another language to the list which now includes partial translations in Brazilian Portuguese, French, German, Italian, Spanish and Taiwanese Mandarin.

If you would like to help translate the Web site into other languages or help improve existing translations, please join us.

Thanks to all the translators!


CC0

Launching the Community Blogs

Today we are launching the first two blogs of a network of community blogs about gNewSense GNU/Linux. The first two blogs are The gNewSense Blog, which you are reading right now, and El Blog de gNewSense, in English and Spanish respectively. The community blogs are meant to spread the word about gNewSense to different cultures around the world and provide gNewSense users with news, how-tos, tips & tricks about gNewSense and the applications available for it.

If you visit The gNewSense Blog and El Blog de gNewSense, you will notice that both have similar names, use WordPress as a blogging platform and share the same theme and structure. This is to make it easier for the readers to notice that these blogs are part of the gNewSense community and share the same goals. Each blog is autonomous, though, and its maintainers can publish their own content or translate articles from other blogs in the network.

If you want to contribute to The gNewSense Blog or El Blog de gNewSense, check each blog for instructions on how to do so.

If you want to start a community blog in your language, just do it. The only requirements for a community blog are:

Once you publish the blog, announce it to the gnewsense-users mailing list, so that all other community blogs can link to yours.

Hopefully we will have community blogs in many languages soon.


CC0