3

What is best practice for creating mandatory or default gconf-profiles using the users environment variables. That would make it easy to maintain system-wide profiles and distribute profiles in a corporate network.

For an example, I want to use a Gconf key where some information is defined by environment variables, the key /apps/evolution/mail/accounts and $USER/$USERNAME:

[<?xml version="1.0"?>
<account name="$(USER)@example.com">
<identity>
    <name>$(USERNAME)</name>
    <addr-spec>$(USER)@example.com</addr-spec>
</identity>
<source>
  <url>imap://$(USER)%
40example.com@imap.example.com/;;use_ssl=when-possible
 </url>
</source>
<transport save-passwd="true">
        <url>smtp://$(USER)%40smtp.example.com;;use_ssl=when-possible</url>
</transport>

</account>
,
]

I believe that I need a subsystem that processes template profiles into something gconfd can use. I have tried desktop-profiles and sabayon without any luck. Evoldap-backend works only for evolution and feels a little overkill even if I end up with LDAP / Gosa or LDAP / phamm for authentication. Mail, IM and VoIP / Telepathy uses only information that is easy reachable from GECOS (/etc/passwd) and standard login environment. It feels more robust to administer one system-wide template than a profile per user.

1

This should be solvable with a simple bash script using standard Linux tools:

  1. Check if the folder /home/"$USER"/.gconf/apps/evolution exists.
  2. If it doesn't exist, copy a template directory over.
  3. Replace the placeholders with sed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.