Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-01-18 19:08:21

guayaseal
Member
Registered: 2022-07-14
Posts: 6

Default configuration pers site (not: per user!)

For a new system one can just create a fake user account, adjust and copy '.config' into /etc/skel'.
I have an old system (created several years ago and upgraded on a regular basis) with several hundred users (it is a template Linux partition copied to many computers, user's account are remote from LDAP, homes are remote over NFS) and several GTK-based desktops (XFCE, MATE, LXDE). I'd like to adjust the default per site XFCE configuration so if someone decides to switch from MATE to XFCE this configuration will be set up as the initial/default one. I'm wondering what is the best /most recommended solution. Thanks for any help!

Offline

#2 2023-01-19 03:02:40

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Default configuration pers site (not: per user!)

Have a read through this thread to see some of the challenges that are present in trying to do this.

On a hunch, I just tried a different approach with some success:

  1. Copied the base/default xfce4 directory structure and files from the account that I wanted to replicate to a central location (/configs/xfce4). I needed to do this while not logged in to the template account (ensuring that xfconf wasn't running as it may be storing some settings in memory).

  2. Changed the file/folder rights to 755 for the whole tree of this defaul file set (so a regular user would have access to them):

    chmod -R 755 /configs/xfce4
  3. Overrode the /usr/bin/startxfce4 script with /usr/local/bin/startxfce4 (because /usr/local/bin is first in my $PATH variable) with the following content:

    #!/bin/bash
    
    # check if ~/.config/xfce4 exists. If not, pre-populate with default data
    if [ ! -d /home/$USER/.config/xfce4 ]; then
       cp -r /configs/xfce4 /home/$USER/.config
    fi
    
    # execute the normal startxfce4 script
    exec /usr/bin/startxfce4

    ...and made the script executable.

Perhaps this can give you an idea of how it might work as a bit of a workaround. Naturally, you will need to fully test this.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB