Respecting standard X options (diatribe)



Hang on a moment while I don my asbestos suit....

How many of you recall the output of "man X" ?
     Finally, most X programs accept a  command  line  option  of
     -display displayname to temporarily override the contents of
     DISPLAY.  This is most  commonly  used  to  pop  windows  on

Well here is a little experiment for you all.  Consider two
workstations, alpha and beta.  For simplicity, run the following
command in an xterm on alpha:
   [me alpha]$ xhost +

Now consider the following commands run on beta:
   [me beta]$ echo $DISPLAY
   :0.0
   [me beta]$ xterm -display alpha:0.0 &  # Happy
   [me beta]$ kpat -display alpha:0.0 & # Happy
   [me beta]$ /opt/gnome/bin/sol -display alpha:0.0 & # No joy
   Error on option -display: unknown option.
   Run '/opt/gnome/bin/sol --help' to see a full list of available command line options.

Similar results are found when comparing many KDE programs
to their Gnome equivalents.  What gives?  What about all the
other "standard" X options we know and love like setting the
geometry of the windows opened.

Now, while I think GLib is a thing of rare beauty, especially when
imagining GObject as being there already, (seeing the innards of Glib
turned me from a KDE to Gnome fan), I cannot but scratch my head
until I bleed wondering why the hell basic X stuff has been omitted
from almost every Gnome program I test this way.

What next, they won't honor $DISPLAY but always send to `hostname`:0 ?????
Maybe everything will have to run suid 0?

So how do I nicely kick off processes aimed at other displays?  If you
say "shell out, set DISPLAY and then invoke the program" I'll respond:
   1. What, check $SHELL, then if unset, the login shell and
      THEN construct the command according to the syntax of a
      shell than may not even be sh or csh based ?
   2. Shelling rather than exec-ing is a security hole
   3. It's a waste of resources.

Now I'm not posting this to lists that are pro kde or m$, but you can
bet they are going to be laughing about this.  Hopefully someone with
some authority will edit the standards documents on the gnome developer
site and in BIG #FF0000 letters write something like the following:

    Gnome programs should respect the standard switches and options
    that all well-behaved X programs respect.  RTFM X.

Linux-centrisms are bad enough.  32-bit centrisms are awful and will
bite us on the bum.  But this stuff smacks of single-user-itis and
I hadn't even thought to test it before now because it was so basic.
I've put rockets up the arses of programmers working under me for
far less.

I'd really like to see somebody with Gnome's best interests at heart
keep a list of the various applications, with a checklist of good
behaviours: Gnome, X and Unix.  This is, I believe, part of the job
of the Gnome foundation lest they become mere peddlers of substandard
goods, sinning in the same way as our arch-enemy.

And while I'm on the subject of invocation from the command line....
oh, but that's enough for now.  If I don't get this asbestos suit off
soon I'll come down with mesothelioma.

Depressingly, but hopefully,
David
-- 
David T. Bath bathd edipost auspost com au
+613 9204 8713 (W) 0418 316 634 (Mbl)
Quoth the Penguin, "Pay no more"




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]