Archive for August, 2010

Jaunty vs Lucid Reboot Time

August 23rd, 2010 subogero Comments off

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 Comments off

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 4 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:


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 8 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” and “cygrunsrv” packages 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

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
# testing
* * * * *   touch ~/cron
@reboot     ~/
45 11 * * * ~/

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:

$ touch /etc/crontab
$ chown SYSTEM /etc/crontab
$ mcedit /etc/crontab
* * * * *   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.

If certain crontab entries do not run, the best diagnostic tool is this:

$ cronevents

It will print out details on all successful and failed commands.

Categories: Uncategorized Tags: ,

ogc 4.1 – Floating But Not Sinking

August 3rd, 2010 subogero Comments off

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 Comments off

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: