Re: Bug in cdd-update-menus
On Tue, Apr 20, 2004 at 12:49:27PM +0200, Andreas Tille wrote:
> > If in Xsession.d, it would update menus before X session started :)
> I thought this but do you think it is sane to run update-menus at every
> start of an X session? I've though some "cached" files would be used.
among the paramenters of update-menus, there is one that do not read
/usr/lib/menu stuff, but only ~/.menu/, I do not know if it does what we
want, I think so.
update-menus --nodefaultdirs --menufiledir ~/.menu/
should update only menus in ~/.menu, try -v for verbose output.
I cannot test it now, but it quicker then the simply "update-menus".
> You must know that my older code was based on the principles of a
> physicist (as I am): Just get it working. Your approach is much
> better here.
Computer scientist approch ;)
> On the other hand I do not want to miss the functionality of having the
> user menus updated. So I would love if we could find a (temporary) agreement
> which is in any case better than in cdd-0.2 where this is solved dirty
> as you know even if not perfect in the sense you described above.
>
> Any suggestions?
A temporary (the quickest) solution is surely use /bin/su.
Could you do it in postinst instead of in cdd-update-menus?
you could do something like:
--------
source /etc/cdd/cdd.conf
source /etc/cdd/men/med.conf # if present
for ROLE in `getCDDRoleList med`; do
for CDDUSER in `getUsersInRole med ${ROLE}`; do
su ${CDDUSER} -c "update-menus"
done
done
--------
it should work, updateing menus for any user covering a role in med CDD.
anyway, it's the same code from updateCDD in share/cdd/cdd-update-menus
obviously cdd.conf and med.conf have to be present before the code
execution.
c.
Reply to: