Archive

Author Archive

Jaunty vs Lucid Reboot Time

August 23rd, 2010 subogero No comments

I’ve measured the reboot time after the Lucid install on the ASUS UL20A. That’s what I call progress.

                         Jaunty  Lucid
--------------------------------------
from power-on until login  19 s   20 s
from login until ready     15 s    5 s
power off                  12 s    5 s
--------------------------------------
overall reboot time        46 s   35 s

ogc 4.2 – Math Functions

August 22nd, 2010 subogero No comments

The introduction of the lex (flex) tokenizer into the ogc development allows an incredible amount of new bloatware to be implemented. The first menacing omen was floating-point support.

And now it’s math functions. Our friends from <math.h> sin, cos, atan, log, exp, sqrt are available as @s @c @a @l @e @r. The little bastards, besides looking very ugly, also perform a sneaky implicit floating-point conversion.

Check it out. But where will this all end?

Ubuntu 10.04 Lucid on ASUS UL20A

August 20th, 2010 subogero No comments

Well, Jaunty was not able to use the full (you know what I mean) resolution of my new TV, so I thought it was time to upgrade. I started Lucid Lynx from a live USB, attached the TV and, to my utter amazement, I was immediately presented with 2 073 600 deep purple pixels.

Upgrade time! Or even more than that. Time to reorganize my partitions. All I left was the original 200 GB home partition, now mounted as “/public”, mainly for my strictly legal (in Hungary) music and movies. If you live in the US of A, do not do this! The monopolists will confiscate your possessions, kill your family and jail you for 2000 years.

Anyway, 65 GB of unused Windows 7 (which I had no other choice than to pay for) was permanently removed, replaced by a new “/home” partition. The remaining 50 GB became “/” (root for starters).

Installation went like a breeze, as usual with Ubuntu. WLAN connected immediately. The telly as an external full high definition monitor? You betcha. Import stuff from old user profile, apt-get all the important packages (gimp, development stuff, openarena), compile and install the freshest hypest midnight commander, and there you go.

One thing. The bloody LCD brightness buttons. They did not work at all. Nor could I set brightness any other way, including the GUI and my Jaunty hack. Nice. This is the point where most people start thinking about suicide.

Others, however, use Google. Which reveals the solution immediately in the form of an Ubuntu wiki page:

acpi-backlight=vendor

has to be added to the GRUB kernel command line. Since then it works beautifully, even the flickering of my Jaunty hack is a thing of the past.

Running cron on Cygwin

August 13th, 2010 subogero No comments

While setting up the ssh-agent on Cygwin, I run into a small problem. After reboot, the ssh-agent is not running yet, but the /tmp/.ssh* files are still there from the previous session. When starting a Cygwin shell, the start of the ssh-agent fails, if these files have not been manually removed before.

Task: delete these files automatically at boot time. I googled it, and the Windows way of doing it seemed extremely complicated. As usual, as it springs to the lips of smug Linux geeks. Not me. Then I ran across the “cron” scheduling daemon somehow, and there it was: insert the line below into the “/etc/crontab” file.

@reboot SYSTEM rm -f /tmp/.ssh*

The rest of this post is a distilled version of my adventures with setting up cron on Cygwin 1.7.5.

cron is the Unix-equivalent of “Scheduled Tasks” in Windows, just better. For instance, you can schedule something to run at boot time (I may have mentioned that before) and, the scheduled commands don’t throw up a scary cmd-window on your desktop. So in the meantime I’ve moved all my scheduled tasks to cron.

Start the cygwin-setup and add the “cron” package from the “Admin” category.

We’ll run cron as a service by user SYSTEM. Poor SYSTEM therefore needs a home directory and a shell. The “/etc/passwd” file will define them.

$ mkdir /root
$ chown SYSTEM:root /root
$ mcedit /etc/passwd
SYSTEM:*:......:/root:/bin/bash

The start the service:

$ cron-config
Do you want to remove or reinstall it (yes/no) yes
Do you want to install the cron daemon as a service? (yes/no) yes
Enter the value of CYGWIN for the daemon: [ ] ntsec
Do you want the cron daemon to run as yourself? (yes/no) no
Do you want to start the cron daemon as a service now? (yes/no) yes

Local users can now define their scheduled tasks like this (crontab will start your favourite editor):

$ crontab -e  # edit your user specific cron-table
HOME=/home/foo
PATH=/usr/local/bin:/usr/bin:/bin:$PATH
# testing
* * * * *   touch ~/cron
@reboot     ~/foo.sh
45 11 * * * ~/lunch_message_to_mates.sh

Domain users: it does not work. Poor cron is unable to run scheduled tasks on behalf of domain users on the machine. But there is another way: cron also runs stuff found in the system level cron table in “/etc/crontab”. So insert your suff there, so that SYSTEM does it on its own behalf:

$ mcedit /etc/crontab
HOME=/root
PATH=/usr/local/bin:/usr/bin:/bin:$PATH
* * * * *   SYSTEM touch ~/cron
@reboot     SYSTEM rm -f /tmp/.ssh*

Finally a few words about crontab entries. They are either environment settings or scheduled commands. As seen above, on Cygwin it’s best to  create a usable PATH. Home dir and shell are normally taken from “/etc/passwd”.

As to the columns of scheduled commands see the manual page.

Categories: Uncategorized Tags: ,

ogc 4.1 – Floating But Not Sinking

August 3rd, 2010 subogero No comments

Erm… ogc 4.0 had some certain erm… bugs in its syntax.

But ogc 4.1 is now downloadable from the ogc page. Including native Linux and Windows binaries.

ogc 4.0 – Floating on Binary Waters

August 1st, 2010 subogero No comments

The new version of the Lazy Man’s calculator is out.

It’s no more baffled by floating-point numbers. It became fluent in binary format as well, if you want to deal only with the usual suspects (zero and one).

See the ogc page.

Categories: Uncategorized Tags:

Corporate Guerilla Git

July 23rd, 2010 subogero No comments

See the new Corporate Git pages!

It’s about setting up git repos in Windows XP boxes, shared among each other via Cygwin/OpenSSH.

Categories: Uncategorized Tags: , , ,

Music

April 22nd, 2010 subogero 1 comment

One needs music for healthy hacking, especially in a noisy office. Monotonous, repetitive tunes are especially well suited for this kind of activity. Electronic genres like drum&bass, downtempo, dub and deep house spring to the mind. And the very kings of these are non other than the “Wiener Klassiker” who’ve just turned 16 years old:

Peter Kruder & Richard Dorfmeister

In true Free and Open Source fashion, they have released not one but two albums, freely and legally downloadable in mp3 format from G-Stoned’s website until 16 May. The CDs are in the shops from 17 May:

  • 13 F**king New Tracks
  • 12 F**king Classics

I’ve just started listening them, they rock… erm… downtemo.

Categories: Uncategorized Tags:

Linux Credits

April 9th, 2010 subogero No comments

I happened to activate the “Source” repos in Synaptic today and then downloaded the Linux 2.6.28 source code. Just for fun.

I also happened to have a look into CREDITS. It turned out to be an interesting read. It seems Linux comes from the happier parts of the world. Let’s see:

++ I'm proud to announce four Hungarian kernel hackers
++ But the happiest part of the Eastern Block seems to be the Czech Republic
++ The North rocks, or rather hacks (Finland, Sweden, Denmark, Canada)
++ The bulk comes from the West (USA, UK, Germany, Netherlands, France, Italy)
++ Eric S. Raymond is there (a.k.a. Master Foo)
++ Japan in da house
++ The Republic of China (Taiwan) beats ...
-- ... the People's Republic of China (only one hacker for 1 billion people)
-- India, just one? Come on! (Even he is Malaysian)
-- Same for Israel. Although I always knew Haifa is the best place there
-- Absolutely zero from Islamic countries.

I have a theory about the effects the “Religion of Peace” has on the human brain. It seems to be confirmed.

Perl 3

April 6th, 2010 subogero No comments

The Camel Book has arrived. It does not reach P. G. Wodehouse’s joke density (3 per word), but it’s close. And it’s 1000 pages. So Larry may have beaten Pelham Grenville in the overall joke count.