I have this script to run when I log in as a user. I want it to run
after I boot up into gnome. Where would I place this file? I want gnome
to fire up and then a terminal to pop up and run the following script. I
have given an example of the script below. I've been reading up on how to do this. Would I call the script in xinitr?. with a command something like

xterm &
<your script path and name>

Any suggestions would be great.


#!/bin/bash
# Purpose: Choose which method to get an ip
# - with dhcpcd if at school and eth0 192.168.0.2 for local

echo -n "Press 'd' to choose dhcpcd or 'h' for home use, 'n' for neither "
read answer

if [ "$answer" == "d" ]; then
/sbin/dhcpcd
echo "dhcpcd method chosen"
elif [ "$answer" == "h" ]; then
/sbin/ifconfig eth0 192.168.0.2
/sbin/route add default gw 192.168.0.1
echo "local ip"
else
echo "no connection made"
fi

echo "end of program"



Reply via email to