Jumaat, 29 Januari 2016

XScreenSaver

su -c 'apt-get install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra'

su -c 'apt-get remove gnome-screensaver'

xscreensaver-demo

su -c 'nano /etc/init.d/xscreensaver'

#!/bin/sh
# /etc/init.d/xscreensaver

### BEGIN INIT INFO
# Provides:          skeleton
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Should-Start:      $portmap
# Should-Stop:       $portmap
# X-Start-Before:    nis
# X-Stop-After:      nis
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     true
# Short-Description: Example initscript
# Description:       This file should be used to construct scripts to be
#                    placed in /etc/init.d.
### END INIT INFO

# The following part always gets executed.
echo "This part always gets executed"

# The following part carries out specific functions depending on arguments.
case "$1" in
  start)
    xscreensaver -nosplash

    echo "Starting xscreensaverxscreensaver"
    echo "xscreensaver is alive"
    ;;
  stop)
    echo "Stopping xscreensaver"
    echo "xscreensaver is dead"
    ;;
  *)
    echo "Usage: /etc/init.d/xscreensaver {start|stop}"
    exit 1
    ;;
esac

exit 0

su -c 'chmod 755 /etc/init.d/xscreensaver'

su -c 'update-rc.d xscreensaver defaults'

bashrc dengan lokasi ke binari peribadi

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/Projek" ] ; then
    for apps in /home/dekwan/Projek/*/bin/*;
    do PATH="$apps:$PATH";
    done
fi

Khamis, 21 Januari 2016

xzdec: (stdin): File format not recognized

Problem:

$ tlmgr update --self --all

(running on Debian, switching to user mode!)
xzdec: (stdin): File format not recognized
First directive needs to be 'name', not <html><frameset> <frame id='top' src="http://210.187.26.4/disable/disable.htm?ip=210.187.26.2&type=Anonymizers&url=ossm.utm.my/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb"><noframes> <body>Your browse does not support frame!</body> </noframes> </frameset> </html> at /usr/share/texlive/tlpkg/TeXLive/TLPOBJ.pm line 108, <$fh> line 1.

Solution:

Change repo to other site.

$ tlmgr option repository http://mirror.switch.ch/ftp/mirror/tex/systems/texlive/tlnet

(running on Debian, switching to user mode!)
tlmgr: setting default package repository to http://mirror.switch.ch/ftp/mirror/tex/systems/texlive/tlnet

$ tlmgr update --self --all

Rabu, 2 Disember 2015

Pemasangan Kinect

su -c 'add-apt-repository "deb http://archive.canonical.com/ lucid partner"'

su -c 'aptitude update'

su -c 'apt-get install git cmake build-essential libusb-1.0-0-dev'

su -c 'apt-get install freeglut3-dev libxmu-dev libxi-dev'

su -c 'aptitude install cython cython-dbg cython-doc cython3 cython3-dbg libpython3-dev libpython3.4-dev python3-dev python3.4-dev'

su -c 'aptitude install freeglut3-dev pkg-config'

su -c 'aptitude install openjdk-7-jdk'

su -c 'aptitude install doxygen mono-complete graphviz'

cd <projek dir>

git clone https://github.com/OpenKinect/libfreenect.git

cd libfreenect

su -c 'cp -rfvu platform/linux/udev/51-kinect.rules /etc/udev/rules.d/'

mkdir build

cd build

cmake -L .. -DBUILD_REDIST_PACKAGE=OFF -DCMAKE_BUILD_TYPE=release -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CPACK_DEB=ON -DBUILD_PYTHON=ON -DBUILD_CV=ON -DCYTHON_EXECUTABLE=/usr/bin/cython

make

su -c 'make install'

su -c 'ldconfig /usr/local/lib64/'

cd <projek dir>

git clone https://github.com/OpenNI/OpenNI

cd OpenNI/Platform/Linux/CreateRedist

su -c 'chmod +x ./RedistMaker'

./RedistMaker

cd ../Redist/OpenNI-Bin-Dev-Linux-x64-v1.5.7.10/

su -c './install.sh'

cd <projek dir>

git clone https://github.com/avin2/SensorKinect