#!/bin/sh # --- T2-COPYRIGHT-BEGIN --- # t2/package/*/gdm/gdm.postinstall # Copyright (C) 2004 - 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 # --- T2-COPYRIGHT-END --- mkdir -p /etc/D_prefix/dm/Sessions/ echo "Removing all old gdm sessions scripts ..." # we should not delete Default rm -fv /etc/D_prefix/dm/Sessions/[a-z]* echo "Creating gdm session scripts from wm registry ..." for x in /usr/share/registry/wm/* ; do . $x short="`basename $x`" echo " $name ($short) ..." # create the .desktop file cat > /etc/D_prefix/dm/Sessions/$short.desktop <<- EOT [Desktop Entry] Encoding=UTF-8 Name=$short Comment=$name Exec=$exec # no icon yet, only the top three are currently used Icon= Type=Application EOT done