[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hook to download git repositories in the user home

Hi Federico

I'm using lightDM, but it can be done with most other display managers: gdm, kdm, .......

in /includes.chroot/etc/lightdm/lightdm.conf

session-setup-script=/usr/share/[your directory]/[script to run]

This is the script that is called from lightdm.conf

includes.chroot/usr/share/[your directory]/[script to run]


# NOTE: this could also be done in your /includes.chroot/etc/skel/[script to run] directory
if [ -d "/home/$USER/[script to run]" ]; then
mkdir /home/$USER/.config/[your directory]

if [ ! -f "/home/$USER/.config/[your directory]/[script to run]" ]; then

## do your code in here ##

    touch /home/$USER/.config/[your directory]/[script to run]
    chown -R $USER:$USER /home/$USER


Hope this helps.



On Wed, Mar 26, 2014 at 6:26 PM, Federico Bruni <fede@inventati.org> wrote:
Hi Ozi

yes, executing the hook when the user logs on for the first time would be nice. How can I do it?

The script below replies to the other thread I opened, right? I'll reply there...

Il mer, mar 26, 2014 at 5:16 , Ozi Traveller <ozitraveller@gmail.com> ha scritto:
Hi Federico

At the point when that hook is executed is there a user with a home folder?

Maybe you could do it when the user logs on for the first time.

Try this it should give you the text installer.

NB this config script is for veriosn 3.x of Live-build.


set -e

_ARCHIVE_AREAS="main contrib non-free"

lb config noauto \
--mode debian \
--distribution "${_DISTRIBUTION}" \
--debian-installer live \
--architectures "${_ARCHITECTURES}" \
--linux-flavours "${_LINUX_FLAVOURS}" \
--apt-recommends false \
--apt-options "--yes --no-install-recommends" \
--apt-secure true \
--apt-indices false \
--apt-source-archives false \
--archive-areas "${_ARCHIVE_AREAS}" \
--parent-mirror-bootstrap "${_MIRROR_BINARY}" \
--mirror-bootstrap "${_MIRROR_BINARY}" \
--parent-mirror-binary "${_MIRROR_BINARY}" \
--mirror-binary "${_MIRROR_BINARY}" \
--security false \
    --updates false \
--memtest none \
--win32-loader false \
--debug \
--verbose \


On Wed, Mar 26, 2014 at 11:16 AM, Federico Bruni <fede@inventati.org> wrote:
Hi all

I'd like to be able to automatically download some git repositories in the home of the live user and also of any user installed. How can I achieve that?

I've tried this:

but I guess that it's not the right path.
Can you give me some hints?


Reply to: