developing on linux part 1

Peter Alcibiades palcibiades-first at yahoo.co.uk
Sat Mar 24 05:11:15 EDT 2007


I was emboldened to write this by Ken Ray's post - otherwise I'd have felt I 
was teaching my grandmother....  Hope it helps anyone who is sophisicated in 
rev but naive in Linux.

Peter

______________________________________________________________

The thing to understand first is the environment in which almost all the other 
applications on a Linux system have been written.  

They will almost all, unlike yours, be Open Source.  Many will have been 
written in either the Gnome or the KDE development environments.  Even if 
written in other environments, they will use open source components.  If 
written in Python or other popular languages they will probably use the KDE 
or Gnome bindings.  They will then often take their look and feel from the 
Gnome or KDE desktop settings.  They will also have access to all the shared 
libraries, and will use them. OpenSource means that the source code is 
available, and that exotic distributions with exotic sorts of repository 
management can be ignored for packaging purposes, since people running them 
can be asked to compile their own.  See below for packaging.

The environment in which they run is highly layered and structured.  The 
window manager is distinct from the desktop environment, and distinct from 
the log-in manager, and they all are interchangeable and communicate via 
structured protocols.  Unlike either Windows or MacOS, you can choose 
independently:

-- which distribution you will use (Ubuntu, Fedora, Mandriva....)
-- which login manager you use (xdm, kdm, gdm, wdm....)
-- which window manager you will use (metacity, kwin, ICE, openbox, 
Fluxbox...)
-- which desktop environment you will use (KDE, Gnome, Xfce....)
-- which theme you want to use for your desktop environment (Crystal, 
Redmond....)
-- and then, which applications you want (Open Office, KOffice, Gnumeric, 
Abiword...)

Some things are windowmanagers but have functionality now associated with full 
desktop environments.  FVWM, WindowMaker and Enlightenment are in this 
category. 

So, you might choose a theme (icon set and colors) for KDE that makes it look 
just like Gnome.  It will look the same, but will of course still have all 
the KDE menus and default selections.  There are innumerable themes, 
including ones that emulate or approximate Mac and Windows styles.  There is 
no particular way that any distro looks, or even that most Desktop 
Environments look.  OSNews some time ago had a discussion in which people 
were invited to post their desktops.  There were hundreds of posts, and 
screenshots, and almost all were wildly different, even when based on KDE.

This gives rise to the common cry among Mac users encountering Linux for the 
first time:  all this choice is bad for me and makes me unhappy!  Well, 
horses for courses.

Almost all applications will have been packaged for the distro in which they 
are included, and will be available for download from the distribution's 
repositories.  For instance, they will be debian packages, or rpm packages or 
slackware packages.  They will carry indications of what libraries they need, 
and the installer will check for the presence of these and then add them 
automatically if not found during installation. Here are the requirements for 
xfe, a file manager:  
- Xfe is written in C++ and built using the FOX graphical toolkit library, 
therefore:
- For versions of Xfe prior to 0.70, you need the FOX library 1.0.x.
- For versions of Xfe prior to 0.80, you need the FOX library 1.2.x.
- For versions of Xfe prior to 0.98, you need the FOX library 1.4.x.
- For versions 0.98+, you need the FOX library 1.6.x.

Install xfe on Debian or Mandriva, and you'll find that the right Fox toolkit 
comes with it.  You'll also likely find that an entry is made in the KDE and 
Gnome menus, and that your alternative window manager picks up the Gnome and 
KDE menu entries and uses them, even if you are not running either.  
Incidentally, xfe illustrates the rule that if there is one application for 
something on Linux, there are probably ten where he came from.  Gnome uses 
Nautilus, KDE Konqueror.  Or Krusader. And probably someplace there is 
another kxxx being worked on as we write.  You can see why, when Mac people 
complain about the Finder, our eyes start to glaze over....

You can assume, unlike when you write apps for Windows or Mac users, that the 
user already has a huge number of applications preinstalled or can install 
them very easily free.  These will include Office packages, contact managers, 
personal finance and accounting managers, image viewers of all sorts, 
specialist packages like project management, personal catalogue packages for 
books and records and recipes, little toolkits to do things like bulk file 
renaming.  CD and DVD writing.  Desktop publishing.  Image editing. 
Development environments and programming languages.  Take a specific example, 
databases.  I have installed the following (and I'm an amateur):  rekall, 
kexi, knoda, nosql, sqlite, mysql, firebird, flamerobin, OO Base.  You run 
out of energy before you run out of available applications on Linux.  

You however have not written an application like this, you are probably not 
distributing under the GPL, and in any case, you are using a closed source 
tool, Rev.  So unlike almost all the other apps on the system, yours will be 
self contained.  Your app will not be packaged as an rpm or deb file by the 
distribution (though you could do this yourself).  It won't be available on 
the repositories.  You will thus not find your app on installation 
automatically finding its way into the system menus, or appearing as a choice 
for certain file types. None of this is bad, but it is different.

Maybe, if you've never run Linux or only run it as one distro comes out of the 
box, this brief intro will make some of the rest clearer.  Next some thoughts 
on guidelines.



More information about the use-livecode mailing list