Proprietary software woes

I am attending the EGEE User Forum congress I have mentioned before, and we just had a talk delayed 5 minutes because of some stupid software problem.

The speaker had his talk in [[PDF]] format, really standard and portable. The organizers provided him with a Windows machine, with Acrobat Pro installed (apparently). He tried to open the file with it, but it turns out the license for Acrobat had expired, so the computer refused to open the file. How horribly full of shit is that? There are thousands of free (and/or freeware) programs out there to read PDFs, so why was the poor speaker forced to use another computer just for the task? This would have never happened, obviously, had the organizers been using free software.

Comments

Miniblogging from Catania

Right now I’m in the 4th EGEE User Forum/OGF25 conference being held in Catania, Sicily.

I have some random thought to write down, and my lately little-attended blog seems the right place to do so.

Random thought of the moment: everyone, I mean every boy and girl and their pets, has a laptop. Everyone listens to talks with a laptop in their knees. Also, an amazing fraction of these (from 1 in 4 to 1 in 3, maybe) are Macs. The Linux machines are also relatively abundant, although a sad majority of laptops seems to run Windows.

Might this mean that techies favor Apple? Maybe it just means that geeks can also be posh, as shown by the equally high amount of iPhones I’ve seen around.

Comments

Save HD space by using compressed files directly

Maybe the constant increases in hard disk capacity provide us with more space we can waste with our files, but there is always a situation in which we would like to squeeze as much data in as little space as possible. Besides, it is always a good practice to keep disk usage as low as possible, just for tidiness.

The first and most important advice for saving space: for $GOD’s sake, delete the stuff you don’t need!

Now, assuming you want to keep all you presently have, the second tool is [[data compression]]. Linux users have long time friends in the [[gzip]] and [[bzip2]] commands. One would use the former for fast (and reasonably good) compression, and the latter for when saving space is really vital (although bzip2 is really slow). A more recent entry in the “perfect compression tool” contest would be [[Lempel-Ziv-Markov chain algorithm]] (LZMA). This one can compress even more than bzip2, being usually faster (although never as fast as gzip).

One problem with compression is that it is a good way of storing files, but they usually have to be uncompressed to modify, and then re-compressed, and this is very slow. However, we have some tools to interact with the compressed files directly (internally decompressing “on the fly” only the part that we need to edit). I would like to just mention them here:

Shell commands

We can use zcat, zgrep and zdiff as replacements for cat, grep and diff, but for gzipped files. These account for a huge fraction of all the interaction I do with text files from the command line. If you are like me, they can save you tons of time.

Vim

[[Vim (text editor)|Vim]] can be instructed to open some files making use of some decompression tool, to show the contents of the file and work on them transparently. Once we :wq out of the file, we will get the original compressed file. The speed to do this cycle is incredibly fast: almost as fast as opening the uncompressed file, and nowhere near as slow as gunzipping, viming and gzipping sequentially.

You can add the following to your .vimrc config file for the above:

" Only do this part when compiled with support for autocommands.
if has("autocmd")

 augroup gzip
  " Remove all gzip autocommands
  au!

  " Enable editing of gzipped files
  " set binary mode before reading the file
  autocmd BufReadPre,FileReadPre	*.gz,*.bz2,*.lz set bin

  autocmd BufReadPost,FileReadPost	*.gz call GZIP_read("gunzip")
  autocmd BufReadPost,FileReadPost	*.bz2 call GZIP_read("bunzip2")
  autocmd BufReadPost,FileReadPost	*.lz call GZIP_read("unlzma -S .lz")

  autocmd BufWritePost,FileWritePost	*.gz call GZIP_write("gzip")
  autocmd BufWritePost,FileWritePost	*.bz2 call GZIP_write("bzip2")
  autocmd BufWritePost,FileWritePost	*.lz call GZIP_write("lzma -S .lz")

  autocmd FileAppendPre			*.gz call GZIP_appre("gunzip")
  autocmd FileAppendPre			*.bz2 call GZIP_appre("bunzip2")
  autocmd FileAppendPre			*.lz call GZIP_appre("unlzma -S .lz")

  autocmd FileAppendPost		*.gz call GZIP_write("gzip")
  autocmd FileAppendPost		*.bz2 call GZIP_write("bzip2")
  autocmd FileAppendPost		*.lz call GZIP_write("lzma -S .lz")

  " After reading compressed file: Uncompress text in buffer with "cmd"
  fun! GZIP_read(cmd)
    let ch_save = &ch
    set ch=2
    execute "'[,']!" . a:cmd
    set nobin
    let &ch = ch_save
    execute ":doautocmd BufReadPost " . expand("%:r")
  endfun

  " After writing compressed file: Compress written file with "cmd"
  fun! GZIP_write(cmd)
    if rename(expand(""), expand(":r")) == 0
      execute "!" . a:cmd . " :r"
    endif
  endfun

  " Before appending to compressed file: Uncompress file with "cmd"
  fun! GZIP_appre(cmd)
    execute "!" . a:cmd . " "
    call rename(expand(":r"), expand(""))
  endfun

 augroup END
endif " has("autocmd")

I first found the above in my (default) .vimrc file, allowing gzipped and bzipped files to be edited. I added the “support” for LZMAed files quite trivially, as can be seen in the lines containign “lz” in the code above (I use .lz as termination for LZMAed files, instead of the default .lzma. See man lzma for more info).

Non-plaintext files

Other files that I have been able to successfully use in compressed form are [[PostScript]] and [[Portable Document Format|PDF]]. Granted, PDFs are already quite compact, but sometimes gzipping them saves space. In general, PS and EPS files save a lot of space by gzipping.

As far as I have tried, the [[Evince]] document viewer can read gzipped PS, EPS and PDF files with no problem (probably [[Device_independent_file_format|DVI]] files as well).

Comments (3)

First impressions on a Neo FreeRunner

Yes, as the title implies, I am the fortunate owner of a [[Neo FreeRunner]]. For those not on the know, the NFR is a kind of mobile phone/[[Personal digital assistant|PDA]] running [[free software]], and aimed at being open, both from software and hardware perspective.

I bought it last week, and I already have things that I love, and others that I don’t love that much. First thing that sucks: my 128kB [[Movistar]] [[Subscriber Identity Module|SIM card]] is not supported, so I can’t use the NFR to make calls! Apparently older versions of the SIM card are supported, so I will try to get hold of one (by the way, the [[simyo]] card I posted about some time ago works perfectly).

Another thing that is not so good is the stability of the software. However, I expected that, and I have no problem with it. Being open source, the software will evolve day by day, and I will love to see the evolution.

On the bright side: it is really great to be able to install different [[Linux distribution|distros]] in your phone! I tried OpenMoko, FDOM, QtExtended (formerly Qtopia) and SHR, and all of them have good and bad things. It is like going back to when I tried different distros for my computers (now I mostly stick to [[Ubuntu]] or [[Debian]]). By the way, you can install Debian in the NFR (haven’t tried it yet, because you have to install it in the [[Secure Digital card|microSD card]], not in the main memory (it’s too big for it). You can even try Google’s [[Android (operating system)|Android]], if you so wish.

But the really nice thing about it is that you can create your own apps for it. You can install [[Perl]] or [[Python (programming language)|Python]] interpreters, and then use the [[Command-line interface]] (yes, it does have command line) to run scripts. Or create icons on the desktop and link them to an action. For example, I created an icon that switches from portrait to landscape orientation when pressing it, and then back when pressing it again. I created another icon that launches mplayer when pressed, so I can watch a video in it by just pressing the icon.

I expect to blog more about the gadget, so stay tuned.

Comments (4)

Fnac selling (almost) only Windows netbooks?

It seems that the [[Fnac]] (at least the Spanish section) has been remodelling its web recently, which caused some downtime last week, and a really slow experience right now (their webmaster must lack the experience to realize that great changes should be made first in test computers, then moved to production ones. Or maybe they lack the resources to buy a spare server…).

Anyway, I’m visiting the place to check the prices of [[netbook|netbooks]], more precisely an [[ASUS_Eee_PC#Eee_901|ASUS Eee 901]], and, to my surprise, the [[Linux]] models are gone! I have previously seen both [[cruft|Windows XP]] and Linux-based netbooks in Fnac, but now only the former seem to survive. I suspect that the XP netbooks are always over-represented in stores, that is, they have many more XP units than Linux ones, even though they are sold on par. Or even more Linux units are sold.

However, this plain and simple oblivion of any Linux offer is outrageous, and can only point to nasty activity by Microsoft, who moves the necessary strings (money when possible, threats when necessary) to secure a niche (that of netbooks), that is one of the biggest market entry points for Linux, and thus the greatest menace to MS’s monopoly.

Right nowk, the Fnac Spain “Ultra Mobile” page (can not make a direct link because URLs inside the Fnac site are a thing to fear and hate), shows only one Acer Aspire One with Linux. All other netbooks, including all other Acer Aspire One models, and all Eee PCs, are exclusively Windows machines.

Update: The Linux Eee PCs seem to be back. Maybe it was just an error? Probably I’m just too paranoid :^)

Comments

LWD – December

I will start making this section bimonthly, otherwise the only content of my blog will consist on it. Besides, the new information generation rate is not enough to require more often updates.

You can read an intro for my Linux World Domination project in this May 2008 post.

As usual D2D means “days to domination” (the expected time for Windows/Linux shares to cross, counting from the present date), and DD2D means difference (increase/decrease) in D2D, with respect to last report. CLP means “current Linux Percent”, as given by last logged data, and DD means domination day (in YYYY-MM-DD format).

Project D2D DD2D DD CLP Confidence %
Einstein 250.8 -631.3 2009-08-09 37.48 (+2.31) 9.5
MalariaControl 7172.8 +282.8 2028-07-22 12.45 (+0.19) 0.8
POEM 5020.4 +1406.5 2022-08-31 10.05 (+0.26) 1.1
QMC >10k 7.91 (+0.03)
Rosetta >10k 7.99 (+0.08)
SETI >10k 7.88 (+0.02)
Spinhenge >10k 3.35 (+0.14)

As promised, today I’m showing the plots for MalariaControl. In next issue: POEM@home.

Number of hosts percent evolution for MalariaControl (click to enlarge)

Accumulated credit percent evolution for MalariaControl (click to enlarge)

Comments

Hibernating my MacBook under Ubuntu Intrepid Ibex

No matter what they say, [[Hibernate (OS feature)|hibernating]] Linux laptops has always been a problem. I managed to get my MacBook to [[sleep mode|suspend]] to RAM quite reliably without much of a hassle. It suspends when I close the lid, and it resumes when I open the lid back. I even configured it to suspend when battery is critically low. This way, and due to the really low power consumption while suspended, I can safely forget my laptop on and unplugged for extended periods of time, and the worst that can happen is that I will have to resume it. A huge difference from the nasty surprise of finding it off and losing all the information not saved to disk.

However hibernating to disk is a whole different business. I never managed it to work, and that was an itch I wanted to scratch. Finally I managed, with the following recipe.

HowTo

First, make sure that you have enough [[paging|swap space]] available in disk. In Linux you generally create a swap [[disk partitioning|partition]] when installing the OS. The old adage states that one should make the swap partition twice as big as the RAM memory of the computer. With modern computers this is both unnecessary (because the big RAM makes sure you’ll never run out of it, and if you do, you are screwed anyway) and wasteful (if you have a 4GB RAM, it means that you dump 8GB of disk space). However, if you intend to hibernate your computer, all the information in the RAM memory has to be copied to the hard disk, so you sure need at least as much swap as RAM (but not twice).

Second, you need to use the correct tool. I use [[Xfce]] as desktop environment under Ubuntu, and the Exit menu presents me with six options: “Switch user”, “Log out”, “Restart”, “Shut down”, “Suspend” and “Hibernate”. I think that the latter two make use of the tools in the acpi-support package. The suspend action seems to work OK, but the hibernate one doesn’t (for me). It runs the command /etc/acpi/hibernate.sh, and it gives me problems. Thankfully I found some utilities that work reliably, namely pm-utils.

The pm-suspend command seems to work as correctly as the “Suspend” button in the Exit menu of Xfce. The pm-hibernate, on the other hand, works perfectly, unlike the “Hibernate” button. The drawback is that only root can run it. My solution is to put a launcher button in the Xfce task bar, that will run “gksudo pm-hibernate”. This way I am asked for my password and, if sudo is correctly set up, pm-hibernate will run.

More info

Sometimes it is very interesting to run some commands at suspension/hibernation moment, or at resuming/thawing. One such command is [[hdparm]], with which you can fix the long known load/unload cycle problem (you can google about it). Another one is one to fix a problem that apparently appears on MacBooks: the [[touchpad]] is lost when the computer wakes up back. The keyboard works, and USB mice work, but the touchpad doesn’t. This problem can be fixed by reloading the appletouch [[Loadable kernel module|kernel module]]:

# modprobe -r appletouch && modprobe appletouch

You can fix both issues above by creating a file named, e.g., 99-macbook_fix, in /etc/pm/sleep.d/, and making it executable. Then write in it the following:

#!/bin/sh

if [ $1 = ‘thaw’ ]; then
# The appletouch module has to be reloaded after hibernating
# (not after suspending, though), because otherwise the touchpad
# remains frozen upon awakening.
modprobe -r appletouch
modprobe appletouch

# Correct the load/unload cycles problem
/sbin/hdparm -B 254 /dev/sda
fi

if [ $i = ‘resume’ ]; then
# Correct the load/unload cycles problem
/sbin/hdparm -B 254 /dev/sda
fi

Comments

Ubuntu 8.10 Intrepid Ibex is here!

As you can see on the right side tab of this page, Ubuntu 8.10 has just been released!

Pick a mirror and download. Or better yet, do it through BitTorrent.

Comments

LWD – October

Hey, October almost passed and I didn’t write the montly report on LWD. I might make it bimontly, to produce less spam in the blog. You can read an intro for my Linux World Domination project in this May 2008 post.

As usual D2D means “days to domination” (the expected time for Windows/Linux shares to cross, counting from Feb 3, 2008), and DD2D means difference (increase/decrease) in D2D, with respect to last report. CLP means “current Linux Percent”, as given by last logged data. The new datum DD means domination day (in YYYY-MM-DD format).

As a new feature, I am now fitting the curves (to predict Windows/Linux crossing) to first degree polynomials, but taking only the last N points so that the [[Coefficient_of_determination#Definitions|coefficient of regression]] is close to 1 (yes, I am being purposely unclear and arbitrary on this subject).

Project D2D DD2D DD CLP Confidence %
Einstein 882.1 +571.9 2011-03-31 35.17 (+0.27) 37.3
MalariaControl 6890.0 +6268.8 2027-09-10 12.26 (+0.06%) 0.3
POEM 3613.9 2018-09-21 9.81 (+0.05%) 0.4
QMC >10k 7.88 (+0.0%)
Rosetta >10k 7.91 (+0.11%)
SETI >10k 7.86 (+0.03)
Spinhenge >10k 3.21 (+0.2%)

OK, the data seems discouraging. The crossing day (DD) seems to be further away every month, instead of closer. Recall however that the only (half) reliable data are the current (and past) percents. All the rest is speculation, and the fits change wildly depending on the function used to make them, and the number of points fit.

Starting with this month’s issue, I might post pictures of the evolution plots. Today I’m showing the plots for Einstein@home. Next month: Malaria@home.

Number of hosts percent evolution for Einstein@home (click to enlarge)

Accumulated credit percent evolution for Einstein@home (click to enlarge)

Comments

Soy un PC y quiero ser libre

Leído vía Menéame, un vídeo hecho por alumnos de una escuela de Ordizia, mi pueblo natal:

Comments (3)

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »