Bug#480223: [Pkg-utopia-maintainers] Bug#480223: Bug#480223: dbus-x11: allow for session.conf in user home directory

2008-05-11 Thread Ludovico Gardenghi
On Sun, May 11, 2008 at 12:46:58AM +0200, Loïc Minier wrote:

  Perhaps you could simply disable the default dbus-launch invocation by
  removing use-session-dbus and then add a custom invocation?

You propose that a user may add a redefinition of OPTIONFILE inside his
.xsessionrc (that is sourced in 40x11-common_xsessionrc) along with a
custom dbus-launch, so when 75dbus_dbus-launch runs it looks inside a
custom OPTIONFILE, does not find the line use-session-dbus and does not
start dbus.

This could work, but it assumes that the xsessionrc file is sourced
before the dbus invocation (I'm not an expert, is this a safe
assumption?). Moreover it forces the user to change the OPTIONFILE
variable (ok, he may create a on-the-fly copy of the system file
stripping the dbus line just before changing the OPTIONFILE). It works,
though it's not very elegant.

I believe that the correct solution would be an upstream change in dbus:
IMHO --session should really check for a user session.conf before using
the system one.

Ludovico
-- 
[EMAIL PROTECTED]#acheronte (irc.freenode.net) ICQ: 64483080
GPG ID: 07F89BB8  Jabber: [EMAIL PROTECTED] Yahoo: gardenghelle
-- This is signature nr. 3949



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#480223: [Pkg-utopia-maintainers] Bug#480223: Bug#480223: dbus-x11: allow for session.conf in user home directory

2008-05-10 Thread Loïc Minier
On Thu, May 08, 2008, Ludovico Gardenghi wrote:
 I agree this does not happen every day... :-) Maybe it's not frequent
 enough for justifying a change, though it seems quite a harmless and
 easy one.

 Perhaps you could simply disable the default dbus-launch invocation by
 removing use-session-dbus and then add a custom invocation?

-- 
Loïc Minier



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Bug#480223: dbus-x11: allow for session.conf in user home directory

2008-05-08 Thread Ludovico Gardenghi
Package: dbus-x11
Version: 1.2.1-2
Severity: wishlist
Tags: patch

The current mechanism for launching dbus at the beginning of a X session makes
it difficult for a user to specify a custom config file. He may add a
dbus-launch with custom options to the .xsessionrc file but
/etc/X11/Xsession.d/75dbus_dbus-launch adds another dbus-launch to STARTUP
without checking anything.

I added a check in this file (patch attached) that passes dbus-launch the
--config-file= option if it finds a ~/dbus/session.conf file. This way, users
can simply create a custom version of the session.conf file and have it loaded
at X startup.

I understand this is a partial fix: it would be nicer to change dbus so to
make it check for a ~/.dbus/session.conf file by default when starting with
--session. Lots of programs check for a ~/.somethingrc file before looking in
/etc/somethingrc. IMHO dbus-daemon should do the same.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-ripieno (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dbus-x11 depends on:
ii  dbus  1.2.1-2simple interprocess messaging syst
ii  libc6 2.7-10 GNU C Library: Shared libraries
ii  libx11-6  2:1.0.3-7  X11 client-side library

dbus-x11 recommends no packages.

-- no debconf information
Ludovico
-- 
[EMAIL PROTECTED]#acheronte (irc.freenode.net) ICQ: 64483080
GPG ID: 07F89BB8  Jabber: [EMAIL PROTECTED] Yahoo: gardenghelle
-- This is signature nr. 3945
--- 75dbus_dbus-launch.orig	2008-04-26 13:12:00.0 +0200
+++ 75dbus_dbus-launch	2008-05-08 19:47:07.295064128 +0200
@@ -5,6 +5,7 @@
 
 STARTDBUS=
 DBUSLAUNCH=/usr/bin/dbus-launch
+DBUSOPTS=
 
 if grep -qs ^use-session-dbus $OPTIONFILE; then
   if [ -x $DBUSLAUNCH ]; then
@@ -12,6 +13,14 @@
   fi
 fi
 
+# If the user has a .dbus/session.conf in its home directory then use it
+# instead of the default session file. -- [EMAIL PROTECTED] 20080508
+
+DBUSUSERSESSIONCONF=$HOME/.dbus/session.conf
+if [ -f $DBUSUSERSESSIONCONF ]; then
+  DBUSOPTS=--config-file=$DBUSUSERSESSIONCONF
+fi
+
 if [ -n $STARTDBUS ]; then
-  STARTUP=$DBUSLAUNCH --exit-with-session $STARTUP
+  STARTUP=$DBUSLAUNCH $DBUSOPTS --exit-with-session $STARTUP
 fi


Bug#480223: [Pkg-utopia-maintainers] Bug#480223: dbus-x11: allow for session.conf in user home directory

2008-05-08 Thread Michael Biebl

Ludovico Gardenghi wrote:

Package: dbus-x11
Version: 1.2.1-2
Severity: wishlist
Tags: patch

The current mechanism for launching dbus at the beginning of a X session makes
it difficult for a user to specify a custom config file. He may add a
dbus-launch with custom options to the .xsessionrc file but


Curious, what custom options do you need to pass to dbus-launch?


Cheers,
Michael

--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#480223: [Pkg-utopia-maintainers] Bug#480223: dbus-x11: allow for session.conf in user home directory

2008-05-08 Thread Ludovico Gardenghi
[I forgot the Cc:, sorry Michael for the double mail]

On Thu, May 08, 2008 at 10:31:05PM +0200, Michael Biebl wrote:

 Curious, what custom options do you need to pass to dbus-launch?

I need a custom session.conf file (so I pass --config-file=...) because
I want one of the users to have his session dbus listen on a TCP port in
addition to the regular BSD socket.

I agree this does not happen every day... :-) Maybe it's not frequent
enough for justifying a change, though it seems quite a harmless and
easy one.

Ludovico
-- 
[EMAIL PROTECTED]#acheronte (irc.freenode.net) ICQ: 64483080
GPG ID: 07F89BB8  Jabber: [EMAIL PROTECTED] Yahoo: gardenghelle
-- This is signature nr. 3946



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]