Eskild Hustvedt

BASH SSH host completion

I tried the bash completion stuff, and found a single thing I liked, ssh completion. Most of the other stuff just annoyed me… a lot (and was mostly useless, at least for me). I first looked at the code in the bash completion for ssh completion, but it was imho too large to stuff into my .bashrc, so I wrote a small perl one-liner that did the trick.

complete -A hostname -C "/usr/bin/perl -e 'my \$match = \$ARGV[1] ? \$ARGV[1] : \".*\"; open(my \$INPUT,\"<\",\"$HOME/.ssh/config\") or exit(0); foreach(<\$INPUT>) {next unless s/^\s*Host(name)?\s+//;chomp;foreach(split(/\s+/)) { print \"\$_\\n\" if(/^\$match/ and not /^\d/ and not /\*/);}}'" ssh 

Stuff that into ~/.bashrc and off you go. It completes based upon hosts in ~/.ssh/config

Happy birthday, Day Planner!

Today, the 19th of April, it is exactly one year since the first release of Day Planner, 0.1, was released. The first release was, as expected, pretty buggy. But it has since grown into a stable and useful program and has seen major improvements since the first release. I just recently released version 0.6 which introduced the Day Planner services calendar synchronization system and a load of usability fixes, thanks to mpt in #usability on irc.gnome.org. I’m now hard at work on version 0.7, which will among other things introduce proper recurrance support for normal events.

If it’s been a while since you tried it, or if you haven’t tried it at all, go ahead and give it a download. It is available as a Mandriva Linux noarch RPM, generic .run installer and a source tarball, it also has only one single dependency except for perl and that is the gtk2 perl bindings, so it should run without having to install 20 dependencies.

Mandriva ONE usefulness dropping

With 2007.0, all I really used was Mandriva ONE for installing Mandriva on boxes. It fit on one CD and didn’t install more than the required software (ie. not five different programs that do the same thing). This time however, it seems that they have dropped localization for most of Mandriva One. There isn’t a Mandriva One GNOME with Norwegian Nynorsk on it anymore, rendering the entire idea useless, both as a live CD to allow people to try the system and as a handy installation disk. So right now I’m wondering if we’ll see a release of the good set of One disks as 2007.0 had or if that has been dropped completely.

pokes Mandriva I want my One CD :o

As a sidenote, I tried the Ubuntu Live CD too, and found Mandriva ONE GNOME superior to it, partly due to the localization.

Happy holidays

I wish you all a happy holiday.

While I do this I also want you to take a moment to think about those that don’t have one. Some celebrate it alone, some are depressed, some drugged, some fighting for their life and some just afraid. Take a moment, give them a moment - that’s all they need. I hope you’re not one of these, but if you are my thoughts, wishes and greetings go to you (and don’t hesitate to get in touch if you so desire).

Day Planner services beta test

I’m going to start the semi-public beta test of the day planner services system now.

The day planner services system is a system for calendar synchronization. It does:

  • Synchronization of calendars on multiple locations
  • Availability of an html version of the calendar

It is integrated into day planner and needs testing.

If you want to join the test, please just contact me (by for instance commenting on this blog post). The code is naturally free, but the service will be “payed for”. Plan is something like those that donate to the project will get this service for some time. Ofcourse nothing is to stop anyone from putting up their own server but the one run by me will be on a payed-basis. Those in the beta will get it free for more time, a year or so maybe.

Need testers - contact me.

Hosting!

Well, I decided on NearlyFreeSpeech.net. They offer a great service at very very good prices. I’ve registrered zerodogg.org, and it’s already up! Took 30 mins.

I’m still battling my old provider to get iamaturtle.org transferred to NearlyFreeSpeech.net, so far half-successfull (the domain is now in my name and unlocked), I just need the transfer code now. So we’ll see, maybe I get it before it expires. My old subdomains are now being forwarded to zerodogg.org (blog.zerodogg.org -> blog.zerodogg.org and zerodog.iamaturtle.org -> zerodogg.org).

Hosting?

My host sucks. The service they provide is great and cheap, but their support sucks. That is, I can live with slow response times, but they don’t answer me…ever.

So now I’m on the look for a new provider. I need:

  • SSH access
  • PHP(5)
  • Multiple subdomains
  • Good traffic (5+GB per month at a minimum I’d say, though I can live with less)
  • Preferrably support for two domains (iamaturtle.org and another one)

Any hints? Put links in comments.

drakSimpleConf

I’ve been thinking of a method of creating simple configuration UIs.

Take the following config file: RunMode = Inetd AuthMode = Closed Restricted = true

To create a simple configuration GUI for this I would write something like this: filename is /etc/example.conf setting RUNMODE can be (Inetd, Daemon) setting AUTHMODE can be (Closed, Open) option RunMode is RUNMODE with name “Run mode” and tooltip “Which mode to run in” option AuthMode is AUTHMODE with name “Authentication mode” and tooltip “Which mode to use for authentication” option Restricted is BOOLEAN with name “Enable restriction” and tooltip “Enable this if you want to enable restriction of user rights”

The initial filename option selects which file the config file is. The first “setting” defines a type of entry in the config file that can be either of the value “Inetd” or “Daemon”. This would create a drop-down widget where you can select “Inetd” and “Daemon”. The second setting defines the same for “Closed” and “Open”. The first “option” defines that the option in the config file “RunMode” is of the type “RUNMODE” and the name of the option that is displayed in the GUI is “Run mode” and it has a tooltip saying “Which mode to run in” The second is the same. The third one defines that the option “Restricted” is of the predefined type “BOOLEAN” (which is predefined to be true/false, this creates a checkbox instead of a drop-down box).

Now begin your slaughtering. This is still just an idea. There is no code yet. What do you think of the concept of creating a whole configuration GUI for an app using a single file like this? I’m thinking it would be okay for daemons and such. What do you think of the syntax? I just grabbed it out of my head today and thought it might work. I want the syntax to be simple and human-readable. The point is that you should be able to hack together a GUI for any program with a simple configuration file in a few minutes.

Flame me.

Day planner 0.1.1 released!

Packages are available from http://home.gna.org/dayplanner/download.html in addition to being in cooker. It fixes a lot of bugs.

Here’s an abriged changelog: A bug that caused the entire program to go insensitive if you clicked the edit button without having any event selected was fixed. Daemon errors are handled better. A bug where day planner would freeze if the daemon shut down while it was running was fixed. Localization was fixed. A Norwegian bokmal translation was added. The pop up dialogs is now placed on top of the main window. The notifier now gets the information from the daemon instead of getting it on the command-line, so that other users can’t see information about other users on the system.

I would still very much like any comments you might have, so please feel free to test and give feedback.