Tuesday, October 20, 2009

OS X 10.4 nis client

OS X 10.4 nis client
http://zhadum.org.uk/2007/02/16/mac-os-x-and-nis-just-not-good-friends/

Nis on 10.4 is broken and need a script to stop the lgin from locking up.

sudo -s
echo "nohup /usr/local/bin/fix-nis 25 >/tmp/fix-nis.log 2>&1 &" >> /etc/rc.local
chmod +x /etc/rc.local

mkdir /usr/local
mkdir /usr/local/bin/
nano /usr/local/bin/fix-nis

#!/bin/sh
if [ $# -gt 0 ]
then
sleep "$1"
fi

NFSDIR=/home/staff/doug
if [ -d $NFSDIR ]
then
echo "Directory \"$NFSDIR\" exists."
exit 1
fi

killall lookupd
sleep 1
killall -HUP automount
sleep 2

if [ ! -d $NFSDIR ]
then
echo "Directory \"$NFSDIR\" still doesn't exists, retrying."

sleep 10
killall lookupd
sleep 1
killall -HUP automount
sleep 2
if [ ! -d $NFSDIR ]

then
echo "Directory \"$NFSDIR\" still doesn't exists, giving up"
exit 1
fi
fi

echo "Fixed NIS."
exit 0

chmod +x /usr/local/bin/fix-nis


Friday, October 16, 2009

karmic client install

karmic client install script, check getent passwd


First Setup a new local user and wifi (enable for all)
Setup Printer.

Then this




MYSERVER="10.0.0.5"
MYLDAP="dc=cambridge,dc=redballoon,dc=homeip,dc=net"
MYLDAPADMIN="admin"


echo "Acquire::http::Proxy \"http://$MYSERVER:3142\";" | sudo tee /etc/apt/apt.conf &&
sudo apt-get update &&
sudo apt-get -y -q install openssh-server &&
sudo apt-get -y -q install libnss-ldap libpam-ldap nscd
#sudo scp $MYSERVER:/etc/ldap.secret /etc/
## enter only password leave everything else

sudo sed -i -e "s/dc=example,dc=net/$MYLDAP/" /etc/ldap.conf
sudo sed -i -e "s/manager/$MYLDAPADMIN/" /etc/ldap.conf
sudo sed -i -e "s#^uri ldapi://#uri ldap://$MYSERVER#" /etc/ldap.conf
sudo cp /etc/nsswitch.conf /etc/nsswitch.conf.backup &&
sudo sed -i -e "s/compat/files ldap\t#compat/g" /etc/nsswitch.conf
sudo /etc/init.d/nscd restart &&
getent passwd



sudo mkdir /home/staff &&
sudo mkdir /home/students &&
sudo apt-get -y -q -y install nfs-common &&
sudo apt-get -y install autofs &&
echo "/home/staff /etc/auto.nfs.stf --timeout=60
/home/students /etc/auto.nfs.std --timeout=60" | sudo tee -a /etc/auto.master &&
echo "* -fstype=nfs,rw,hard,intr,rsize=8192,wsize=8192,nfsvers=3 $MYSERVER:/home/staff/&" | sudo tee /etc/auto.nfs.stf &&
echo "* -fstype=nfs,rw,hard,intr,rsize=8192,wsize=8192,nfsvers=3 $MYSERVER:/home/students/&" | sudo tee /etc/auto.nfs.std &&
sudo service autofs restart &&
echo "Passwords and Network filesystem DONE"


#echo "$MYSERVER:/home/staff /home/staff nfs udp,defaults 0 0
#$MYSERVER:/home/students /home/students nfs udp,defaults 0 0" | sudo tee -a /etc/fstab &&
#sudo mount -a


sudo wget http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list \
--output-document=/etc/apt/sources.list.d/medibuntu.list &&
sudo apt-get -q update &&
sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring &&
sudo apt-get -q update &&
sudo aptitude -y -q install ubuntu-restricted-extras &&
sudo aptitude -y -q install msttcorefonts googleearth googleearth &&
sudo aptitude -y -q install vlc ffmpeg mplayer mencoder gstreamer0.10-ffmpeg gstreamer0.10-pitfdll gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly gstreamer0.10-ffmpeg libxine1-ffmpeg libdvdread3 libdvdcss2 gnome-do acroread acroread-plugins mozilla-acroread youtube-dl libflashsupport w32codecs x11vnc openoffice.org-ogltrans openoffice.org-java-common &&
sudo apt-get -q -y dist-upgrade

# google chrome
wget http://dl.google.com/dl/linux/direct/google-chrome-beta_current_i386.deb &&
sudo gdebi google-chrome-beta_current_i386.deb

Monday, August 10, 2009

Earcandy

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6E73CA45 && \
echo "# Earcandy
deb http://ppa.launchpad.net/flimm/ppa/ubuntu `lsb_release -cs` main
deb-src http://ppa.launchpad.net/flimm/ppa/ubuntu jaunty main" | sudo tee -a /etc/apt/sources.list && sudo apt-get -q update ; sudo apt-get install earcandy

Monday, July 6, 2009

PUBKEY

KEY=60D11217247D1CFF
gpg --keyserver keyserver.ubuntu.com --recv $KEY && gpg --export --armor $KEY | sudo apt-key add -

Sunday, June 7, 2009

kdenlive 0.7.4 on jaunty

kdenlive 0.7.4 on jaunty


Fixes bluescreen bug.

# change to karmic repos'

sudo -s

cd /etc/apt
cp sources.list sources.list.jaunty

sed -i -e "s/jaunty/karmic/g" ./sources.list
apt-get update
sudo apt-get install kdenlive libmlt++*


#ffmpeg support
sudo apt-get install ffmpeg libavcodec-unstripped-52 libavfilter-unstripped-0 libavformat-unstripped-52 libpostproc-unstripped-51 libswscale-unstripped-0


cp sources.list.jaunty sources.list
apt-get update

Monday, May 18, 2009

kompozer-0.8a4

This worked for my first system, but on other systems is missing mozilla runtime?

echo "sudo apt-get install alien
cd /tmp
wget http://kent.dl.sourceforge.net/sourceforge/kompozer/kompozer-0.8a4-1.fc10.i386.rpm
sudo alien -d kompozer-0.8a4-1.fc10.i386.rpm
sudo gdebi kompozer_0.8a4-2_i386.deb" > kompozer_install.sh
sudo sh ./kompozer_install.sh


Other method

this is a copy'n paste script.

echo 'wget http://downloads.sourceforge.net/kompozer/kompozer-0.8a4-gcc4.2-i686.tar.gz -O /tmp/kompozer-0.8a4-gcc4.2-i686.tar.gz
cd /tmp
tar -xzf kompozer-0.8a4-gcc4.2-i686.tar.gz
sudo cp -r kompozer-0.8a4 /opt/
sudo ln -s /opt/kompozer-0.8a4 /opt/kompozer
echo "[Desktop Entry]
Name=KompoZer
GenericName=Web Authoring System
Comment=Create Web Pages
Comment[es]=Crea páginas web
Comment[it]=Creare pagine Web
Categories=Development;WebDevelopment;Network;
TryExec=/opt/kompozer/kompozer
Exec=/opt/kompozer/kompozer %u
Icon=/opt/kompozer/icons/mozicon50.xpm
Terminal=false
MimeType=text/html;text/xml;text/css;text/x-javascript;text/javascript;application/x-php;text/x-php;application/xhtml+xml;
Type=Application
X-Desktop-File-Install-Version=0.15" | sudo tee /usr/share/applications/kompozer0.8a4.desktop' > /tmp/kompozer_install.sh
sudo sh /tmp/kompozer_install.sh

Tuesday, May 12, 2009

firefox 3.1

This is an old post from a ubuntu forum

http://ubuntuforums.org/archive/index.php/t-947694.html

sudo echo "activate sudo"

echo "deb http://ppa.launchpad.net/fta/ubuntu hardy main
deb-src http://ppa.launchpad.net/fta/ubuntu hardy main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install firefox-3.1

If you don't want to move you icons around and use firefox-3.1b1 as your main browser

sudo dpkg-divert --divert /usr/bin/firefox.ubuntu --rename /usr/bin/firefox
sudo ln -s /usr/bin/firefox-3.1 /usr/bin/firefox



If you want to undo that change
sudo rm /usr/bin/firefox
sudo dpkg-divert --rename --remove /usr/bin/firefox