suspend/hibernation in xfce4-session

Andre Puschmann andre.puschmann at stud.tu-ilmenau.de
Tue Jul 18 14:52:38 CEST 2006


>>>> - no dynamic hal+dbus recognition in Makefile.in
>> You need to edit Makefile.am.  Makefile.in is regenerated whenver
>> autogen.sh is run.  You should use the XDT_CHECK_OPTIONAL_PACKAGE()
>> macro in configure.in.in to detect hal and dbus properly.  I believe
>> thunar uses both of these, so look there for examples of both
>> configure.in.in and Makefile.am.
> 
> jep, i'll have a look at thunar's configure scripts ..

i did it the way thunar does and dbus+hal recognition now works!

>> This is definitely a bad idea security-wise; they should be absolute
>> paths.  What you should do is make it configurable at compile-time via
>> ./configure.  Grep around in one of our configure.in.in files for
>> AC_ARG_WITH and AC_DEFINE - that's how you'd make it configurable.
>> You'd want a hardcoded default in configure.in.in; use whatever appears
>> to be the "normal" location for those commands.  That way, distribution
>> packagers can easily set the location for their packages (since they
>> know where their HAL installs its binaries), by doing something like:
>>
>> ./configure --prefix=/whatever --with-hibernate-command=/sbin/foo
> 
> i'll try this. may be it is possible to figure out with which prefix hal
> is compiled and thus figure out where those scripts use to be?

i added this to configure.in:

dnl Check for suspend command
AC_ARG_WITH([suspend-command],
  AC_HELP_STRING([--with-suspend-command=cmd], [command used to suspend
system (full path with arguments)]),
  [with_suspend=$withval],
[with_suspend="/usr/share/hal/scripts/hal-system-power-suspend"])
AC_MSG_CHECKING([for custom 'suspend' command])
AC_DEFINE_UNQUOTED(SUSPEND_CMD, "$with_suspend", [suspend command])
AC_MSG_RESULT([$with_suspend])

but code which uses SUSPEND_CMD doesn't get it. what am i doing wrong?
i always do a "autoconf && ./configure && make" after i changed
something in configure.in.

regards
andre




More information about the Xfce4-dev mailing list