Gentoo Wiki ArchivesGentoo Wiki

GNOME_Admin_Guide_quick-n-dirty


Installation

Tips

Administration

Others

edit

Contents

The Wrong Way

Welcome to the wrong place. This short guide will tell you the wrong way to manage the GNU Object Model Desktop Environment quicker than I ever thought possible. I'm sure that following this will give you all sorts of surprises - little quirks here and there that you have to manually fix later, but that's when you go back and read the official guide, right? Or if you want to skip the reading check out Sabayon, which is conceptually the similar to what we are doing in this guide but much nicer!

Introduction

What we're going to do is to create two users, gnome-admin and gnome-scrooge. We'll use gnome-admin to give users some default settings that are pretty darn good, but they have the free agency to change them. Hopefully we won't have to, but we'll have the ability to use gnome-scrooge to lay down the law in case we find that too many users are using inappropriate pictures of Paris Hilton as a desktop background.

The settings that these two accounts will be able to manage effectively are limited mostly to these settings:

That is to say, they can control any settings accessible through through gconf-editor, plus the panels, menus, icons, mimetypes, and a few other trinkets.

GNOME-ADMIN

We'll create gnome-admin and ready the account for administrative use to set default settings for user applications.

useradd gnome-admin -m -g users -G wheel,cron
passwd gnome-admin
# ********
chown gnome-admin -R /etc/gconf/gconf.xml.defaults
ln -s /etc/gconf/gconf.xml.defaults /home/gnome-admin/.gconf
cp -a /etc/gconf/gconf.xml.defaults /etc/gconf/gconf.xml.defaults.orig
echo "exec gnome-session" >> /home/gnome-admin/.xinitrc
chown gnome-admin -R /home/gnome-admin/

From the console you can log in as gnome-admin and start gnome with xinit.


WARNING: You should most positively not log on as gnome-admin while other users are logged on. Furthermore, any action you take as gnome-admin should be deliberate! Do not 'experiment' with this account.


NOTICE: Where users have not set any preferences the preferences you set as gnome-admin will take effect when the user logs on. However, if the user has changed a value from the default and later put it back to the default value, it will have been defined and will not change.


TIP: If you want to reset all of your users' personal settings to the defaults you have defined, it can be done like so:

# Carelessly (as root)
ls -1 /home | while read USER;
if [ ! "${USER}" == "gnome-admin" ] && [ ! "${USER}" == "gnome-scrooge" ]; then
     do
          rm /home/${USER}/.gconf -rf
          echo "Deleted ${USER}'s GNOME settings"
     done
fi

If you want provide default settings for applications which are not managed through gconfd, you'll have to manage it on a per-application basis and it will only apply to new users, but consider the following.

mkdir /etc/skel/.openoffice.org1.9.104
chown gnome-admin -R /etc/skel/.openoffice.org1.9.104
ls -a1 /etc/skel | while read APP; do ln -s /etc/skel/${APP} /home/gnome-admin/

WARNING: Be very deliberate. Clear caches before exiting programs such as browsers and do not store any sensitive passwords.

gnome-scrooge

We'll create gnome-scrooge and ready the account for administrative use to set mandatory settings for user applications.

useradd gnome-scrooge -m -g users -G wheel,cron
passwd gnome-scrooge
# ********
chown gnome-scrooge -R /etc/gconf/gconf.xml.mandatory
ln -s /etc/gconf/gconf.xml.mandatory /home/gnome-scrooge/.gconf
echo "exec gnome-session" >> /home/gnome-scrooge/.xinitrc
chown gnome-scrooge -R /home/gnome-scrooge/

From the console you can log in as gnome-scrooge and start gnome with xinit.


WARNING: You should most positively not log on as gnome-scrooge while other users are logged on. Furthermore, any action you take as gnome-scrooge should be ten times as deliberate as any action you take with gnome-admin! Absolutely do not experiment with this account.


NOTICE: Where users have already set a preference before you set it as gnome-scrooge sometimes the new setting won't take effect as expected - most particularly if you changed the setting while users were logged in and then the user who was logged on tries to change the setting. Users will be able to click around and attempt to change the setting in question, but it won't work for them.


TIP: If you want to ensure that the user settings match the mandatory settings, just so that nothing awkward occurs, it can be done like so:

# As gnome-scrooge
gconftool-2 --dump / > /home/gnome-scrooge/gconf.mandatory
# As root
ls -1 /home | while read USER; 
if [ ! "${USER}" == "gnome-admin" ] && [ ! "${USER}" == "gnome-scrooge" ]; then
     do
          gconftool-2 --load /home/gnome-scrooge/gconf.mandatory \
           --direct --config-source xml:readwrite:/home/${USER}/.gconf
          echo "Bloated the filesystemm with ${USER}'s GNOME settings"
     done
fi

If you want provide mandatory settings for applications which are not managed through gconfd, you'll have to change the permissions on the configuration source in question and copy it on a per-application basis into each user's home directory. It will have to be repeated for new users.

# As root
mkdir /etc/skel.mandatory/.wine -p
chown gnome-scrooge -R /etc/skel.mandatory/
# As gnome-scrooge
ln -s /etc/skel.mandatory/.wine /home/gnome-scrooge/ 
# configure application as appropriate
# As a nightly cron job
chown root -R /etc/skel.mandatory/
find /etc/skel.mandatory/ -exec chmod go-w {}
ls -a1 /etc/skel.mandatory/ | while read APP; do 
    ls -1 /home/ | while read USER; do
        if [ ! "${USER}" == "gnome-admin" ] && [ ! "${USER}" == "gnome-scrooge" ]; then
             do
                 rm -rf /home/${USER}/${APP}
                 cp -a /etc/skel.mandatory/${APP} /home/${USER}/
             done
        fi
    done
done
chown gnome-scrooge -R /etc/skel.mandatory/

WARNING: Be very deliberate. Clear caches before exiting programs such as browsers and do not store any sensitive passwords.

Retrieved from "http://www.gentoo-wiki.info/GNOME_Admin_Guide_quick-n-dirty"

Last modified: Sun, 07 Sep 2008 07:53:00 +1000 Hits: 23,863

Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.