This is the mail archive of the cygwin-developers@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: setup: icons, shortcuts, and batch files


On Mon, 10 Jul 2000 22:14:49 -0400, you wrote:

>
>I just checked in a patch that teaches setup how to create cygwin.bat
>and link to it both in the start menu and on the desktop.  These links
>also have the new cygwin icon rather than the MS default icon.
>
>I've also updated the dj-setup.exe file on sourceware, which includes
>that plus a fix for a bug Chris found.
>
>http://sourceware.cygnus.com/cygwin/dj-setup.exe
>ftp://sourceware.cygnus.com/pub/cygwin/dj-setup.exe
>
>I'd like to unleash this on the unsuspecting public ASAP, so please
>test this version.  Even if you don't need to actually upgrade, please
>test-install in a temp directory so I can get some feedback.
>
>Thanks!
>DJ

Just tired it, runs wonderfull!

I have seen that you decided to start bash with bash --login.

That was imho a perfect decision which gives me the chance to
contribute some shell code (SMILE).

This is an example profile that goes to /etc and helps setting up the
user's environment:
-------  schnipp
PATH=/bin:/usr/bin:$PATH
unset DOSDRIVE
unset DOSDIR
unset TMPDIR
unset TMP

if [ ! -f /etc/group ]; then
        echo "Creating /etc/group"
        mkgroup -l >/etc/group
fi

USER=`id -un`

# Set up USER's home directory
if [ -z "$HOME" ]; then
        HOME=/home/$USER
fi

if [ -n "$HOMEDRIVE" ]; then
        mount -b -f ${HOMEDRIVE} $HOME
fi

if [ ! -d $HOME ]; then
        mkdir -p $HOME
fi

MAKE_MODE=unix

export MAKE_MODE HOME USER

for i in /etc/profile.d/*.sh ; do
        if [ -x $i ]; then
                . $i
        fi
done
unset i

cd /
------ schnapp

It is now very easy for packages like x11r6 to expand the path when
installed:
/etc/profile.d/x11r6.sh:
------ schnipp
#!/bin/sh
PATH=$PATH:/usr/X11R6/bin
DISPLAY=`hostname`:0
export PATH DISPLAY
------ schnapp

Of course all this all was not my idea, the concept is shamelessly
stolen from redhat-linux. The directory /home should be created in the
dj-setup installation.

If those files are added to setup (or integrated into a
startup-1.0.tar.gz package) then cygwin.bat can be reduced to:

@echo off
chdir \Cygwin\bin
bash --login -i


Michael

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]