How to initialize some shellscript with XFCE

Brian J. Tarricone bjt23 at cornell.edu
Tue May 24 09:57:46 CEST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sami Samhuri wrote:
> * On Mon May-23-2005 at 10:34:04 PM -0700, Keith Dart said:
> 
>>On Mon, 23 May 2005, Stefan Stuhr wrote:
>>
>>
>>>man, 23 05 2005 kl. 14:49 -0300, skrev Thyago Duque:
>>>
>>>>I need some help.
>>>>I want to know how do I can initialize some
>>>>shellscript every time when xfce is initialized and
>>>>how can I program some aplications to open with xfce.
>>>
>>>Put the shellscripts in ~/Desktop/Autostart/
>>
>>Do shell environment variables that are exported there get inherited by 
>>the rest of xfce and other spawned programs?
> 
> Only processes fork()ed from that script/program will inherit it's
> environment. Changes to a process' environment do _not_ propagate to existing
> processes.
> 
> If you want some env vars to be global to Xfce then I would suggest
> using a modified version of ${prefix}/bin/startxfce4 (perhaps in ~/bin
> or something else in your path. must be BEFORE ${prefix}/bin). If you
> do this and use the session manager make sure the variables are exported
> before it is started.

Please don't do stuff like this.  It's not persistent across upgrades,
and there's no need to do it.  Copy $sysconfdir/xdg/xfce4/xinitrc to
~/.config/xfce4/, and edit it to your needs.  Note that, if you launch
an app here, and that app modifies *its* environment, that's not going
to do what you want.  The only way to get what you want is if your app
launches the rest of Xfce itself, or outputs stuff as it exits, which
you can 'merge' into the environment using 'eval'.  See how the stock
xinitrc uses 'eval' with dbus-launch and ssh-agent (or one of them; I
don't recall if both use it).

	-brian

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCkt566XyW6VEeAnsRAieXAJ9JAxnQ8sqSjWDj+62ocYYseTFqFgCeOdg4
/1vqaVOoFj4QQIZuseCv68w=
=EtA7
-----END PGP SIGNATURE-----



More information about the Xfce mailing list