skweez.net

Alles skweez?

1001111001011101011101001101011

Alles aus der Kategorie “English posts”

13.07.2011

Selling GPL’ed software

von mks.

Apparently someone is trying to make money with an Android application that I wrote a month ago. At first I was really mad about people ripping off others by making money of other people’s work. But today I actually feel it is a bit of a compliment. At least this guy thinks, my little app is worth some money. ;-)

But seriously, of course I complained about it to Google with their DMCA form.

Regarding the GPL and selling software: this is actually possible, as long as you respect the terms of the license. Paragraph 4 of the GPL says:

You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.

Update: Google removed the App. And it seems to me that they removed the vendor’s account all together.

Update 2: After Google removed it the first time, the guy created a new merchant account and uploaded my app again. I filed a DMCA complain again and Google took down the app and his account a second time. But this guy is really persistent: On August 16th he uploaded the app AGAIN. Remember: He has to pay 25 US$ everytime he creates a new account. And he does this to try selling an app (of about 50 LoC) for 2$, that I give away for free. How stupid can one single person be? I would have thought you’d need at least ten *really* stupid people to gather that amount of idiocy.

09.07.2011

Eclipse, Android and Git submodules

von mks.

Because I couldn’t find any info on how to use sub-projects (that is sub folders in a project) as libraries within the ADT in Eclipse, here’s a short how-to:

Use submodules as you normally would, e.g. when cloning a project with sub-projects use this:

git submodule init
git submodule update

Then in Eclipse you can create a new Android project with the wizard from the existing source (and pointing the location to the sub directory).

When you reference the sub-project as a library for the main project, it will magically point to the correct directory inside the main project.

The yaxim Jabber client for Android for example uses this to depend on the MemorizingTrustManager (see the screenshot).

11.05.2011

CLEAN-FEED WordPress plugin

von elm.

I wrote a litte plugin for WordPress that removes certain tags from the blogs feed. I needed this, because some tags were redundant and made the feed bad looking in some feed readers. Maybe someone can use this.

The plugin can be found on github: https://github.com/elm/clean-feed

Feel free to fork and customize.

04.05.2011

Repair a SuperDrive that won’t read any disk

von elm.

If your SuperDrive is broken and spits out every disk you would like to feed it, it might be possible that your drive just needs a little love on the inside. In some cases the laser lens is dirty and that is the reason, the drive does not detect any disk. To clean the lens you can use a cleaning CD or you can open your super drive and clean the lens manually. A guide how to get to your SuperDrive out of your Mac can be found at iFixit.

When you have your SuperDrive in your hands you need to open it carefully (like we ever do anything :) ) and clean the lens, e.g. with a cotton bud. If the dust on the lens is the problem you should clearly see a difference between the lens covered in dust and after you cleaned it. Anyways, you might give it a try as your drive failed and if you read this you are probably out of warranty.

12.03.2011

No Windows or Ubuntu on my MacBook

von elm.

Today, I tried to install Windows 7 Professional 64bit and Ubuntu 10.10 Alternate amd64 on my MacBook. Here are the results:

First windows:
"Select CD-ROM Boot Type:"
The keyboard is not working. The internet says it’s a bug in the Windows 7 efi boot loader.

Now Ubuntu:
"Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)"

Did not search for solutions. Both are not working. Glory new world. Dreck.

08.02.2011

MATLAB: Use UTF-8 encoding as default

von elm.

MATLAB R2010a uses different encodings on different systems. It seems to use the system setting on Linux. So if locale is set to en_US.UTF-8, Matlab will use this. But on Mac OS X, Matlab seems to ignore this setting. It will use ISO-8859-1 for no obvious reason. That is very annoying if you want to share your Matlab files with other systems.

To make UTF-8 the default encoding for Matlab, you can create a start script that will set the encoding. The startup script is called startup.m and needs to be placed in the directory that is opened in the Matlab workspace by default. For me this was /Users/elm/Documents/MATLAB. So the way to go is: just start Matlab and create a new file called startup.m. In that file you place the command slCharacterEncoding('UTF-8').

This command will tell you which encoding you are using if no argument is supplied.

02.02.2011

ServerStatus

von elm.

ServerStatus is a little sysop helper for Mac OS X to monitor your (or someone others) servers. ServerStatus periodically pings the servers you specified and reports back their status. It resides in the menu bar so you can always see the current status of all servers in the list.

Some features are planned in future updates but there is no schedule. The source code will also be released to the public but I’m not planning to do so in the next days. This release is something like an alpha or beta version or I don’t know. I have no idea how many bugs you will find and how many updates are required to make it work actually. :)

The ServerStatus icon is from Artua Design Studio. They were very kind and allowed me to use it.

This is the first Mac application from me so don’t expect it to be perfect. I would love to get some feedback.

You can get the first official (beta-) release here:

Release notes are available here.

You can ask questions or give feedback in the comments or send me an email serverstatus at skweez.net.

20.12.2010

GNOME Contacts mockups

von mks.

GNOME Contacts: Details
This post is a bit late, because I was too lazy too post it. :-)

A few weeks ago I attended a small GNOME hackfest here in Munich. Actually it was more of a “design fest”. The goal was to design a user interface (and software design) for a new address book application for GNOME. We feel that the current contact managing applications just aren’t easy to use. They often miss a simple and clean UI and integration with other applications.

We see two main problems with the current situation. One being that there is no central address book database on GNOME at the moment. All the applications that use contacts (like Evolution, Empathy, etc.) manage them on their own. Of course this is bad, because the user has to manage the same data multiple times. There is the Evolution Data Server, but it seems it’s not flexible enough to be used by other applications.

The second issue is that there is no easy to use and visually appealing user interface to manage contacts on GNOME. Again, there is Evolution but … well, just open your Evolution address book and you’ll know what I mean.

Last Saturday we mainly addressed the latter problem. We started to design a new user interface. After lots of iterations, we identified four possible basic approaches:

  • Displaying a list or grid of contacts and opening a dialog upon double-clicking. We came already very early to the conclusion that a separate dialog would be the most unelegant solution.
  • Displaying contacts like in the first approach but showing details in the same window upon a double-click, providing a “Back” button to get back to the list.
  • Showing details in-line when a user is selected.
  • Using a three-column approach for groups, contacts, details.

We made mockups for all of the solutions (except for the first one). Salomon and Daniel wrote detailed descriptions of everything we came up with. Everything is on Github.

20.11.2010

Using a GUID Partition Table

von mks.

Disclaimer: This article is not a step-by-step guide for beginners! I did this on Arch Linux, the paths may differ slightly on Ubuntu. Playing with the master boot record and partition table of your system is always a risk. Make a backup! I don’t take any liability for your lost data!

This article describes, how you can switch your system from the old MSDOS style partition table to the new GUID Partition Table (GPT) format. GPT is part of the EFI specification and will therefor probably become the standard for partitioning in most desktop computers in the near future. Apple is already using EFI and GPT in their desktops and notebooks and IA64 based servers and workstations do too. However, you can also use GPT on your BIOS based system.

MSDOS style partition tables are stored in the so called Master Boot Record (MBR), the first sector (512 Bytes) on the disk. It also contains the boot loader, which already takes up 440 Bytes. The partition table must fit into 64 Bytes. This is the reason why you can create only 4 partitions at max (with each entry taking up 16 Bytes of space) in an MBR partition table. Because the size of MBR partitions is stored as 32 bit, each one can be 2 TB large.

If you are, like me, fed up with the limits imposed by MBR partition tables and don’t want to use that hack with extended partitions anymore, you may want to try GPT. A GPT can hold 128 partitions each with a maximum of 8192 Exabytes in size.

What you need

The fdisk tool can not handle GPT. You will need gdisk, which is used in almost the same way. You will also need a compatible boot loader: the old grub 0.97 needs a patch, but grub2 handles GPT fine. However I use extlinux from the syslinux package (>=4.0), because I don’t like the complex configuration system of grub2.

You will also need to move your first partition by 33 sectors (because that’s the space, GPT takes up). If you have a separate boot partition, like me, this is pretty easy. If you don’t, you should probably wait until the next fresh reinstall. ;-)

Compatability

Linux can use GPT and boot from it. Make sure your kernel is compiled with the necessary support:

$ zgrep CONFIG_EFI_PARTITION /proc/config.gz

CONFIG_EFI_PARTITION=y # we're ready to go

FreeBSD can also boot from GPT, but I didn’t test it. Windows cannot boot from GPT partitions in BIOS systems! So if you have a dual booting machine with Windows, you shouldn’t do this.

Let’s rock’n'roll

First, I installed syslinux and gdisk from the repository. You will need syslinux 4.0 or newer. If you did not already update to Ubuntu 10.10, you will have to build it yourself.

I then installed extlinux with my MBR still intact, so I could test if it works. Change sda to your needs! Remember to mount your boot partition!

$ dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda # Copy bootloader to MBR
$ mkdir /boot/extlinux
$ extlinux --install /boot/extlinux
$ cp /usr/lib/syslinux/menu.c32 /boot/extlinux

Create and edit /boot/extlinux/extlinux.conf as described in `man syslinux`, fitting your system. Mine looks like this. Yours should most probably look different!

default menu.c32
prompt 0
menu title Arch Linux
timeout 30
 
label linux
 menu label Linux
 kernel ../vmlinuz26
 append initrd=../kernel26.img root=/dev/sda3 ro resume=/dev/sda2 quiet

After I had a working extlinux config, I rebooted with System Rescue CD. You can not do the following steps on your running system, because you will need to change the partition table and install the boot loader afterwards using the new table. But the kernel will only reload the table at reboot. However you cannot reboot into your system as long as you didn’t install the boot loader.

With the sysresccd running, I mounted my partitions and backed up my /boot.

$ mkdir /mnt/host
$ mount /dev/sda3 /mnt/host
$ mount /dev/sda1 /mnt/host/boot
$ cd /mnt/host
$ tar cf boot.tar boot/
$ umount boot/

Now I started gdisk. It will tell you, that you have a MBR table, which it converted to GPT and that you will have to delete or move your first partition. Delete and recreate it accepting the standards and mark it as legacy BIOS bootable.

$ gdisk /dev/sda
Command (? for help): d
Partition number (1-4): 1
 
Command (? for help): n
Partition number (1-128, default 1): 1
First sector (34-312581774, default = 34) or {+-}size{KMGTP}: 
Last sector (34-112454, default = 112454) or {+-}size{KMGTP}: 
Current type is 'Linux/Windows data'
Hex code or GUID (L to show codes, Enter = 0700): 
Changed type of partition to 'Linux/Windows data'
 
Command (? for help): x
 
Expert command (? for help): a
Partition number (1-4): 1
Known attributes are:
0: system partition
1: hide from EFI
2: legacy BIOS bootable
60: read-only
62: hidden
63: do not automount
 
Toggle which attribute field (0-63, 64 or <Enter> to exit): 2
 
Attribute value is 0000000000000004. Set fields are:
2 (legacy BIOS bootable)
 
Command (? for help): w

You have now converted your partition table to GPT. Last step: restore the contents of your boot partition and install extlinux again, but this time with the boot loader code for GPT partitions (gptmbr.bin).

$ mkfs.ext2 /dev/sda1
$ mount /dev/sda1 /mnt/host/boot
$ cd /mnt/host
$ tar xf boot.tar
$ dd if=/mnt/host/usr/lib/syslinux/gptmbr.bin of=/dev/sda
$ extlinux --install /mnt/host/boot/extlinux

If everything went well, you can now reboot into your GPT system. Good luck. :-)

$ reboot

References

31.08.2010

My current Top 5 Android Apps

von mks.

  1. Aldiko
    Nice eBook reader. Reads books in the epub format. Integrated feature to download public domain books from feedbooks.com. Gratis ad-sponsored version or ad-free for 1,49 US $.
  2. MapDroyd
    Offline, live rendering map application, using Openstreetmap data. No routing, no near places, etc., though. Gratis.
  3. Detexify
    You draw a glyph on the screen of your phone with your finger, Detexify tells you the TeX command for it. Very handy. Gratis.
  4. FeedR
    It’s a RSS reader. That’s it. Google Reader support. 1,99 US $.
  5. Google Goggles
    Take a photo of some landmark, book or painting (and a lot of other things) and Goggles tells you what it is. Pretty cool. By the inventors of not being evil. Gratis.