Rich Freeman on 9 Nov 2011 05:58:10 -0800


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

[PLUG] Linux EMC and Headless Systems


There was some discussion after last night's meeting about getting
software to work on more minimal installs (no X11, etc).  The specific
software being discussed was linux EMC (used to control CNC machinery
in realtime).  Apparently the ubuntu packages for this tend to pull in
stuff which culminates in a system that ends up with stuff like gnome
and openoffice in order to control a CNC mill.  It seems kind of
bizarre but when one package uses one file out of some other package
these things can spiral out of control pretty easily.

I imagine that many of these principles could be applied to any
distro, but this is something Gentoo actually excels at with its USE
flag features.  When packages have optional features that tend to pull
in other dependencies the distro sets a default but then lets you
override it, setting one flag to switch these kinds of dependencies on
or off system-wide.  So, setting USE=-X can have a big impact on your
footprint (as long as you don't install something that just has to
have X installed).  When packages lack these flags and there is a real
use case for having them the maintainers tend to be sympathetic to
adding them.

Looking at the ebuild on
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?EmcOnGentoo I don't
actually see anything being pulled in which would necessitate a server
actually running X11.  It will end up drawing in gtk+ and some X11
libraries, but that doesn't require you to actually run X (without
doing more testing I can't say whether it would end up pulling in an
X11 server or not).  So, my suspicion is that if their Ubuntu packages
are doing this either their dependencies aren't correct, or Ubuntu
lacks the ability to make the dependencies granular enough.

I think there is also a philisophical difference between Ubuntu and
Gentoo that may be at play.  When I have tinkered with Ubuntu I've
noticed that installing a package tends to configure it to run - if
you apt-get install gdm and reboot you end up with a gdm login screen.
 On Gentoo this is not the case - if you install GDM and reboot you
get a text console - you need to explicitly add it to your runlevels
for sysvinit in order to have it start.  I'm sure Ubuntu has some
standard way to make things not run, and perhaps getting your system
to be headless is just as simple as getting gdm to not run.  That
won't get openoffice off of your hard drive, but it will get X11 out
of your RAM.

Your other option is of course to repackage the software and
better-tune your dependencies.  You may find the ebuild on that page I
linked to useful if you do this since it is fairly human readable,
though you'd have to translate all the dependencies into the
appropriate ubuntu packages.  Or, of course, you could just run Gentoo
- it isn't a bad choice for projects like this.  :)

Rich
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug