Samstag, 2. November 2013

=== Exaile Music Player 3.3.2 has arived ===

As i suggested to Dustin Spicuzza he has made a more stable version 3.3.2 ready for installation:

 Highlights:

* Tracks were sometimes selected incorrectly when searching a playlist
* Sometimes the main window wouldn't appear when minimizing to the
system tray
* More tags supported for MP4/M4A/FLAC/OGG files
* Locale bugs when executing --help
* Updated Windows installer dependency download versions
* Fixed plugins: librivox

And as i promised here are the exaile packages for opensuse 12.x and already for 13.1
http://software.opensuse.org/download.html?project=multimedia%3Aapps&package=exaile


Sonntag, 20. Oktober 2013

=== Free your Galaxy Tab 2 ===

First of all i am happy that i finally got rid of that stupid samsung androidlike version and now running a fully optimized android system 4.2.2 as it's meant to be. Android 4.2.2  needs much less power to operate. hence making the battery life from nearly a day up to 4 days.

Read carefully and i really recommend doing the flashing step with linux. i tried it several times with windows 7 and windows 8 but failed. You might
think the windows  way might be the more aproven way to do that. But i failed every single time i tried to do that.

Some additional statement:

  • freeing your phone is easy enough. However you should be fully aware about knowing what you are doing. If anything goes wrong i am not responsible for bricking your device.
  • Make sure that you have a fully charged battery or at least at 80 % battery charge.
  • I will use an external device and install the mod from there.
  • I used opensuse 12.3 for flashing the device with clockworkmod but other *nix based operating systems will also work.

__What we need__
(0) The tablet obviously and an external micro sd card.

(1) Download the clockworkmod

(2) Download the cyanogenmod

(3) [Optional] If you want to use your android devcice with google apps you have to download this from here . However this is not neccessary. There is an gpl alternative package manager for android called f-droid available

(4) Download the heimdall suite

(5) [Optional] If you download the cyanogenmod to pc. And i realy recommend doing that  you need to put the installer together with the clockworkmod to
your device. Install the Software datacable app to your android still 4.0 device 

__How we do it__
(1) [Optional] You should have donwloaded cynogenmod as well as the google apps package to your pc. Make sure these files are not corrupted by verifying it's md5 checksum. You can do this by typing

md5sum Mod.img

After verifying everything is fine you can set up a connection from your pc to your tablet with data cable and send the data to the root tree of your external device.

(2) Untar and verify heimdall. i use the x86 version The x64 did for some reason not work for me. Therefor if you are using x86_64 architecture, on suse
you should do

zypper in libusb-1.0.0-32bit

to install the 32 bit libraries of libusb from suse. rpm -ql libusb-1.0.0-32bit will reveal that the location of the needed library is /usr/lib/libusb-1.0.0.so.0. Simply copy this file (not move!) to the directory where the heimdall binary has been extracted to.

(3) However you obtained the files. Cynogenmod and if needed gapps should be put to the root tree of the external card of your android device. That should
be /mnt/extSdCard.

(4) Power off the device. And keep holding the volume down key. This will boot the Samsung Galaxy Tab into download mode. Accept the disclamer and be aware of the warning. When the tablet is in download mode connect it with the computer using the usb cable shipped by your vendor.

(5) Put the clockworkmod into the same directory where the heimdall binary has been placed. Now execute the following command as root:

heimdall flash --recovery <recovery.img> --no-reboot "

The --no-reboot Option is important since samsung overrites the tablet with it's own bootloader. There should appear a blue gauge indicating that the clockworkmod recovery is transfered and installed.

(6) Now boot the device in to recovery mode. DO NOT REBOOT THE DEVICE. by pressing the Volume up and the Power button.

(7) Select wipe data/factory reset and Install zip from sdcard select the cyanogenmod file and wait until the installation has finished.


After this has finished you may optionaly install the gapps. However there is no need for that.

__Good to know__
If you want to be absolutely free you skip the installation of gapps and just use the f-droid  application manager. Which will give you access to all the free software apps. For example the Hackers Keyboard will give you access to a full featured keyboard as you know it from your computer.

Rooting your device is great but you should however install a firewall and start managing your autostarts. I recommend to you intalling the Autostarts and
the Droidwall package.

Also a backup solution would be great. The best way i found so far is Helium from clockworkmode which will also break my privacy rules. Not very satisfing.

LINKS:
http://wiki.cyanogenmod.org/w/Install_CM_for_p3110
http://download.cyanogenmod.org/?type=stable&device=p3110
http://goo.im/gapps
https://f-droid.org/repository/browse/?fdid=org.fdroid.fdroid&fdpage=8

 



Sonntag, 14. Juli 2013

=== Windows 7 more usable ===

After all these years i am sarting to use windows again. People may laugh at me but windows 7 for example has a lot of advantages to prior version. For instance the Power Shell or the netsh command for configurations of your network interfaces are two pretty neat features Windows has to offer. And as an IT-Pro you can't just ignore windows if you want a job.

Here are 3 awesome free porgrams you could have installed to make the desktop experience a bit better:

 1) Fences

fences

 With Fences you are able to Organize Your Desktop Icons into groups. You create a fence by drawing a bounding box with the right mouse button. Each Fence can be named. And if you are doubleclick on the desktop all icons disapear.

Fences can be downloaded from here

2) Process Explorer

Process ExplorerThe Windows Process Explorer is part of the Microsft Sysinternals Suite which can be downloaded directly from Micorsoft. After unpacking the Suite you might copy this to your C:\Programms folder and adjust your Systems PATH variable. So that you can start programs directly from Start --> Search. Do do so from the desktop do the following: Right-click My Computer and select Properties. Now click on Advanced System Settings and on the In the System Properties window click the Environment Variables button. This will open a box where you can edit the systems path variable. Just open the PATH by double-click on this and add a Value seperated by  ";"(semicolon). After you have started Process Explorer you can use this one and replace the Task Manager. Just use Replace Task Manager from the Options menu of this program.

 3) Better Explorer

Better Explorer

 Better Explorer is an alternative Explorer which uses the Ribbon Style Explorer like in Windows8. The best way to have the best of both worlds. You can download it here.

 

Dienstag, 2. Juli 2013

=== Obtain versions of firefox in linux using python and bash ===

The following code will get you the versions of both: The firefox version currently installed and the one available for update on the server:

01 #!/usr/bin/env python
02 
03 import os
04 
05 # we look and store the local version of firefox in this function
06 def firefox_get_version_string(inputString):
07     firefox_version_string = os.popen(inputString).read()
08 
09 # short name for firefox version number
10     fvn = " "
11
12     for i in firefox_version_string:
13         if i.isalpha() != True and i != "-" :
14            fvn = fvn + i
15
16     return fvn.strip()
17
18
19 firefox_version_remote = (firefox_get_version_string("curl -s -l ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-i686/de/|awk -F "".tar.bz2"" {'print $1'}"))
20 firefox_version_local = (firefox_get_version_string("firefox -v"))
21
22 if firefox_version_remote == firefox_version_local:
23     print("++++++++++++++++++++++++++++++++++++++++++")
24     print("This is a Testphase for autoupdate firefox")
25     print("version is up to date")
26 else:
27     print("++++++++++++++++++++++++++++++++++++++++++")
28     print("This is a Testphase for autoupdate firefox")
29     print("version differs. There might be a newer version available on the remote server")
30     print("consider implementing all of it.")
31     print("for now update must be done manually")

try it and enyjoy. oh and i am using python 2.7.3 by the way.

Mittwoch, 27. März 2013

=== Encrypt and automaticly mount external harddrive with debian ===

In my last blogpost i showed you how you can acutal get your usb devices to be encrypted.

Now let's suppose you have a lot of devices that needs to be encrypted as well as automaticly mounted on boot up.

One Word before we begin. This does only make sense if you fully encrypt your root filesystem. Since we will deploy the keys in here needed to automaticaly mount and decrypt these. If this filesystem is encrypted nobody should be able to access those keys when the disk with main root filesystem isn't mounted.

For this i assume you have a partition /dev/sdb1 on your device which already is encrypted.

(1) First let's figure out the uuid of the harddisk we want to decrypt. Note that we are using the UUID of the partition that was encrypted here not the one where the device gets mapped to.

blkid /dev/sdb1 
>> /dev/sdb1: UUID="056bb8d6-cdf6-4081-23d9-cdef8bf7c18b" TYPE="crypto_LUKS" 

(2) Now as root user we are editing the file /etc/crypttab 

#devicealias #uuid #key  #encrption method
crypt
_sdb1 UUID=<from blkid> /etc/cryptkeys/crypt_sdb1.key luks

(3) Next edit the /etc/fstab accordingly
/dev/mapper/crypt_sdb1    /mnt/Backup    ext4 auto,defaults   0   0

Great we have created the entries in both files. All we need todo is to create the keys. I suggest that you are put keys in /etc/cryyptkeys as i configured the /etc/crypttab but you could of course put them anywhere you like. However if you do this you need to change the entry in the /etc/crypttab file. So create the directory in /etc and make it readable and accessable to group and user root only.

(4) The following command will create a key
dd if=/dev/urandom of=/etc/cryptkeys/crypt_sdb1.key bs=4k count=1
chmod 400 /etc/cryptkeys/*

(5) As the final step add the key to luks. When asked for a password you must enter your current used password you were using when you were encrypting this partition in the first place
cryptsetup luksAddKey /dev/sdb1 /etc/cryptkeys/crypt_sdb1.key

Dienstag, 5. Februar 2013

=== Lockdown USB Devices ===

One fundamental security issue to face is that an unwanted person has usb-access and steal your files or even drop trojans or backdoors on your computer. It seems to be neccessary to lock up the usb devices.

I do this by

(I) whitelist the usbdisk that i had bought.

(II) encrypt the filesystem they are using.

The benefits for this is that only your devices can be used. and that nobody is able to access the usb devices you are using other but you. The disadvantages of this that you are the only person how can transfer data via usb to your pc.

(I)
To lockup and whitelist usb devices i luckily found this article in the internetz. Its a bit diffifcult to understand so will explain here how i did it.

(1) First lockup the usb stack by using the script i wrote Basicaly it disables the kernels access to the usb stack after startup by passing the "0" bit to the specific /sys subsystem located in the files

/sys/bus/usb/devices/usb?/authorized_default

You should copy this script to /etc/init.d/usblock. Note: There is no .sh filename extension and add the script as startup service:

chkconfig -a usblock

At this point you do not need to start the script.

(2) Suppose you have a usbstick which is currently mounted from /dev/sdb1. Best practice would allowing the mapping of the usbstick by using something unique like the usb serial number. To get this number run the following command:

udevadm info -a -n /dev/sdb1|grep ATTRS{serial}

ATTRS{serial}=123456789ABC


(3) Thanks to the article i mentioned above i was able to setup the required udev rule in /etc/udev/rules.d/01-udevlockdown.rules:

+++
# Script by Adrian Crenshaw
## With info from Michael Miller, Inaky Perez-Gonzalez and VMWare
#
## By default, disable it.
ACTION=="add", SUBSYSTEMS=="usb", RUN+="/bin/sh -c 'for host in
/sys/bus/usb/devices/usb*; do echo 0 > $host/authorized_default; done'"
#
## Enable hub devices. There may be a better way than this.
ACTION=="add", ATTR{serial}=="123456789ABC", RUN+="/bin/sh -c 'echo 1>/sys$DEVPATH/authorized'"
## add further lines like above to allow more devices
+++

(4) Now start the usblock "service":

service usblock start
service usblock status

and restart the udev service

service udev restart

and test your result by plugging in the device you just setup and an other usb drive. The result should be that the first one should get mounted normaly according to further udev rules in /lib/udev/rueles.d/ whereas the second device should be ignored.

(5) Whenever you need to add new device rules. Remeber that you first have to disable the usblock by using:

service usblock stop


before you can deploy new whilelist rules following steps 2 to 4.

(II)

(1) To encrypt your usb-sticks you need first to unmount them by using

umount /dev/sdb1

and using luksformat to encrypt and reformat (!) the device. In this step data which is not saved will get lost.

luksformat -t vfat /dev/sdb1

 

thats it for the start of this year. 

Montag, 10. Dezember 2012

This is my bashrc ...

based on debian 7 (wheezy) with systemd


# Dont Save duplicated history lines and remove these form the history file
HISTCONTROL=irgnoredups:erasedups

# show the date and time when the command was actually executed
HISTTIMEFORMAT="%F-%M-%S --> "

# ignore these command and receord them never to the history
HISTIGNORE="su":"su *":"sudo *":"sudo":"his":"his *":"history":"history *":"halt":"reboot":"apt-get *":"apt-cache *":"aptitude *":"dpkg *"

#CDPATH can be confgiured to have a list of fast available and often used paths
#use colons to add more , make sure using the . and .. so you always can cd into a directory whenver it is present in your $PWD and in another
CDPATH=.:..:/usr/share/:/media/:/home/l1zard/workspace/:/media/

# #functions
# this function is to search certain keywords in certain section
section()
{
if [ $# -eq 2 ]
then
apropos $1|grep \^\.\*[[:blank:]]\($2\) || echo "sorry no entry for $1 in section $2"
else
echo "Usgae: section word number"
fi
}


# function traffic lists open ports for user
traffic()
{
ping -c3 google.de && watch -n 10 lsof -i || echo "no network connecttivity"
}

# function to list kernel threads
showthreads()
{
if [ -z "$1" ]
then
ps -A u |sort -k5 -n|awk '{if($5 == 0){print}}'
else

ps -A u|sort -k5 -n|awk '{ if($5 == 0){print }}'| grep $1
fi
}


# function returns status information about the battery health (which is how good the baateries live is in general) and its status (which return how long it takes until the battery needs the next charge)
battery ()
{
case "$1" in
# returns the percentage of battery charge when discharging
"load")
now=$(cat /sys/class/power_supply/BAT0/energy_now)
full=$(cat /sys/class/power_supply/BAT0/energy_full)
out=$(echo $now/$full*100 | bc -l | cut -c 1-5)
echo "Charge: "$out"%"
;;

# returns the battery health. that is the percenatge of the maximal capacity
"health")
design=$(cat /sys/class/power_supply/BAT0/energy_full_design)
current=$(cat /sys/class/power_supply/BAT0/energy_full)
out=$(echo $current/$design*100 | bc -l | cut -c 1-5)
echo "Capacity: "$out"%"
;;

*) echo "Usage: battery load|health"
esac
}


# function cl to list and cd into a directory at the same time
cl()
{
if [ -z $1 ]
then
cd $HOME
ls
else
cd "$1"
ls
fi
echo "Content of $PWD:^^^"
}


# top 10 processes consuming the most cpu-time
top10()
{
if [[ -n $1 && $1 == "-m" ]]
then
ps auxf | sort -nr -k 4 | head -10
else
ps auxf | sort -nr -k 3 | head -10
fi
}

# function to get translate from dings default dictionary
translate ()
{
clear
tr \| \n < /usr/share/trans/de-en|grep --color $1
}

# little function to search for words in rfcs installed locally
rfcfind()
{
zgrep --color $* /usr/share/doc/RFC/rfc-index.txt.gz || echo "no subject found in rfc for $*"
}

# little function to access locally installed rfcs easily
rfc()
{
find /usr/share/doc/RFC/ -name rfc${1}.txt.gz -exec zless {} \; || echo "rfc ${1} does not exist"
}

# function to create and change into a directory in one step
# function adopted from O'Reilly Coookbook
mcd()
{
local NEW_DIR='_command_failed_'
if [ -z "$1" ]
then
echo "mcd: <Datei> [nnn]"
return 1
fi

if [ -d "$1" ]
then
echo "$1 exists"
NEW_DIR="$1"
else
if [ -n "$2" ]
then
mkdir -p -m $1 "$2" && NEW_DIR="$1" || return 1
else
mkdir -p "$1" && NEW_DIR="$1" || return 1
fi
fi

cd "$NEW_DIR"
}


##
# funkctions for systemctl
all()
{
echo "Functions for systemctl to handle more easily:"
echo "failed"
echo "loaded"
echo "masked"
echo "active"
echo "inactive"
echo "waiting"
echo "running"
echo "plugged"
echo "mounted"
echo "exited"
echo "dead"
echo "elpased"
}

failed ()
{
systemctl --no-pager --all|grep --color failed
systemctl --no-pager --all|grep --color error
}

loaded ()
{
systemctl --no-pager --all|grep --color loaded
}

masked ()
{
systemctl --no-pager --all|grep --color masked
}

active ()
{
systemctl --no-pager --all|grep --color active
}

inactive ()
{
systemctl --no-pager --all|grep --color inactive
}

waiting ()
{
systemctl --no-pager --all|grep --color waiting
}

running ()
{
systemctl --no-pager --all|grep --color running
}

plugged ()
{
systemctl --no-pager --all|grep --color plugged
}

mounted ()
{
systemctl --no-pager --all|grep --color mounted
}

exited ()
{
systemctl --no-pager --all|grep --color exited
}

dead ()
{
systemctl --no-pager --all|grep --color dead
}

elapsed ()
{
systemctl --no-pager --all|grep --color elapsed
}
##


# add /sbin to PATH to avoid anoying message
# add ~/bin to PATH
export PATH=$PATH:/sbin:/usr/local/sbin:/usr/sbin:~/bin

test -s ~/.alias && . ~/.alias || true


## make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi

if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'

alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi

## Nice greeting
echo -e '\E[32m Viel Spaß am Gerät!'; tput sgr0
## show the todo script i wrote everytime i open a shell
todo

## aliases set by user
alias df='dfc -sWT'
alias pine='alpine'
alias vimpdf='apvlv'
alias his='history'
alias last10='tail ~/.bash_history'
alias del='rm -i'
alias emacs='/usr/bin/emacs-nox'
alias fstat='stat -c "%a %n"'
alias hd='hexdump -C'
alias nameservers='grep 'nameserver' /etc/resolv.conf'
alias route='route -n'
alias vusers='cut -d: -f1 /etc/passwd'
# aliasses make the live with python more easier
alias py='/usr/bin/python3'
alias pydoc='pydoc3'
alias pyhelp='w3m /usr/share/doc/python3.2/html/index.html || echo "E: python documentation not installed, linked to wrong location or w4m not installed"'
alias ntpdate='/usr/bin/ntpq -p'
alias h='man'
alias lconfig='cd ~/.local_gitrc'
alias release='cat /etc/debian_version'
alias halt='sudo shutdown -P now'
alias reboot='sudo reboot'
alias update='sudo apt-get -y update && sudo apt-get -y --ignore-hold upgrade && sudo apt-get clean && sudo update-command-not-found && sudo  freshclam && sudo -k'
alias netstat='sudo /usr/bin/watch /bin/netstat -patunel'
# aliasses for systemctl
alias systemctl='systemctl --no-pager --all'
alias india='TZ=Asia/Kolkata date'
alias synaptic='gksu synaptic &'
alias deborphan='sudo gtkorphan'
alias gtkorphan='sudo gtkorphan'
alias fusebundlegen='avira_fusebundlegen'
alias howto='w3m /usr/local/share/doc/HOWTO/index.html'

Samstag, 15. September 2012

Color your df command

Working with the shell is good, right?!  It unleashes the power of your operating system and enables you to communicate and interact with the kernel to get informations managed by your system or to tell the system exactly what you want. One information i use quite frequent is how much disk space each file system has left using the df command.

This program shows you a summary on how much disk space you have available on each mounted file system and how much space in total can be used on each mounted file system.

The dfc (df color) command which can be downloaded from here  makes the output of df more colorful and more human readable than the old df one.

df -sW

Once you have finished downloading the the file unpack it:

tar  xvfz dfc-3.0.0.tar.gz

and change into the directory dfc-3.0.0. To install dfc

(1) first create the "build "directory beneath:

(2) Using opensuse install patterns-openSUSE-devel_C_C++ and cmake by issuing

    zypper in patterns-openSUSE-devel_C_C++ cmake

(3) Change into the build directory and issue the following command instructing cmake to create the the make files and configure the source code:

    cmake .. -DPREFIX=/usr/local -DSYSSCONFDIR=/etc -DCMAKE_BUILD_TYPE=RELEASE

(4) Finally compile and install the program by typing:

    make && sudo make instal

(5) If you need Manpages. And i suggest you install them as root user copy the man files from the directory  you unpacked to /usr/local/share/man/man1/ and change the permissions of the dfc.1 file to 755.

    cp /home/hansel/playground/dfc3.0.0/man/dfc.1 /usr/local/man/man1/dfc.1
    chown root:root /usr/local/man/man1/dfc.1 && chmod 755 /usr/local/man/man1/dfc.1

To finally replace the dfc command with the one from the coreutils package you can use an alias. Setting:

    alias df='dfc -sW'

will give you an output like in the picture. Note that the -h option no longer gives you the so called human readable since it is human readable already but does show you the help for dfc. The nice thing is that dfc can actually determine cgroups and so called kernel pseudo file systems which are created by the kernel itself when the system boots up and does'nt show them. To show all File systems including cgroups and kernel pseudo filesystms you can use the -aoption. Also you are able to filter the file system types. For example -t ext4.vfat,ntfs only shows the disk statistics for those particular file systems.

Options:

-h  help
-s  shows a summary and sums up all values used in by the filter
-W displays the full text path of both the mount points and the device files used by the devices
-a show information about all (psuedo file systems included) file systems
-t  filter the output by file system

Also i will build a rpm which unfortunately i am not allowed to provide to due the authors strict copyright. Maybe i can post or link to the spec file.

Donnerstag, 13. September 2012

Getting frozenbyte games to run in opensuse 12.2

For those of you who running opensuse 12.2 and have bought the humble frozenbyte bundle this is a short instruction how you are able to run these games.

Basics:
(1) Install the game in $HOME/trine for example. You have to make sure that the installer is marked executable.  (In fact i will use trine here as my example for this short guide but it works for all other frozenbyte games as well.)

(2) After installing the game go to the destination folder and copy your lib32 folder to lib32_bak
and create a new lib32 folder using mkdir. Replace all libraries in lib32 folder with the one installed
by zypper/yast. Usually these libraries are found in /usr/lib/ and /lib according to FHS and LSB.

    a) If you cannot find a library try to install them natively with zypper and copy them from there
       original places into the lib32 directory.
    b) If  a library is called /usr/lib/libboost_regex.so.1.49.0 but in lib32 libboost_regex.so.1.35.0
       is required just copy /usr/lib/libboost_regex.so.1.49.0 to lib32/libboost_regex.so.1.35.0 in the trine
       install folder.

Most of the addidional libraries can be found in the addidional opensuse repositories. Only libNxCharacter.so, libNxCooking.so, libPhysXCore.so and libPhysXLoader.so.1 are leaved as original. These are the Nvidia PhysX libraries.   

Setting LD_LIBRARY_PATH="/usr/bin:/lib/$HOME/trine/lib32" should also work but causes the game to crash. Also you may want to create symbolic links to these particular libraries instead  of copying them. But i didn't trie this out.

Trine does not save games by default. To get this working you must delete $HOME/.frozenbyte/trine/profile and replace this directory with the one you find in the games destination path which you have had chosen when you issued the installer.

When you start the game do not use the launcher. Just start the game by executing trine-bin32. If you need to make changes use the .frozenbyte/trine/configs/options.txt and configure this file.

To install the games globally i recommend you moving the game folder to /usr/local/games and create the following startscript in /usr/local/bin:

#!/bin/bash
/home/l1zard/bin/trine/trine-bin32

exit 0


For survivor you need a different script:

#!/bin/bash
cd /usr/local/games/survivor
./survivor-bin

exit 0


I don't know why is that

If you want to debug more missing or failed libraries you can issue strace -o trace.log -f -e trace=open,read trine.

What works: Starting and Playing the game.
What does not work: Some Pictures are not rendered and therefore are not shown in sequences.

Freitag, 7. September 2012

Imho Mein erster Eindruck von opensuse 12.2

Alte - und neue Ärgernisse:

Bei der Installation stolpert der Yast Installationsassistent erst einmal wie üblich über meine externe Festplatte
und möchte die auch gerne formatieren statt mein bisheriges Festplattensetup automatisch einzulesen. Gut das war bei vorherigen Versionen auch schon so. Das dann jedoch, nachdem ich dies wie üblich im erweiterten Partitionssetup geändert und entsprechende Mountpunkte für externe Festplatten gesetzt habe, über Softwareauswahl steht "Zugriff auf /media/Pladde1" nicht möglich macht mir das Angst und ich entferne vorsorglich alle externen Festplatten  und USB Sticks. Anschleißend starte ich den Installer noch einmal.

Dabei stelle ich fest dass es keinerlei Setup Möglichkeiten mehr für den Bootmanager gibt. Die eigentliche Installation verläuft dann wie immer so schnell oder so langsam wie immer. Je nachdem ob man mit oder ohne Abbilder installiert. 

Nach der Installation versuche ich die Softwareauswahl anzupassen. Die meiner Meinung nach in der Softwarevorauswahl angewählten überflüssigen Spiele werden deinstalliert. Am Yast2 scheint sich so gut wie nichts geändert zu haben. Und das Gtk-Frontend schmiert mir auch erst einmal ab. Der Fehler lässt sich übrigens reproduzieren und tritt immer dann auf wenn ich meine Software anpassen möchte und mich das Programm darauf aufmerksam macht, dass für eine Aktion weitere Pakete gelöscht bzw. hinzugefügt werden müssen. Neu ist der Fehler auch nicht. Trat er doch zwischenzeitlich nach einem Patch bereits in den Vorgänger-Versionen 11.2 und 12.1 auf. Fenster die vom Yast2 aus aufgerufen werden, werden genau wie in der Vorgängerversion nicht in der vollen Größe geöffnet. Immerhin habe ich jetzt die Möglichkeit diese mit der Maus in die rechte Größe zu zerren, was ich als störend bei der Systemadministration empfinde. So bleibt mir als Workaround vorerst nichts anderes übrig, als auf das Qt-Frontend auszuweichen. Ich deinstalliere yast2-gnome über den Konsolenbefehl und installiere stattdessen yast2-kde4. Dieses Frontend wurde jedoch seit meinem Einsteig in SuSE (damals hieß das noch so)  9.0 kaum verbessert und bei der Softwareauswahl dauern Konfliktlösungen nachwievor unnötig lange und ist meiner bescheidenen Meinung nach lange nicht so komfortabel. Aber das mag auch Geschmackssache sein.

Neues- und Bewährtes

Opensuse  dürfte mit zu den "Early Adoptern" der Software eines gewissen Herrn Poettering gehören. Dessen Systemd mit Journal nun in Version 44 SystemV Init vollständig ersetzt hat. Was nicht so unproblematisch ist wie ich zunächst gedacht hat. In den Releasenotes wird zudem ausdrücklich darauf hingewisen dass System V Init nicht mehr unterstützt wird. Was mich doch ein wenig verwirrt, denn angeblich sollte es doch Abwärtskompatibel sein.

Für den Bootvorgang wird nun Grub 2.0 mit Plymouth eingesetzt, was das den Bootprozess nun wie ein anderes Betriebssystem aus Redmond ausschauen lässt. Ich empfinde das als unnötige Spielerei, da ich beim Booten gerne sehe, was passiert. Zumal ich auch gar nicht so oft boote. Das Yast2 Modul zur Konfiguration von Grub2 wirkt wie mit der heißen Nadel gestrickt und bietet leider keinen Passwortschutz für denselben an. Kein Problem denke ich, wechsele ich auf Grub Legacy und nutze das dort bewährte Tool grub-md5crypt. Ein Wechsel auf dieses Bootsystem führte bei mir allerdings dazu dass das System gar nicht mehr hochkam und den Grub mittels Rescuesystem reparieren  gestaltet sich mit vollverschlüsselten Festplatten doch als schwierig. Um Grub2 besser einzurichten hat Community Member
jdmcdaniel3 das Script grub2cmd geschrieben.. 
Cryptoloop wird ebenfalls als obsolet erklärt und nicht mehr verwendet. Was auch nachzuvollziehen
ist, da es einige bekannte Schwachstellen aufweist.. Wer im übrigen die Mountpunkte seines Usbsticks
sucht findet diese nun unter /run/media/$USER/$LABEL. Hier werden beim Mounten sogenannte Cgroups verwendet um die Sicherheit für vom User angeschlossene USB-Sticks zu erhöhen. Ein Link nach /media zu setzen bringt hier nichts. Da hilft nur die .bashrc anzupassen und die Variable CDPATH=/var/run/media/$USER zu setzen um sich die Tipparbeit zu sparen.

Zypper sieht jetzt schöner aus mit dem Paket zypper-aptitude nun auch komplett kompatibel mit Debians aptitude. Das bedeutde dass sich die komplette Softwareverwaltung nun mit aptitude bewerkstelligen
lässt. Das teste ich auch gleich aus und aptittude search zypper zeigt mir die installierten Pakete in der bekannten "aptitude-Formatierung". Damit zeigen die Entwickler dass auch opensuse schon seit längerem eine schnelle und brauchbare Paketverwaltung besitzt. 

Die Repositorystruktur wurde verändert. So findet man neben updates auch ein extra Verzeichnis für updates-nonoss. Was meines erachtens nur konsequent ist wenn man diese Unterscheidung schon auch im Hauptdistributionsverzeichnis macht. Allerdings will mir nicht in den Kopf was der Gnu(!) Debugger, auch bekannt als ddd in non-free zu suchen hat. Und warum wird autoconf und automake in die Standardauswahl mit einbezogen. Da ich auf Sicherheit setze werden diese Tools erst einmal entfernt. Genauso sinnbefreit finde ich auch die Auswahl von fortune. Dieses Programm erfüllt nun wirklich keinen sinnvollen Zweck. Hier wäre ein Gremium wünschenswert was darüber entscheidet welche Software in die Standardauswahl reingehört und welche nicht wie das von anderen Distributionen bereits gemacht wird.
Fazit:
Die vom Community Manager  Jos Poortvielt angekündigte stabilste Opensuse aller Zeiten bleibt leider aus. In einer als Release markierten Distribution dürfen wichtige Programme nicht mehr reproduzierbar abstürzen. Schon gar nicht wenn sie zum Kern der Distribution als solches gehören. Den User ohne zu fragen auf Grub2 umzuschwenken finde ich fahrlässig. Hier wäre eine Auswahlmenü für den Bootloader sicher hilfreich. Bleibt zu hoffen dass die gröbsten und ärgerlichsten Fehler so schnell wie möglich behoben werden und dann in den nächsten Wochen endlich ein wirklich stabiles Endprodukt abliefert wird. Einige Patches sind auch schon da.

Freitag, 10. August 2012

Autostart a terminal at gnome startup with several tools running

The first thing i do when my linux system is up i open a new terminal and start several tools to monitor my system. Can we start the desktop environment with a shell already running these tools?

Yes we can.

I used this command line:
gnome-terminal --tab-with-profile="Default" -e "systemd-journalctl -f -a" --tab-with-profile="Default" -e htop --tab-with-profile="Default"

and added it as a gnome-session-properties autostart program.
This opens a gnome-terminal with 3 tabs. In each tab running systemd-journalctl, htop and a clear one for further tasks like updating the system. Each tab uses the "Default" profile. The --tab-with-profile="Default" uses this profile in each new tab. The -e Option specifies the program you want to start in this particular tab. Note that if you want to parse options to one of these tools you have to quote them.

You also can combine these tools with pipes and logic operators. If you want for example an autoupdate on a debian based system you could do this by using this autostart command-line:

gnome-terminal -e "sudo apt-get update && sudo apt-get upgrade && sudo apt-get clean && sudo update-command-not-found && sudo -k"

This will update your system as root,- if you have configured your /etc/sudoers file correlatively,- and will close the shell or the tab when the update is finished or cannot be issued.

One last thing that may annoy you is that every time the gnome-terminal does not start in full maximized mode by default. Using gnome-terminal --help-window-options reveals that you simply have to append --maximize to your options.

And it works perfect.

Summary gnome-terminal options:

-e "<Command>" Starts the gnome Terminal with this command executed. Using Quotes is only neccessary if you want to use options or links
several programs together with logical operators.

--tab-with-profile="<Profile>" opens a new tab with the Profile for each time this option is used. After each Option you can pass on the -e to sepcify which
program should be running in each tab.

--maximize start the gnome-terminal maximzed.

Freitag, 9. März 2012

Was heißt hier Wohldefniert?

Zwischendurch auch mal wieder etwas in meiner Muttersprache. Vor einigen Tagen habe ich mich mit einem Freund getroffen. Wir haben über allerlei sinnvolle und weniger sinnvolle Dinge geplaudert. Dabei wurde ich gefragt was es denn in der Mathematik mit der Wohldefiniertheit auf sich hat. Ob man das denn nur so sage oder ob hinter diesem Begriff noch mehr steckt.

Ich möchte das einmal zum Anlass nehmen dies dem geneigtem Leser zu erklären.

In der Mathematik heißt wohldefiniert dass es das beschriebene Objekt auch tatsächlich existiert. (Ein mathematisches Objekt kann eine Zahl, eine algebraische Struktur, eine Funktion oder eine Menge sein. )
Dafür muss durch logische Schlussfolgerung nachgewiesen werden, dass ein solches Objekt auch existiert. Ebenso muss gezeigt werden, dass das gesuchte Objekt eindeutig ist. Dies geschieht ebenfalls durch logische Schlussfolgerungen meist durch den Beweis durch Widerspruch bei dem man einfach das Gegenteil annimmt. Also das es noch mindestens ein weiteres Objekt mit diesen Eigenschaft gibt und daraus einen Widerspruch herleitet.

Bleiben wir einfach einmal bei der Null. Upps ich habe "die Null" gesagt, Dabei wissen wir noch gar nicht,- zumindest in diesem Text, dass es die Null gibt. Dass eine Null gibt, fordern wir einfach aus den Axiomen für natürliche Zahlen und fordern hier einfach die folgende Eigenschaft:

Für jedes Element a dass ich aus der Menge der natürlichen Zahlen herausgreife, existiert ein Element e in der Menge der natürlichen Zahlen mit der Eigenschaft:

a+e=a
e+a=a


Nehmen wir an dieses Element e sei doch nicht eindeutig und wir hätten zwei Elemente mit der Eigenschaft, dann würde gelten dass für jedes Element a dass ich aus der Menge der natürlichen Zahlen herausnehme, ein Element e und ein Element e* in der gleichen Menge existieren mit den Eigenschaften:

a+e*=e*+a=a

a+e=e+a=a

Da nun ja auch unser Element e und e* aus eben der gleichen Menge stammen muss ja auch gelten:

e+e*=e
e*+e=e*

Und da wir nun ja e und e* vertauschen dürfen. (Das dass in der Menge der natürlichen Zahlen erlaubt ist, wurde noch nicht gezeigt. Ich setze dass hier ebenfalls vorraus. Der Beweis ist etwas langwieriger und nutzt die komplette Bandbreite der Axiome der natürlichen Zahlen aus.) folgt daraus, dass

e=e+e*
e+e*=e*

Und nun sieht selbst der mathematisch unbegabte Leser, dass offensichtlich

e=e+e*=e*

gilt und damit e=e* ist und wir uns geirrt haben. Es gibt doch nur eine Null und wir können dieses Element beruhigend mit 0 bezeichnen.

Der geneigte Leser mag sich an dieser Stelle fragen, ob es denn überhaupt so etwas wie nicht wohldefinierte Objekte geben kann. Ich möchte daher ein Beispiel bringen bei dem sowohl die Existenz als auch die Eindeutigkeit verletzt sind.

Zu jedem Element x in der Menge der reellen Zahlen (Das waren die wo auch die Zahl Pie enthalten ist.) ist eine Funktion f(x) definiert als die Zahl y in der Menge der reellen Zahlen für die folgendes gilt:

x=y^2


y ist nicht wohldefiniert. denn zum Einen ist zum Beispiel für x=-1 die Gleichung im Reellen gar nicht lösbar. Solch ein Objekt gibt es also gar nicht und die Existenz ist hier verletzt. Und zum Andern erhält man sowohl für x=3 als auch für x=-3 das gleich Ergebnis. Was der Eindeutigkeit widerspricht.

Wohldefiniertheit hat auch nichts damit zu tun, dass man in einer anderen Menge ein Objekt mit den gleichen Eigenschaften vorfindet. Die Wohldefiniertheit eines Objektes bezieht sich immer auf die Menge bzw. die Axiome aus der diese Objekte gefordert werden. Betrachten wir hier die Menge der Matrizen a(ij). Für diese gibt es zwar immer ein Objekt 0(ij) dass bezüglich der Addition die gleichen Eigenschaften aufweist. Und es gilt hier tatsächlich a(ij)+0(ij)=0(ij)+a(ij)=a(ij)
a(ij)+0(ij)=a(ij)

Allerdings kommen wir auch hier mit der Eindeutigkeit in Schwierigkeiten Denn nimmt man einmal die Elemente a(ij) und b(kl) her in der entweder i nicht gleich k oder j nicht gleich l. Oder sogar beiderseits die Dimensionen nicht stimmen, dann können die zugehörigen neutralen Elemente
0(ij) und 0(kl) nicht gleich sein. Denn für ungleiche Dimensionen lassen sich Matrizen nicht addieren.


Für einen Algorithmus heißt das zum Beispiel dass jedes Mal wenn ich meinen Algorithmus starte. Wenn ich oben A reingieße und unten B rausfällt. Das in Abhängigkeit von diesem A das B was da nach jedem Durchlauf unter raus purzelt eindeutig sein muss. Es kann also nicht auf einmal unten C als Ergebnis stehen. Und vor allem dass ich auch jedes mal ein Ergebnis
erhalte und ich mich nicht irgendwo in einer Endlosschleife festgehängt habe. Das heißt die Ergebnismenge eines Algorithmus A ist wohldefiniert. Dies ist im übrigen der gleiche Grund warum ein Computer nicht in der Lage ist Zufälle zu erzeugen. Ein Zufall, zum Beispiel eine Zahl wird immer aus momentan bestehenden Zuständen einer Turing Maschine berechnet. Gelingt es mir den gleichen Zustand noch ein einmal zu erreichen, erhalte ich denselben Zufall. Dieser Umstand führt übrigens auch dazu dass es so etwas wie den unknackbaren Verschlüsselungsalgorithmus niemals geben wird.

Donnerstag, 16. Februar 2012

etckeeper-ng: Taking the distributed version control to the next level

Update:
A lot has changed since the last time i wrote about this project. First i moved the project to a different github.
Since the project and the code has gotten more complex. i separated etckeepr-ng completely from bashtools and spited up the functions in modularized files. Each function lives in his own file now.
So far i announced version 0.2.1 which is still to buggy for use in a productive environment although i fixed most known bugs i found.
I do have speakable commands now because they are more flexible to add than - options. Type "etckepper-ng help" to view all commands known for etckeeper-ng. There are however some new commands as you might have noticed already. With "reset" at least you are able to reset /etc to the last backed up commit. A smaller command is the "list-excludes" command which simply does a cat on your $EXCLUDEFILE.
Also i wrote etckkerper-ng it is able to parse Variables from the configuration file /etc/keeper.conf
There is a lot todo for now. So if you are a programmer and able to help to hack on etckeeper-ng you are welcome to check out the git repository and ask back for a push request. Also report bugs to me whenever you might find one.

Update:
Santas Hacking night :D
I got the -f option working for backup one single file. I strongly recommend using this for doing backups now every time you change a configuration file. It's a lot faster to backup just one file instead of doing this for the whole /etc all the time. Also this might be more secure since you only need to backup files which you are sure about. Before doing a backup use -c option to verify what has changed After verifying these changes add those files to the backup and be certain this changes are ok.

Update:
fixed some bugs in the Script today. Also the Script detects a change with the -c Option, the diff is logged to a logfile. So you can see what has changed.
I have completely disabled the -r Option though since this was highly unusa
ble.

Hi girls and guys,

today i present you with a new incarnation of the etckeeper. My Script etckeeper-ng rsyncs the /etc directory into a backup directory. As usual you can find the etckeeper-ng in my github directory and get it from there.

By default the Script syncs the /etc to /root/.etcbackup/. You can change this by editing the $BACKUPDIR variable in the script.

After initializing the Script with -i option it saves a copy of /etc to /root/.etcbackup/etc and a file /root/.etcbackup/content.bak which contains the permissions user and owner of every file in the original /etc directory. All files under $BACKUPDIR than gets under version control by git.

Whenever you have done some changes in the configuration files, you can check them in and commit them to git by using the -b option to etckeeper-ng. The Backup function takes a little bit longer though, since the script also tests whether any permission or ownership or groupship has changed. In this case the Script will ask you, if you would like to restore the original permissions or commit the changed permissions and store them in the content.bak file.

You can list your commits by using the -l option.

However you will be notified that you should define some files like /etc/passwd or /etc/shadow that should not be included in the backup. You can define the /etc/passwd
file from being backed up by issuing the Script etckeeper-ng -e passwd. You have to give the relative path from /etc to say which files you wish to exlclude from being backed up. This will create a file /root/.etcbackup/excludes which will be read by the rsync programm with the --exclude-from option.

Checking if someone has something changed can be archived by using the -c option. This will create a second copy of the backup directory and will rsync the /etc to this particular second copy. The directory can be set by editing the variable $COMPAREDIR. The script will use git status -s and a check function for the permissions to check against content.bak if the user, the group and the permissions of all files are genuine.

If someone or yourself by accident change the permissions of a particular file you can reset this by using the -C option. Note: It's a capital C.

And finaly restoring the /etc directory can be archived by using the -r
were you can use HEAD restoring from the latest commit or the md5sum which is listed after "commit" when you using -l

Hope this script makes the live a little bit easier for you.

And please tell me if you find any bugs.


That's all folks.

Dienstag, 7. Februar 2012

Sind wir jetzt per Sie?

Gut dass sich ein Laden der sich hauptsächlich von Arbeitslosen ernährt ironischer Weise "PerZukunft" nennt kann man vielleicht noch irgendwie verstehen. Drinnen kann man, ganz nebenbei gesagt auch meinen Namen nicht korrekt aussprechen. Werde abwechselnd von den Damen Herr Prumps, Herr Prost oder auch gerne mal Herr Ropst gennannt.

Aber diese Per-siflage geht draußen auch weiter. Als Alternative sehe ich auf einem Plakat dass vor allem ein "Erfolg per Hochschulstudium" gebraucht wird, während ich in einem U-Bahnhofe "per Kamera" überwacht werde.

Schnell fahre ich mit der U-Bahn in die Bibliothek wo man mich fragt, als ich ein Buch vorbestelle, ob ich denn "per E-Mail" darüber Bescheid bekommen möchte wenn dieses aus dem Magazin verfügbar ist. Es ginge auch "per SMS" sagt man mir, während ich mich frage ob es nicht schöner klingt, wenn man mir dieses auch mittels einer E-Mail mitteilen könnte.

Das Buch unterm Arm komme ich noch einer Zahlungsaufforderung eines größeren Onlinehauses nach, welche ich"per Rechnung" erhielt und bin froh darüber das die Überweisung "per Sofort" geschieht. Das dass "per" hier sogar völlig sinnlos ist, sei nur nebenbei erwähnt. Danach trinke ich einen Kaffee am Stand eines Bäckers "per Tasse" . (Kein Witz) 2 Anrufe in Abwesenheit von jemanden der mir sowie so schon längere Zeit auf den Keks geht. Er erklärt mir er hätte mich nun schon die ganze Zeit über versucht "per Handy" zu erreichen. Ich antworte: "Na dann ist ja gut. Und ich habe gedacht, du hättest versucht mich auf dem Handy zu erreichen."

Mein Freund der gerade ein Reise per äh entschulden Sie mich nach Indien macht schreibt mir:
dass er nun per Boot auf einem Fluss zu Monkey Island fahre. Ich korrigiere seine Grammatik und ernte von jemanden dafür ein +1. Wenigstens etwas.

Samstag, 28. Januar 2012

Todo List in a Nut Shell

Update: Now just type todo to see your todo list. The old -s Option is still there. I also fixed a Bug which causes the marking more than one line to fail when you use the last line of your todo list as the last argument or rather specific when you use the n-1 last lines of n marked entries as arguments. Thanks to my friend sebastian who gave the crucial hint for fixing that issue.

Update:
I fixed some bugs in the script. Entries which are marked as done are moved to the bottom of the $TODO_LIST_FILE. The Script checks if arguments to -u or -x or -m are valid integers and if these lines really exists in the $TODO_LIST_FILE. It should now be impossible to give line 23 as argument when such line does not exist. The Script will exit with exit status 1 if one of the arguments is not valid. This feature will give you more protection from destroying your todolist.
Some rather minor options; the -B Option (backup your todolist) and the -R (restore your todolist from backup); have been added.

Update:
I spend a little time in the train to implement new features in the todo.sh Script.
1) With -m (modify) you are able to edit or correct entries. You need read and gawk
to get this working.
2) With -p you are clearing the todo list. All(!) Entries getting lost. And with -pp you even remove
the $TODO_LIST_FILE.

Update:
The newest version does'nt need a new entry enclosed in "". I fixed this issue on weekends.

Update:
You also can unmark and mark more than one entry at a time. Just list them as arguments separated by spaces.

Hi girls and guys,

on weekend i have had a little bit time to clean up my github repository and work on new scripts. so i manged beginning one of my most usefull scripts.

When i had the idea i was writing my things i had to do in a simple textfile using the editor of my choice (vim). so i was wondering whether i could maintain a simple todo list on my machine without having firing up an editor every time. So i came up with the idea to write a small script using sed and grep which would accomplish this task.

Simply download the script or clone my github repository. I recommend putitng the script to /usr/local/bin and link the script to /usr/local/bin/todo.

And this is how it works: You simply add a new entry to your todo list by typing:

todo
-a My new task

Since you don't have a file for your todo list yet you will be asked creating a new one. This is just my way of doing things, because i think that no actions should be taken without the user knowing whats going on.

More entries can be added the same way:

todo -a just an other task
todo -a oh no not again

You now have three open tasks in your todo list which can be seen by typing:

todo -s

1 new task --> [o]
2 just an other taks --> [o]
3 oh no not again --> [o]

if you have finished one task you can mark this particular task as being done using the line number and the -x option:

todo -x 2

You can reveal this by using the -s option again:

todo -s

1 new task --> [o]
2 just an other taks --> [x]
3 oh no not again --> [o]


--> [x]
indicates for you that the task with line #2 has been marked as one you managed to finish.

You can inspect only those tasks which are open by using the -o option and those which you have marked as being done by using the -d option.

Lets say the task has come available again and you need to do this task again. You can readd this task to your open task by using the -u #N option, where the parameter #N is the number of the line you want to readd.

And finaly todo -r clears all (!) task you have marked as finished.

Although i will improve this script and will add more features it works pretty well in this early stage and i welcome you to comment and improve my work.

that's all folks

Dienstag, 17. Januar 2012

Testing and ranting openSUSE 12.1 RC1

Update: openSUSE 12.1 has now been stable since a while. Works perfect on my Thinkpad. Filed a Bugreport on systemd. To disable the tracker daemon use Alt+F2 and type gnome-session-properties. Here you can disable the tracker daemon.


Update:
Filed a bug about high RAM consummation for 12.1. Will not upgrade to 12.1 on my main machine.

First things first SuSE 12.1 is still not ready and i just tested it out on my Desktop PC still having
a backup of my old 11.4 version. I am yet unsure whether i want to change or not. At least on my Main Thinkpad Machine i will still use the older 11.4.

There is a bug affecting Software changes and keeps the Yast-installer crashing if you use version 12.1 rc1. But as long as you keep going with the default installation everything else will go fine. In fact finally i don't have to manage my external encrypted devices setup after i finished the installation. This all goes fine in the current installation procedure.

Yast doesn't look much different from the previous versions but they changed it in the details. For example during the installation when showing how much GB are going to be installed they changed to 4 digits after the "," so you dont stare at 2,0 gb to install for like 2 minutes and you actually can see more details when it says: "2,0423 to install".

But there are some bugs in the packages. When you install a package you often
get a message like this:

"/usr/bin/desktop-database --defaults-list unknown option"

Also i found a couple of new Yast modules which are looking pretty interesting and you are able to add sax3, the reborn sax. Since Sax3 is still under development you shouldn't install it if your monitor settings are fine anyway. For example the Snappper module to create filesystem snapshots for ext4 and btrfs seems interesting but did not load correctly.

The first time i tried opensuse 12.1 rc1 i was confronted with the fact that they now have a lot of new stuff that has changed in 12.1. Well what was the reason for there is no .0 release any more? Right so people don't believe that there is a major change here.

Changing from sys-V-init to systemd is in fact a big change. And the best documentation i found about this is here . The startup of the computer is very fast. My pc boots up in notime now and so is the change to an other runlevel. But however this doesn't bother me since i usually do not reboot often or change runlevels. You do this mostly for maintenance reasons, right? However changing to systemd was not the best choice. In the description it says its backwarts compatible to sys-V-Init. Well its not. For one reason there is no shutdown -F any more. which forces the
check of your filesystem when you boot up next time in sys-V-init shutdown. I think this is not acceptable. A workaround for this would be setting the check interval to 1 with tune2fs like this:

tune2fs -c 1 /dev/sda1

and set it back to normal after rebooting like this:

tune2fs -c 60 /dev/sda1

For an other reason, this might be only affecting 12.1 RC1 switching from runlevel 5 to runlevel 1 will freeze the system at least if you are using gnome3 with proprietary driver like described at the bottom.

It still uses the patched Version of Grub1 which i am fine with since this is easier to administer.

Of course i installed gnome3 and was unhappy at first but than i discovered the nice gnome-shell extensions and i loved it. But gnome3 is much more RAM consuming than the 2.x one. With 2GB RAM and 2GB Swap it uses 60% out of 800 GB RAM and nearly 500 GB Swap.
You can install the package gnome2-look-and-feel to get the gnome2 look and feel back if you don't like gnome3 with gnome-shell.
However an other problem is that Windows don't size correctly so that you are leaving with guessing what "Toog" or "Men" could mean. And how do you change the icon theme? You have to install a tool that allows you to access the "Advanced Settings" And if you don't know that the menueditor is called alacrte its not possible to change the menu items by right klick like in gnome2. Also anyoing everytime you log in there is this message you have to clickaway multiple times for every device that gets mounted during start up. If you like me and have like 5 mounted devices this can get very annoying. And how do deactivate this tracker thing. i dont want the daemon to itch my hard drive all the time. Uninstalling it will also uninstall the whole gnome3-session. WTF!!! I am looking for a way to get this disabled on startup: All i know for now is how you can create autostart items by creating proper files in ~/.config/autostart/
and that you can disable the tracker dameon by using tracker-control -t all
Synapse program is much much better than the gnome-do program though and is called to live with the same shortcut.

I miss the Terminator Terminal which i used to monitor the system with tools like sar, htop, iotop and iftop and tail -f /var/log/messages.

An other thing which does not affect servers but does in fact the user is that it needs a little effort to get the nvidia propriatary driver running for gnome3. With the kind hint of zaitor from the irc channel #opensuse-gnome i was able to finally install it. asuming you already have downloaded the driver follow these steps will install the driver:


Nvidia driver is running

(1) Install
gcc make and kernel sources and all dependecnies like this zypper ref && zypper in kernel-source make gcc

(2) change to runlevel 3 and execute the installer like this
./NVIDIA-Linux-(arch)-255.05.09.run. You will be asked whether a file in

disable-nouveau.conf in /etc/modprobe.d should be created. answer this with yes and leave the installer for now.

(3) Disable the noeveau using cat /etc/modprobe.d/disable-nouveau.conf >> /etc/modprobe.d/50-blacklist.conf

(4) in yast or with zypper uninstall the nouveau driver.

(5) in yast --> System --> Editor for /etc/sysconfig search for kms and change the value from yes to no.


(6) restart the system. init 1 and init 3 wont work with systemd since the old driver is still loaded

(7) change in runlevel 3 and execute the installer again like in (2) this time the installation should be finished without problems. Answer with yes when you are being asked whether /etc/X11/xorg.cong should be written for you.

(8) add the group video to the system user gdm and the user you want to use. In the case the usersname is geeko:

usermod -A video gmd && usermod -A video geeko

(9) change in runelvel 5
That's it. now you can use the better nvidia driver with better perfomence at 1% cpu load instead of 20% cpu load. Remember that you have to redo this procedure every time you get a kernel update.

That's it for today. ;)

Montag, 16. Januar 2012

Alle meine Podcasts

Nach längerer Zeit mal wieder einen kurzen Artikel in meiner Muttersprache und ein Update für Podcastempfehlungen:

Hier ist nur die Liste. Einfach mal reinhören. Ich fühl mich nicht berufen, hier Bewertungen oder Empfehlungen auszusprechen. Alle Podcasts haben bei mir weitgehend TV und Radio ersetzt.

Fnordfunk (de, Audio)

CRE (de, Audio)

Quarks und Co (de,Video)

Extra3 (de, Videoo )

Linux Outlaws (en, Audio)

Raumzeit (de,Audio)

Hr2 Der Tag (de,Audio)

Elekrischer Reporter (de,Video)

Not Safe for Work (de,Audio)

Anne Will Audio (de,Audio)

Alternativlos (de,Audio)

Hoaxilla (de, Audio)

Wrint (de,Audio)

Retrozirkel (de,Audio)

Elementarfragen (de,Audio)

PaulDotCom Security Weekly (en, Audio)

MathCast (de, Video, dead)

Social-Engineer Podcast (en, Audio)

Metronaut (de,Audio)

Mythen - Michael Köhlmeier (de, Video)

WhoCast (de,Audio)

Luftpost Podcast (de, Audio)

Citizen Reporter (en,Audio)

Donnerstag, 8. Dezember 2011

Dictionary in a Box

Hi girls and guys,

This time just a short trick. If you need a good dictionary
you can use dict based for the shell too. I installed
ding via zypper

zypper in ding

and added this function to my .bashrc in $HOME

translate()
{
clear
tr \| \n < /usr/share/dict/de-en.txt |grep --color $1
}


this way you can type

translate hello

in a bash and get a colorized output of the translation. Hope you find this a useful hint.

You may also use one of these dictionaries.

Until next time than.

Donnerstag, 10. November 2011

Run Jobs asynchronous with anacron

Hi Girls and Guys,

today i will tell you something about anacron.

With anacron you are able to install and maintain a Crontab which runs periodically but asynchronous. Now what does this mean?

Imagine you have a Job for a laptop which you want to execute on regular basis but because you don't know on which times your computer actually is turned on and therefore it might be difficult and even impossible to setup such jobs on fixed times. Anacron does not assume that the machine you are working on is running 24/7 like a productive server.

I will guide you through setting up a job for your anacron having a virusscan with avgscan but first let me tell you a little bit more about anacron: First of all anacron is not an other cron daemon. Rather think of it as an extension to the already installed Cron Daemon. If you first

installing ancron for your distribution anacron sets up a script in /etc/cron.hourly to startup /usr/sbin/anacron every hour reading and executing the commands you have specified in your /etc/anacrontab. In openSUSE you can install anacron using zypper. Simply type:

zypper in cronie-anacron

as root to install it.

Now lets take a look at the /etc/anacrontab:

++++++++

SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
RANDOM_DELAY=45
START_HOURS_RANGE=18-23

#period in days delay in minutes job-identifier command
@daily 30 cron.avg_l1zard avgscan -W /home/l1zard/.wine -awbHpPcmj -r /var/log/avg_l1zard.report /home/l1zard/

@daily 30 cron.avg_tmp avgscan -awbHpPcmj -r /var/log/avg_tmp.report /tmp/
@daily 30 cron.avg_root avgscan -awbHpPcmj -r /var/log/avg_root.report /root/

++++++++

The variable SHELL tells the anacron program which Shell is going to be used to execute the commands. The PATH variable is like the environment variable PATH in bash which tells the shell where to look for executable files. With MAILTO you can specify a list of users which will receive a system informing these users about success or failure regarding these jobs. With RANDOM_DELAY you can specify the maximum range of the random delay which is added to the base delay setup in column 2. The START_HOURS_RANGE is the most interesting part of this configuration file. Here you can setup the lapse of time per day in which anacron should run. This is useful if you use commands which are using a lot of system resources and you want anacron to this jobs in a time where you can effort such loss of performence to other tasks.

Now lets have a look at the more interesting table. The first column you can specify the period in days on which you wish running the jobs. You may also use macros such as @daily @monthly or @weekly to run jobs on daily, monthly or weekly basis. In the second column you say anacron the base delay. Anacron waits this amount of time plus the RANDOM_DELAY before it starts any jobs. This way you can be sure that anacron will give you some time to do other jobs after you have logged in. The 3rd column is the name of the spooler file and the id of the job. You will find a file called /var/spool/anacron/job_identifier.The last column of the jobtable is the job including all options and parameters given to this command. However you must ensure that the program you want to run is in the PATH of your configuration file.

So lets test our anacrontab as a final step. Executing

anacron -T && echo "ok"

will test the for us whether the anacrontab we just installed is valid. And with

anacron -fs

we can test whether the commands we have are doing what we want them to do for us. The -s option is used to tell anacron to execute jobs in a row rather than all together. Remember you get a mail where you will be informed about success or failure of the jobs you want to have anacron executed.

That's it for today folks.

Mittwoch, 26. Oktober 2011

No I said this Way! IO Redirection

One of the most powerful tools in the Linux or Unix Scripting is that you are able to redirect StdIn StdOut and StdErr or even other Channels of IO Inter Process Communication
from and to Other Descriptors.

There are basicly 3 of them as i described above:
0 or the StdIn is the Standard Input descriptor.
1 or the StdOut is the standard output descriptor.
2 or the StdErr is the standard error descriptor.


You may use other descriptors like 3 or higher up to 255 for programming or scripting purposes, i.e when creating a script that uses zenity or dialog. Using

ls /dev/fd/

will reveal all descriptors you have available in the current shell.

Redirecting them is often necessary to get rid of nasty output or read from a file to read the output later as the output goes faster than your eye.
However you have to make sure that the noclobber option of bash is disabled to overwriting
existing files. Check this by using:

echo $SHELLOPTS

If you see noclobber here in the output you can disable this by using:

set +o noclobber

Basically you have these redirection options for the program myprogram

(1) myprogram > Output.log redirects StdOut to the file Output.log

(2) myprogram >> Output.log appends hate StdOut to the file Output.log

(3) myprogram 2> Output.log writes the StdErr to the Output.log. Respective the same for >>.

(4) myprogram &> Output.log writes StdErr and StdOut to the Output.log file.

Some administrators still using the older and more complected to write
myprogragramm > Output.log 2&>1 .
These Construct basically appends the Stderr to StdOut
(2&>1) and than redirects both to the Output.log. Note that bash executes the descriptor redirection from the right hand side to the left hand side. In our example this was the redirection for StdErr appending to StdOut. You can use whatever Descriptor you want N&>M will always concatenate the descriptor N to descriptor M.

(5) myprogram < Input.lst the program reads its input from Input.lst

Remembering what i was writing about the noclobber option. Yeah actually i lied about this. You can force IO-Redicrection by using the >N| construct.

(6) myprogram >2| Output.log, will force the redirection to Output.log

Sometimes, if you write a demonized script for example you will find it useful l to close certain descriptors:

7) 2<&- will close the Input for StdErr.

And guess what

(8) 2>&- does? It closes the Output for StdtErr.

Again this does apply to any file descriptor you may bring to live or that already exists.

Here are two examples what else you can do with IO-Redirection:

If you don't have an Editor you may "create" one by using

cat > My.txt << EOF
foo
bar
EOF

to write foo and bar to the file My.txt. Clearing a file is often done by using
cat /dev/null > Output.log But using:
:> Output.log
is faster to write and does the same. This is because the : applies to nothing in bash. and :> overwrites the file with nothing.

Want Real Logging?

However if you want real logging in a script you have written you may want to use logger and create a proper facility which can be used by syslog or syslog-ng.

logger Script.Err mydaemon.sh


will send logging information to the syslog daemon. You can configure the logging target by editing the /etc/syslog.conf to determine the logging target.