SIL LSDev Linux Development

Language software for Linux and Mac OS X

Updating the nVidia kernel module when upgrading your Debian kernel

I’ve found it a big pain that Debian typically upgrades its kernels without upgrading commonly-used kernel modules at the same time. The result is that I have only a text login after the next reboot. Now I’ve found a relatively painless solution that works well every time.

Read the rest of this post…

GTK# on Windows

Our GUI development on Linux is done with GTK2+, and in the case of Mono, GTK#.

On a GTK based Linux system using Mono, this setup ‘just works’. It takes a little bit more setting up on Windows, but with a small amount of effort, it is possible to take compiled programs straight from Linux and run them on Windows with Microsoft .NET (It is also possible to use Mono on Windows).

This is the procedure I used to use GTK# on Windows:

Read the rest of this post…

COM in Linux

The core of SIL FieldWorks was written in C++. New development in FieldWorks is done in C#, and ties into the C++ core through COM.

After much looking all over the Internet in January 2005, I basically concluded that not only does no one use COM in Linux, but no one wanted to (outside of big enterprise application ports to UNIX).

When both porting FieldWorks to Linux and making it cross-platform, we lose access to Microsoft’s COM implementation in Windows. We were originally going to use SWIG to generate C# wrappers around the C++ core libraries. All C++ methods would then be P/Invoked, and COM would be bypassed.

Then I found that Jonathan Chambers had put a lot of good work into Mono‘s COM support. I was able to have a C# COM client access a C++ COM server in Windows using Mono.

Read the rest of this post…

The look and feel of cross-platform user interfaces

Someone just asked me,

What’s the best way to do a cross-platform product that has the native XXX look and feel?

It depends on exactly what you mean by native look and feel. There are several GUI toolkits that produce the right pixels, so that in a screen shot it would look just like an XXX application, but which still don’t produce an application that feels right. For example, on Mac, if you select a range of text and then press right-arrow, what happens? The insertion point should move to the right boundary of the previous selection. However, on Windows, it typically moves one character beyond that point. I find this inconsistency very frustrating in several of the cross-platform apps that I use regularly.

Also, applications may have the right pixels for all the individual controls, but the overall layout of their UI doesn’t feel comfortable for an XXX user. The classic example is the relative ordering of OK and Cancel buttons in dialogs. Most toolkits now take care of this transparently, but there are other things, such as the extent to which toolbars are used, that can be uncomfortable for users. For example, Mac applications typically use toolbars very sparingly, and Windows apps use them extensively.

Read the rest of this post…

Python IDEs

I’ve had a number of requests to recommend some Python IDEs. Although I don’t use a Python IDE myself (just a good programmer’s editor) I have heard others speak highly of several.

Read the rest of this post…

Introducing Andrew Weaver

Hello, I’m Andrew, the old man of the team. I’ve arrived late to this blogging party, insisting that my precious time must be spent getting some real work done! (“Come on Andrew, if you’re so busy working, how come you’re blogging right now?” “Aha, I might be blogging in my spare time.” :-) ) For the past few months I’ve been one of the chaps working on porting a Windows C++ application to Linux, C#/Mono and GTK.

Explorations in GTK# part 2

Glade and custom widgets

Glade and GTK# are a powerful combination. One that we are using for our Mono re-implementation of WorldPad. It’s quite possible to build a very functional application using just the standard widgets provided by GTK, but sometimes specific functionality is needed which is not found in the regular set of widgets.

In this instance, a "custom widget" can be inserted into a Glade interface. This is easy to do, but filling in the custom widget with something useful is a bit more tricky.

Custom widgets in Glade
Above: Custom widgets in Glade.
Below: Custom widgets being implemented as "ColorPickerButton"s in the application.
Custom widgets in use

How do we implement the custom widget?

Read the rest of this post…

Explorations in GTK# part 1

GTK.Settings: What and how

For the standard set of GTK# widgets, there is a property or method to change almost any aspect of the widgets appearance and behaviour. But some things require using GTK.Settings. For example setting the palette in a colour selector, or changing the cursor behaviour in a text entry.

How…? To set a property, the following methods can be used:
Read the rest of this post…

Introducing Brent McCarthy

Hi I am the token Canadian on our Team. I am working in both C++ and C# to get the main view of the code free of Windows API’s. We will be using GTK API’s for our Linux implementation.

Mono 1.2

Today I read the Mono 1.2 release notes. A few things stuck out to me:

  • full implementation of 1.0 and 2.0 APIs
  • full SWF 1.1 API
  • MONO_IOMAP setting may help with some potential crossplatform issues
  • Bundles. If our COM implementation ends up being rather Frankenstein (or really cutting-edge :) ), Bundles would let us distribute our own custom Mono along with the application. I don’t really see this as a desirable solution, but it’s nice to know it’s there.
  • “Support for the registry is now provided on Linux and Windows.”
« Previous Entries