Slashdot Mirror


Designing Good Linux Applications

An Anonymous Coward writes: "A guy from IBM's Linux Impact Team in Brazil has written a guest column on Linux and Main describing how applications should integrate with Linux. It's Red Hat-centric, but there is a lot of material about the FHS and LSB that most users probably don't know."

8 of 208 comments (clear)

  1. Re:/usr/local obsolete? by ggeens · · Score: 3, Informative

    I understand that this is directly from the FHS.

    Not true. This is what the FHS says about /usr/local:

    The place for locally installed software and other files. Distributions may not install anything in here. It is reserved solely for the use of the local administrator. This way he can be absolutely certain that no updates or upgrades to his distribution will overwrite any extra software he has installed locally.

    /opt is not mentioned as far as I can see. I remember reading that it was deprecated.

    /usr/local is not obsolete, and won't be. The only rule is that a package manager (dpkg, rpm,...) should never touch that directory (beyond creating it on a new install).

    --
    WWTTD?
  2. Re:User friendly? by Anonymous Coward · · Score: 1, Informative

    Handy hint - save the html locally. Search for "table 2" and comment the TABLE out. Makes the page readable!

  3. Re:Not totally true... by Osty · · Score: 2, Informative

    have no doubt that even in the Windows/Mac world a really powerful Command Line feature for any given app would be super useful, but it is only so for those who have climed that learning curve. In that case, it's better to focus on making the App do what it needs to do.

    In the Windows world, many applications do have powerful commandline features, as well as GUIs. However, you're trying to impose a unix-style of automation (shell script, tying a bunch of small commands together) on a system with its own methods of automation. Let me first say that there are tools you can install on Windows to do unix-style scripting, like Cygwin. I'm ignoring that for now. Typically, when you want to script something in Windows, you'll end up writing some vbscript or jscript that instantiates a COM object and does what it needs through that rather than running an app with some params and catching/piping stdin/stdout. I won't say which method is better, simply that they're different.


    This is why *nix administration knowledge doesn't translate to NT administration knowledge, and vice versa. Too often people complain about NT admins trying to use linux or some other unix without ever thinking of the reverse scenario. Try writing a script to force a change of password on next login for some number of NT users. Now make sure it works for local users, NT4 domain users, and Win2K AD users. This is quite doable, but most unix admins look for a passwd-like app, find none, and give up, complaining that NT sucks because they have to go through a GUI to modify 50,000 accounts.

  4. My two cents: by colmore · · Score: 2, Informative

    So I'm not a developer, and I don't know that much about programming. (Teaching myself QT 3 for the heck of it, but can't really do much worthwhile)

    Anyway here would be my two suggestions:

    1) Quit ripping off Microsoft and Apple. or at least think before you do. Using any Linux GUI you can immediately see the areas where the team said "lets make this more like Windows." on the one hand, this makes things more familiar and easy for the new users, but on the other hand, it repeats a bunch of bad and arbitrary GUI conventions that should be re-examined. For instance, in Mozilla by default, there's the same irritating password remember feature as in IE. This should not be a default-on option, the security risk is huge, whoever made that mistake at MS ought to be fired. Why do we continue it?

    2) Drop the in-jokes please. Calling everything "GNU-" putting funny little things in the help files etc. etc. etc. we want to convince people that we're making a professional quality product. And nothing spoils that faster than giving the appearance of a hack.

    and my suggestion to the non-developing members of the community would be:

    spending some of your time filling out bug reports and posting (well thought out, politely worded) suggestions is much more effective than posting "linux roolz" on public news services.

    here on Slashdot we like to speculate that Microsoft has hired a group of people to spread anti-opensource FUD in our midsts. the lamers who do nothing but insult "Micro$oft" all the time are the free equivalent.

    --
    In Capitalist America, bank robs you!
  5. RPM is the standard, and APT works on it by Nailer · · Score: 3, Informative

    Anyone running Red Hat 7.2 or many other RPM based distributions can easily install apt (or a similar tool, like urpmi, tho I prefer apt) to do the same thing.

    The advantage there is that RPM is a standard - currently the older RPM (version 3) is included in the Linux Standards Base, but once Maximum RPM is updated for RPM 4, its extremely likely that RPM 4 will become the standard.

    If you're using Red Hat I highly recommend installing it.

    rpm -Uvh http://enigma.freshrpms.net/pub/apt/apt-0.3.19cnc5 5-fr7.i386.rpm

    apt-get check
    apt-get update
    apt-get install

  6. Re:/usr/local obsolete? by cy · · Score: 2, Informative
    /opt is not mentioned as far as I can see. I remember reading that it was deprecated.

    /opt is not deprecated. In fact it is required that LSB compliant applications are installed under /opt You can download the latest version of the FHS here and the LSB specification here.

  7. /opt is in FHS by Skapare · · Score: 5, Informative

    /opt is in FHS 2.2 at secton 3.12. It begins:

    3.12.1 Purpose

    /opt is reserved for the installation of add-on application software packages.

    A package to be installed in /opt must locate its static files in a separate /opt/<package> directory tree, where <package> is a name that describes the software package.

    Doesn't look very depricated to me. I think the problem is your FHS link isn't really the FHS; it is the SAG (Systems Administrator Guide), which in section 4.1 clearly says it is loosely based on the FHS.

    As for /usr/local, I do agree it should be off-limits to the distribution (besides setting it up if not already present). And packages in the package format of the distribution (e.g. RPM for Redhat, Mandrake, SuSE, etc ... DEB for Debian and any like it ... TGZ for Slackware ... and so on) really should stay out of /usr/local. What /usr/local should be is whatever is local policy (FHS doesn't say it this way). Packages that the administrator really wants to be separate from the package management system, stuff compiled from source, stuff locally developed, all is eligible to be in /usr/local. My guess is the author of the article has no experience doing system administration combined with a decision making role where he might have to choose to do something slightly different than what everone else does.

    --
    now we need to go OSS in diesel cars
  8. Re:On GCC and others of the same ilk. by jdh28 · · Score: 2, Informative

    I think the reason GNU stuff defaults to /usr/local is because it comes from a background where most people would be installing the GNU utilities on UNIX systems that had vendor supplied utilities like rm, etc.

    john