On Tue, 26 Jan 1999, stef wrote:

> I am exploring linuxconf and evaluate the possibility to provide a
> scheme to write perl modules.  I know this involves providing a perl
> access to the class LINUXCONF_MODULE (using XS or SWIG) but this is
> irrelevant to this list.

This involves access to numerous class in Linuxconf. LINUXCONF_MODULE is a
way to register the basic services of your modules in linuxconf. It is
mainly used to register menu entries and the "main" of your module.

Why is this irrelevant. I think doing a perl binding would promote
linuxconf module development a lot. I know little about perl, though.

One way to create linuxconf modules somewhat cheaply is to use shellmod.
shellmod provide a basic set of bindings (using pipes) to menu, dialogs
and co-manager. Doing a small library for perl is probably all is needed
to build module this way. It is not by far real binding to linuxconf
internal, but at least, modules built this way will fit nicely in
linuxconf and share the same user interface
 
> The result of my preliminary explorations with the included Perl program
> leave me perplex:
> 
>   1/ I noted that under X, the GUI would not accept command name, but numbers only.
>       This is not a problem but is inconsistent with guiapi.sgml:54 

This is probably a flaw in gnome-linuxconf. It should accept both.
Linuxconf is not using text command anymore, but the GUI protocol may have
a life of its own. 

>   2/ I can't make the Sheet command work

This widget is incomplete. Linuxconf does not use it yet. It has only been
implemented in the linuxconf-gui package (in diawxxt/ directory of
linuxconf sources).

>   3/ My program works from X but not from a tty (DISPLAY envar unset!). What do I 
>miss?

Odd. I suspect that your program is talking directly using the GUI
protocol (from your observation above). The GUI protocol is not the
binding you must use. This is a binding between linuxconf DIALOG objects
and the user.

The GUI protocol currently is only used to talk with graphical front-end.
One attempt was done with gecko (redhat 5.1) to build a text based
front-end. With some work, this is feasable and this was discussed some
time ago. The goal was to push all UI in linuxconf as independant
front-end. There are minimal benefits to do that, so it was left for
better days.

To do a real binding for perl, I guess we need embeded perl. I have read
an article in linux journal about this and it seems quite feasable. Doing
that, many linuxconf facilities will become readily available in perl,
such as CONFIG_FILE, VIEWITEMS and all the user interface.

Anyway, I suggest you give a look at the shellmod module and its
documentation as it shows how to do a simple binding for any language, so
at least you can use the linuxconf user interface toolkit.

You will find the help at
http://www.solucorp.qc.ca/linuxconf/help.files/shellmod/intro.html.

Keep us posted!



>   4/ I compiled mailconf and did a local_install of it . I did what says modtutor
>     but
>      a/  linuxconf --modulemain mailconf    returns without doing anything
>      b/  /bin/mailconf                      barks "This program can't be renamed."

I can't replicate this. Doing that here, both cases produced a menu.

...

Ok, I know. Installing mailconf is not enough to have it going. The reason
is that mailconf is part of linuxconf core package and not everyone is
using it (and because linuxconf module packaging is still incomplete). You
must do

        linuxconf --setmod mailconf

after installing. This last step register the module in linuxconf... Some
documentation to review :-(


---------------------------------------------------------
Jacques Gelinas <[EMAIL PROTECTED]>
Check out Linuxconf at http://www.solucorp.qc.ca/linuxconf
New modules: mgettyconf, managerpm


---
You are currently subscribed to linuxconf as: [[email protected]]
To unsubscribe, forward this message to [EMAIL PROTECTED]

Reply via email to