[plug] Some debian on a G4 ibook questions
Cameron Patrick
cameron at patrick.wattle.id.au
Sun Aug 1 17:24:15 WST 2004
Michael Hunt wrote:
> [Debian Sarge on an iBook]
I'd highly recommend checking out the archives for debian-powerpc. I
almost bought an iBook recently, and looking at the debian-powerpc
archives told me what I could expect to have work and what wouldn't.
It sounds as though wireless and suspend aren't supported yet, and the
wireless is never likely to be -- the answer seems to be to buy an
external USB wireless dongle instead of an Airport Express. (Although
the older Airport cards are supported, since this is an Apple machine
you won't be able to put one into a G4 iBook -- it's Airport Extreme
only.)
> (b) On the subject of MOL how do I get it to run as a windowed app
> instead of full-screen on a separate terminal. I suspect that the
> following error has got something to do with it :-
> [...snip...]
> Looks like some Xauth issue. Anyone know where I might change this ???
Not knowing anything about MOL, I'll hazard a guess: does it run as
root? If so, you'll need to set the XAUTHORITY environment variable
to something sane; e.g. export XAUTHORITY=/home/cameron/.Xauthority
> (e) Are there any apps for turning off the track pad when you are
> typing ??? I keep getting the mouse moving and placing my cursor
> elsewhere in my text when entering my notes. Very annoying !!!
Probably, by loading/unloading the module for the trackpad. (I've
attached a script which does it on my Intel-based laptop; change
'psmouse' to something appropriate and configure it to be launched on
a convenient button.)
> (f) What are people using for maintaining different profiles/setting say
> when connected to a LAN at home, work, wireless or standalone ??? I have
> found some Debian packages that do this but I was wondering what other
> people were doing.
I have a hideous script (attached) which Works For Me, bypassing the
standard debian stuff entirely. It was based partly on one written by
Bernard, so I'm continuing the tradition and passing it on... It
might serve as an inspiration to others (if only to proclaim, "eww,
I'm never touching a shell script written by Cameron ever again" :-P).
> (g) Anyone managed to get sleep/hibernation working with the ibook ???
It should be possible to get swsusp working on an iBook -- but it will
require kernel patching.
> (h) Non ibook question. Are any sarge/sid users experiencing long delays
> in the Gnome splash screen disappearing ??? Sometime it can take up to
> two minutes for it to disappear.
Is your default X window manager set to something sane (e.g. metacity)?
update-alternatives --config x-window-manager to set it.
Cameron.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: touchpad.sh
Type: application/x-sh
Size: 93 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20040801/c9868141/attachment.sh>
-------------- next part --------------
#! /bin/sh
#
ALL_INTERFACES="eth ethwifi ppp0 tun1"
WWWOFFLE_CONF="/etc/wwwoffle/wwwoffle.conf"
LOCATION_FILE="/etc/net.location"
NETWORK_D="/etc/network-settings"
DEBIAN_MIRROR="http://ftp.uwa.edu.au/mirrors/linux/debian"
DEBIAN_MIRROR_DISTS="sid sarge woody"
ETH_IFACE=eth
ETH_DRIVER=8139too
WIRELESS_IFACE=ethwifi
WIRELESS_DRIVER=ipw2100
kill_network ()
{
local x
for x in $ALL_INTERFACES; do
dhclient3 -q -r $x
done
killall dhclient3 >/dev/null 2>/dev/null
killall openvpn >/dev/null 2>/dev/null
killall pppd >/dev/null 2>/dev/null
rmmod $ETH_DRIVER >/dev/null 2>/dev/null
rmmod $WIRELESS_DRIVER >/dev/null 2>/dev/null
}
bring_up_network ()
{
if [ "$IFACE_TYPE" = "wireless" ]; then
modprobe $WIRELESS_DRIVER
else
modprobe $ETH_DRIVER
fi
nameif -s
ifconfig $IFACE up
if [ "$IFACE_TYPE" = "wireless" ]; then
test -z "$WIRELESS_MODE" && WIRELESS_MODE="managed"
test -z "$WIRELESS_ESSID" && WIRELESS_ESSID="any"
test -z "$WIRELESS_KEY" && WIRELESS_KEY="off"
iwconfig $IFACE mode $WIRELESS_MODE
iwconfig $IFACE essid $WIRELESS_ESSID
iwconfig $IFACE enc $WIRELESS_KEY
iwconfig $IFACE txpower on
iwconfig $IFACE txpower auto
iwconfig $IFACE power on
fi
echo -n " Searching for server on $IFACE ... "
if dhclient3 -q $IFACE; then
echo "done."
else
echo "Failed to bring up network."
exit 1
fi
}
configure_proxy ()
{
if ! test -f $WWWOFFLE_CONF.in; then
echo "$WWWOFFLE_CONF.in doesn't exist, cowardly refusing to"
echo "overwrite existing wwwoffle config."
fi
cat $WWWOFFLE_CONF.in | sed "s|@WWWOFFLE_PROXY@|$WWWOFFLE_PROXY|g" >$WWWOFFLE_CONF
chown root:proxy $WWWOFFLE_CONF
chmod 640 $WWWOFFLE_CONF
echo -n " Reloading wwwoffle proxy ... "
/etc/init.d/wwwoffle reload >/dev/null
if [ "$LOCATION" = "offline" ]; then
wwwoffle -c $WWWOFFLE_CONF -offline >/dev/null
echo "offline."
else
wwwoffle -c $WWWOFFLE_CONF -online >/dev/null
echo "online."
fi
}
configure_ntp ()
{
if test -n "$NTP_SERVER"; then
ntpdate $NTP_SERVER
fi
}
configure_apt_sources ()
{
local dist
if ! test -f /etc/apt/sources.list.extra; then
echo "No extra APT sources provided, cowardly refusing to"
echo "overwrite current ones."
return 0
fi
cat /dev/null >/etc/apt/sources.list
for dist in $DEBIAN_MIRROR_DISTS; do
echo "deb $DEBIAN_MIRROR $dist main contrib non-free" >>/etc/apt/sources.list
echo "deb-src $DEBIAN_MIRROR $dist main contrib non-free" >>/etc/apt/sources.list
done
if test -z "$NO_EXTRA_SOURCES"; then
cat /etc/apt/sources.list.extra >>/etc/apt/sources.list
fi
}
wait_for_interface ()
{
local iface="$1"
until ifconfig $iface > /dev/null 2>&1 ; do sleep 1 ; done
echo -n "$iface up ... "
until ifconfig $iface 2>&1 |grep -q 'inet addr' ; do sleep 1 ; done
}
bring_up_vpn ()
{
if test -n "$PPP_CONNECTION"; then
echo -n " Starting PPP connection to $PPP_CONNECTION ... "
# while true; do
# local status
# nohup pon $PPP_CONNECTION </dev/null >/dev/null 2>/dev/null
# status=$?
# if [ $status -eq 17 ]; then
# echo -n "retry ... "
# elif [ $status -eq 0 ]; then
# echo "done."
# break
# else
# echo "failed."
# return 1
# fi
# done
# fi
setsid pon $PPP_CONNECTION
wait_for_interface ppp0
echo "done."
fi
if test -f "$OPENVPN_CONFIG"; then
echo -n " Starting Open VPN $OPENVPN_CONFIG ... "
if ! openvpn --config "$OPENVPN_CONFIG"; then
echo "failed."
return 1
fi
wait_for_interface $OPENVPN_IFACE
echo "done."
fi
}
read_options ()
{
if test -f "$LOCATION_FILE"; then
. "$LOCATION_FILE"
fi
}
save_options ()
{
cat /dev/null >$LOCATION_FILE
echo "LOCATION=\"$LOCATION\"" >>$LOCATION_FILE
echo "IFACE_TYPE=\"$IFACE_TYPE\"" >>$LOCATION_FILE
echo "IFACE=\"$IFACE\"" >>$LOCATION_FILE
}
print_options ()
{
echo "Setting up networking for location $LOCATION, $IFACE_TYPE interface"
}
parse_args ()
{
while true; do
local x="$1"
shift
if test -z "$x"; then
break
fi
case $x in
wireless)
IFACE_TYPE=wireless
IFACE=$WIRELESS_IFACE
;;
wired)
IFACE_TYPE=Ethernet
IFACE=$ETH_IFACE
;;
nosave)
NO_SAVE_SETTINGS=1
;;
help)
echo "Available locations: " $NETWORK_D/*
echo "Available connection types: wireless wired"
exit 0
;;
*)
LOCATION=$x
;;
esac
done
}
read_options
parse_args $*
if [ "$NO_SAVE_SETTINGS" != "1" ]; then
save_options
fi
print_options
if test -f "$NETWORK_D/$LOCATION"; then
. "$NETWORK_D/$LOCATION"
fi
kill_network
if [ "$LOCATION" != "offline" ]; then
bring_up_network
bring_up_vpn
fi
configure_proxy
configure_ntp
configure_apt_sources
exit 0
# arch-tag: 8226fd24-0865-4382-a148-b4e13d6a1a9f
-------------- next part --------------
# /etc/network-settings/snap
# lightly modified version of what I actually use on my laptop
WIRELESS_ESSID="SNAP"
WIRELESS_KEY="s:12345"
WWWOFFLE_PROXY="proxy = proxy.uwa.edu.au:8888 \n auth-username=patric01 \n auth-password=nottelling"
NTP_SERVER="time.uwa.edu.au"
DEBIAN_MIRROR="http://ftp.uwa.edu.au/mirrors/linux/debian"
PPP_CONNECTION=snap
OPENVPN_CONFIG="/etc/openvpn.configs/euclid.conf"
OPENVPN_IFACE=tun1
More information about the plug
mailing list