title: How can I run a Perl script as root yet still affect user gconf settings
body: <p>THE NEW QUERY: I am trying to make a unified script that initializes a new Ubuntu install to my liking, it must be run under sudo to install packages, but using gconftool-2 to affect gconf setting relies on the dbus session which is not handled properly by the method of simply changing UID in the script alone. Does someone know how to manage to do this?</p>
  
  <p>OLD QUERY: I am writing a Perl script to be executed on first boot of a new Ubuntu install. This is to ease adding repositories, installing packages, and setting gconf settings. My problem is permissions. To install packages I need the script to be executed as sudo, but then the gconftool-2 call act on the root user and not on my personal user.</p>