Hi Vincent,

Vincent Lefevre wrote:

> When the user runs a text program that uses the mailcap system (e.g.
> Mutt) in GNU Screen, it is not possible to run as X11 program via the
> mailcap system after the X11 session has changed, because the value
> of $XAUTHORITY has changed. Using a fixed symlink (in a private
> directory, for more security) to the real X authority file, possibly
> depending only on the screen session, and updated via a screen
> wrapper, might work as a work around, but has some limitations
> (e.g. because several screens could be used on several displays)
> compared to the following suggestion.

Could you elaborate?  Currently "run-mailcap" only reads $DISPLAY and
does not write $XAUTHORITY or any other variable, and that actually
seems sensible to me.

By using system(3), run-mailcap leaves the option open of bypassing
the shell and using execve(3) directly when no metacharacters appear,
or compiling mailcap files to bytecode to speed up more complex
entries.  I don't know if either of those would be a net win; I just
mention them to explain why I think that _not_ respecting $SHELL is a
good abstraction.

It sounds to me like your usecase would be better served by teaching
run-mailcap to use some hook to update the environment (but why
run-mailcap and not all the other tools that might launch an X
program, like xdg-open?) or a more rich mailcap syntax that allows
~/.mailcap to override /etc/mailcap in a more complex way.  Or
something like that --- it's not obvious to me since I don't
understand the context yet.

Thanks for writing, and hope that hellps.
Jonathan



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to