install

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

Auto update Ubuntu PXE files

Update script
wget https://raw.githubusercontent.com/panticz/preseed/master/pxe/scripts/update.ubuntu.pxe.files.sh -O - | bash -

#!/bin/bash

MIRROR=http://archive.ubuntu.com/ubuntu/dists/SUITE/main/installer-ARCH/current/images/netboot/ubuntu-installer/ARCH
TFTPDIR=/var/lib/tftpboot/ubuntu/SUITE/ARCH

download() {
  SUITE=$1
        ARCH=$2
  FILE=$3
  
  echo -n "    - $3"

  MIRROR1=${MIRROR//SUITE/$SUITE}
  MIRROR_TMP=${MIRROR1//ARCH/$ARCH}

  TFTPDIR1=${TFTPDIR//SUITE/$SUITE}
  TFTPDIR_TMP=${TFTPDIR1//ARCH/$ARCH}

  if [ ! -d $TFTPDIR_TMP ]; then
    mkdir -p $TFTPDIR_TMP
  fi
  
  wget --quiet $MIRROR_TMP/$FILE -O $TFTPDIR_TMP/$FILE

  if [ $? == 0 ]; then
    printf "%20s\n" "OK"
  else
    printf "%20s\n" "ERROR"
    echo "$MIRROR_TMP/$FILE"
  fi
}

echo "Update Ubuntu netboot files:"
for SUITE in oneiric precise quantal; do
  echo "+ $SUITE"

  for ARCH in i386 amd64; do
    echo "  + $ARCH"
  
    for FILE in linux initrd.gz; do
      download $SUITE $ARCH $FILE
    done
  done
done

Create cronjob
wget https://raw.githubusercontent.com/panticz/preseed/master/pxe/scripts/update.ubuntu.pxe.files.cronjob -O - /etc/cron.d/update.ubuntu.pxe.files.cronjob; chmod a+x update.ubuntu.pxe.files.cronjob

#!/bin/sh

echo "update.ubuntu.pxe.files.cronjob $(date -I)" > /var/log/update.ubuntu.pxe.files.log

wget --quiet https://raw.github.com/panticz/preseed/master/pxe/scripts/update.ubuntu.pxe.files.sh -O - | bash -

Configure PXE
wget https://installit.googlecode.com/hg/preseed/preseed.precise.i386.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.precise.i386.conf
wget https://installit.googlecode.com/hg/preseed/preseed.precise.amd64.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.precise.amd64.conf
wget https://installit.googlecode.com/hg/preseed/preseed.quantal.i386.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.quantal.i386.conf
wget https://installit.googlecode.com/hg/preseed/preseed.quantal.amd64.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.quantal.amd64.conf

vi /var/lib/tftpboot/default
MENU SEPARATOR
MENU BEGIN
MENU TITLE + Preseed
MENU INCLUDE pxelinux.cfg/preseed.oneiric.i386.conf
MENU INCLUDE pxelinux.cfg/preseed.oneiric.amd64.conf
MENU INCLUDE pxelinux.cfg/preseed.precise.i386.conf
MENU INCLUDE pxelinux.cfg/preseed.precise.amd64.conf
MENU INCLUDE pxelinux.cfg/preseed.quantal.i386.conf
MENU INCLUDE pxelinux.cfg/preseed.quantal.amd64.conf

MENU SEPARATOR
LABEL Back
MENU EXIT
MENU END

Install androidscreencast under Ubuntu

# install android sdk

# install java
wget http://dl.dropbox.com/u/4170695/scripts/install.sun-java6-jre.sh -O - | bash -

# set path to android sdk
PATH=$PATH:~/android-sdk-linux_86/tools

# start android sdk server
adb start-server

# start androidscreencast
wget http://androidscreencast.googlecode.com/svn/trunk/AndroidScreencast/dist/androidscreencast.jnlp -P ~/
javaws ~/androidscreencast.jnlp

# Links
http://code.google.com/p/androidscreencast/

Install Eclipse

wget -q https://raw.githubusercontent.com/panticz/installit/master/install.eclipse.sh -O - | bash -

#/bin/bash

# download link
if [ "$(uname -m)" == "x86_64" ]; then
  # 64 bit
  if [ "$1" == "-e" ]; then
    URL=http://mirror.netcologne.de/eclipse/technology/epp/downloads/release/neon/R/eclipse-jee-neon-R-linux-gtk-x86_64.tar.gz
  else
    URL=http://mirror.netcologne.de/eclipse/technology/epp/downloads/release/neon/R/eclipse-java-neon-R-linux-gtk-x86_64.tar.gz
  fi
else
  # 32 bit
    if [ "$1" == "-e" ]; then
    URL=http://mirror.netcologne.de/eclipse/technology/epp/downloads/release/neon/R/eclipse-jee-neon-R-linux-gtk.tar.gz
  else
    URL=http://mirror.netcologne.de/eclipse/technology/epp/downloads/release/neon/R/eclipse-java-neon-R-linux-gtk.tar.gz
  fi
fi

# install Java JDK
wget -q https://raw.githubusercontent.com/panticz/installit/master/install.java-jdk.sh -O - | bash -

# download new eclipse release
wget -q ${URL} -P /tmp

# backup old release
[ -d /usr/lib/eclipse/ ] && sudo mv /usr/lib/eclipse/ /usr/lib/eclipse.$(date -I)

# install new release
sudo tar xzf /tmp/eclipse-*-linux-gtk*.tar.gz -C /usr/lib/

# set owner and permissions
sudo chown -R root:root /usr/lib/eclipse
sudo chmod -R +r /usr/lib/eclipse

# add executable to path
cat <<EOF> /tmp/eclipse
#!/bin/sh
export ECLIPSE_HOME="/usr/lib/eclipse"

\${ECLIPSE_HOME}/eclipse $*
EOF

sudo mv /tmp/eclipse /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse

# fix UI bug on Debian Wheezy
. /etc/os-release
if [ "${ID}" == "debian" -a "${VERSION_ID}" == "7" ]; then
  sudo sed -i '3i export SWT_GTK3=0' /usr/bin/eclipse
fi

# create starter
cat <<EOF> /tmp/eclipse.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=/usr/lib/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true
EOF

sudo mv /tmp/eclipse.desktop /usr/share/applications/eclipse.desktop
sudo chmod +r /usr/share/applications/eclipse.desktop

# configure memory
sudo sed -i 's|-Xmx384m|-Xmx1024m|g' /usr/lib/eclipse/eclipse.ini

# clean up
rm /tmp/eclipse-*-linux-gtk*.tar.gz

Git plugin
# http://www.vogella.com/tutorials/EclipseGit/article.html
http://download.eclipse.org/egit/updates

WindowBuilder (Java GUI creator plugin)
http://www.eclipse.org/windowbuilder/

sudo eclipse
install new software:
http://download.eclipse.org/windowbuilder/WB/release/R201209281200/4.2/

Global settings
/usr/lib/eclipse/eclipse.ini

OPTIONAL: change editor line break to 240 char
Project > Properties
Configure Worksapece Settings
Edit
Line Wraping
Maximum line widht: 240

Links
http://www.youtube.com/watch?v=WY9QbOdWkn0 - create Java Gui Tutorial (german)
http://code.google.com/intl/de/eclipse/docs/install-eclipse-3.5.html
http://sourceforge.net/projects/shelled/

Fix unable to shutdown / reboot / logout when OpenOffice Quickstarter is active

Here is a quick fix for OpenOffice bug reported on Launchpad https://bugs.edge.launchpad.net/ubuntu/+source/openoffice.org/+bug/562027 that prevent Gnome logout if Quickstart is running.

Solution: change DocumentStoreUIEnabled in Recovery.xcu (OpenOffice) or main.xcd (Libreoffice) to false with this command

wget http://dl.panticz.de/libreoffice/scripts/DocumentStoreUIEnabled_false.sh -O - | bash -

#!/bin/bash

if [ -d /usr/lib/libreoffice ]; then
    # libreoffice
    sudo sed -i 's|<prop oor:name="DocumentStoreUIEnabled" oor:type="xs:boolean"><value>true|<prop oor:name="DocumentStoreUIEnabled" oor:type="xs:boolean"><value>false|g' /usr/lib/libreoffice/share/registry/main.xcd
else
    # openoffice
    sudo sed -i '5s|true|false|g' /usr/lib/openoffice/basis*/share/registry/data/org/openoffice/Office/Recovery.xcu
fi

or use Diff to path Recovery.xcu
wget -nv http://dl.dropbox.com/u/4170695/openoffice/Recovery.xcu_DocumentStoreUIEnabled.diff -O - | \
patch -p2 /usr/lib/openoffice/basis3.2/share/registry/data/org/openoffice/Office/Recovery.xcu

Optional: remove user personal Recovery.xcu files
find /home/*/.openoffice.org/ -name Recovery.xcu -exec rm {} \;

Links
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/562027

Download and install Docky Stacks under Ubuntu

wget http://www.panticz.de/sites/default/files/Docky/docky.stacks.install.sh.txt -O - | bash -

#!/bin/bash

wget http://www.panticz.de/sites/default/files/Docky/stacks.tar.bz2 -O /tmp/stacks.tar.bz2
tar xjf /tmp/stacks.tar.bz2 -C /tmp/
cd /tmp/stacks
sudo make install
killall docky
nohup docky > /dev/null &
1

Install Docky under Ubuntu

wget http://dl.panticz.de/scripts/install.docky.sh -O - | bash -

#!/bin/bash

sudo add-apt-repository ppa:docky-core/ppa
sudo apt-get update
sudo apt-get install -y docky

OPTIONAL: configure docky
gconftool-2 -t string -s /apps/docky-2/Docky/Interface/DockPreferences/Dock1/Autohide "Intellihide"
gconftool-2 -t bool -s /apps/docky-2/Docky/Interface/DockPreferences/Dock1/FadeOnHide true
gconftool-2 -t float -s /apps/docky-2/Docky/Interface/DockPreferences/Dock1/FadeOpacity 0.4
gconftool-2 -t int -s /apps/docky-2/Docky/Interface/DockPreferences/Dock1/IconSize 24
gconftool-2 -t bool -s /apps/docky-2/Docky/Interface/DockPreferences/Dock1/IndicateMultipleWindows true
gconftool-2 -t bool -s /apps/docky-2/Docky/Items/DockyItem/ShowDockyItem false

gconftool -s --type string /apps/docky-2/Docky/Items/DockyItem/DockyItemCommand 'gnome-terminal --geometry 177x47+0+0'

Add Gnome menu to Docky
sudo apt-get install -y xdotool
gconftool -s --type string /apps/docky-2/Docky/Items/DockyItem/DockyItemCommand 'xdotool key -clearmodifiers alt+F1'

Links
http://wiki.ubuntuusers.de/Docky

Install neatx

# server
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:freenx-team
sudo apt-get update
sudo apt-get install neatx-server

# client
http://www.nomachine.com/download-client-linux.php
wget http://64.34.161.181/download/3.4.0/Linux/nxclient_3.4.0-7_i386.deb -P /tmp
sudo dpkg -i /tmp/nxclient_*.deb

# printing
sudo chmod 755 /usr/lib/cups/backend/ipp

# Links
http://www.griessler.org/neatx-freenx-server-auf-ubuntu-10-04-lucid-lynx.php

Install NetBeans

wget https://raw.githubusercontent.com/panticz/installit/master/install.netbeans.sh -O - | bash -

#!/bin/bash

if [ "$1" == "-j" ]; then
  # Java SE only
  URL=http://download.netbeans.org/netbeans/8.2/final/bundles/netbeans-8.2-javase-linux.sh
else
  # with all included programming languages
  URL=http://download.netbeans.org/netbeans/8.2/final/bundles/netbeans-8.2-linux.sh
fi

# install Java JDK
wget -q https://raw.githubusercontent.com/panticz/installit/master/install.java-jdk.sh -O - | bash -

# download and install netbeans from homepage
wget -q ${URL} -O /tmp/netbeans-linux.sh
sudo bash /tmp/netbeans-linux.sh --silent

# cleanup
rm /tmp/netbeans-linux.sh

# configure jdk
echo netbeans_jdkhome="/usr/lib/jvm/java-8-oracle" >> /usr/local/netbeans-8.2/etc/netbeans.conf

Add git repository
https://www.youtube.com/watch?v=mzzAUEFS4vs
https://netbeans.org/kb/docs/ide/github_nb_screencast.html

OPTIONAL: install MySQL driver
sudo apt-get install libmysql-java

DEP: fix ubuntu locale settings for german
sed -i 's|en_US.UTF-8|de_DE.UTF-8|g' /etc/scim/global

DEP: disable compiz effects (Visual Effects (System > Preferences > Appearance > Visual Effects => none)
metacity --replace &

Fix bold fonts under Linux
sudo apt-get remove -y fonts-unfonts-core

Ansible role
git clone https://github.com/panticz/ansible.git /tmp/ansible
cd /tmp/ansible/
export ANSIBLE_ROLES_PATH=$(pwd)/roles
ansible-playbook -K /dev/stdin <Links
http://www.techytalk.info/netbeans-cannot-find-java-please-use-jdkhome-switch/ - HowTo (re)configure JAVA JDK
http://wiki.netbeans.org/NBPackagingPlan

APC Back-UPS ES 700G under Ubuntu

# install
apt-get install -y apcupsd

# configure
sed -i 's|UPSCABLE smart|UPSCABLE usb|g' /etc/apcupsd/apcupsd.conf
sed -i 's|UPSTYPE apcsmart|UPSTYPE usb|g' /etc/apcupsd/apcupsd.conf
sed -i 's|DEVICE /dev/ttyS0|DEVICE|g' /etc/apcupsd/apcupsd.conf
sed -i 's|ISCONFIGURED=no|ISCONFIGURED=yes|g' /etc/default/apcupsd

# start apcupsd demon
/etc/init.d/apcupsd start

# get status
apcaccess status

# configure
/etc/init.d/apcupsd stop
apctest

# monitor
tail -f /var/log/apcupsd.events

# OPTIONAL: configure /etc/apcupsd/apccontrol

# LINKS

Syndicate content