tag:blogger.com,1999:blog-27920585799751743982024-02-07T08:32:29.034+01:00geistreicher PapierkorbMatthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.comBlogger106125tag:blogger.com,1999:blog-2792058579975174398.post-88411022849369954302013-11-02T20:47:00.001+01:002013-11-02T20:54:39.936+01:00=== Exaile Music Player 3.3.2 has arived ===<p>As i suggested to Dustin Spicuzza he has made a more stable version 3.3.2 ready for installation:</p><pre> Highlights:<br /><br /> * Tracks were sometimes selected incorrectly when searching a playlist<br /> * Sometimes the main window wouldn't appear when minimizing to the<br /> system tray<br /> * More tags supported for MP4/M4A/FLAC/OGG files<br /> * Locale bugs when executing --help<br /> * Updated Windows installer dependency download versions<br /> * Fixed plugins: librivox<br /><br />And as i promised here are the exaile packages for opensuse 12.x and already for 13.1<br />http://software.opensuse.org/download.html?project=multimedia%3Aapps&package=exaile<br /><br /><br /></pre>Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-80226482761996729632013-10-20T18:11:00.001+02:002013-10-20T22:34:03.825+02:00=== Free your Galaxy Tab 2 ===<p>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.</p><p>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<br />think the windows way might be the more aproven way to do that. But i failed every single time i tried to do that.</p><p><img style="vertical-align: top;" src="http://imageshack.us/a/img716/6258/gf7g.png" alt="" /></p><p>Some additional statement:</p><ul><li><strong>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.</strong></li><li><strong>Make sure that you have a fully charged battery or at least at 80 % battery charge.</strong></li><li><strong>I will use an external device and install the mod from there</strong>.</li><li><strong>I used opensuse 12.3 for flashing the device with clockworkmod but other *nix based operating systems will also work.<br /></strong></li></ul><p><span style="text-decoration: underline;">__What we need__</span><br />(0) The tablet obviously and an external micro sd card.</p><p>(1) Download the <a href="download2.clockworkmod.com/recoveries/recovery-clockwork-6.0.2.3-p3110.img">clockworkmod</a></p><p>(2) Download the <a href="http://download.cyanogenmod.org/?type=stable&device=p3110">cyanogenmod</a></p><p>(3) [Optional] If you want to use your android devcice with google apps you have to download this from <a href="http://goo.im/gapps">here</a> . However this is not neccessary. There is an gpl alternative package manager for android called f-droid available</p><p>(4) Download the <a href="cmw.cmfs.me/common/heimdall_v1.4rc1_x86.tar">heimdall suite</a></p><p>(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<br />your device. Install the <a href="https://play.google.com/store/apps/details?id=com.lyy.softdatacable&hl=de%20">Software datacable app</a> to your android still 4.0 device </p><p><span style="text-decoration: underline;">__How we do it__</span><br />(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</p><p><span style="font-family: times new roman,times;"> md5sum Mod.img</span></p><p>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.</p><p>(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<br />you should do</p><p><span style="font-family: times new roman,times;">zypper in libusb-1.0.0-32bit</span></p><p>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.</p><p>(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<br />be /mnt/extSdCard.</p><p>(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.</p><p>(5) Put the clockworkmod into the same directory where the heimdall binary has been placed. Now execute the following command as root:</p><p><span style="font-family: times new roman,times;">heimdall flash --recovery <span style="color: #339966;"><recovery.img></span> --no-reboot "</span></p><p>The --no-reboot Option i<img style="float: left;" src="http://imageshack.us/a/img818/5272/x5u2.png" alt="" width="314" height="536" />s 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.</p><p>(6) Now boot the device in to recovery mode. DO NOT REBOOT THE DEVICE. by pressing the Volume up and the Power button.</p><p>(7) Select <em>wipe data/factory reset </em>and <em>Install zip from sdcard</em> select the cyanogenmod file and wait until the installation has finished.</p><p><br />After this has finished you may optionaly install the gapps. However there is no need for that.</p><p><span style="text-decoration: underline;">__Good to know__</span><br />If you want to be absolutely free you skip the installation of gapps and just use the <a href="https://f-droid.org/repository/browse/?fdid=org.fdroid.fdroid&fdpage=8">f-droid</a> 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.</p><p>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<br />the Droidwall package.</p><p>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.</p><p>LINKS:<br /><a href="http://wiki.cyanogenmod.org/w/Install_CM_for_p3110">http://wiki.cyanogenmod.org/w/Install_CM_for_p3110</a><br /><a href="http://download.cyanogenmod.org/?type=stable&device=p3110">http://download.cyanogenmod.org/?type=stable&device=p3110</a><br /><a href="http://goo.im/gapps">http://goo.im/gapps</a><br /><a href="https://f-droid.org/repository/browse/?fdid=org.fdroid.fdroid&fdpage=8">https://f-droid.org/repository/browse/?fdid=org.fdroid.fdroid&fdpage=8</a></p><p> </p><blockquote><p><a href="https://addons.cdn.mozilla.net/img/uploads/previews/full/9/9266.png?modified=1363944759"><br /> <br /> </a></p></blockquote>Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-6042823186776807102013-07-14T14:30:00.001+02:002013-07-14T14:30:20.548+02:00=== Windows 7 more usable ===<p>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.</p><p>Here are 3 awesome free porgrams you could have installed to make the desktop experience a bit better:</p><p> <span style="color: #ff6600;"><strong>1) Fences</strong></span></p><p><img style="float: left;" src="http://picload.org/image/orrcaca/snag-0008.png" alt="fences" width="717" height="427" /></p><p> 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.</p><p>Fences can be downloaded from <a title="Fences Download" href="http://downloads.yahoo.com/software/windows-knick-knacks-stardock-fences-s44524" target="_blank">here</a></p><p><strong><span style="color: #ff6600;">2) Process Explorer</span></strong></p><p><img style="float: right;" src="http://picload.org/image/orrcoli/snag-0007.png" alt="Process Explorer" width="191" height="169" />The Windows Process Explorer is part of the Microsft Sysinternals Suite which can be downloaded directly from <a title="Sys Internals" href="http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx" target="_blank">Micorsoft</a>. 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 <em>Start --> Search</em>. Do do so from the desktop do the following: Right-click <strong>My Compute</strong>r and select <strong>Properties.</strong> Now click on<strong> Advanced System Settings</strong> and on the In the <strong>System Properties window</strong> click the Environment Variables button. This will open a box where you can edit the systems path variable. Just open the<span style="color: #0000ff;"> <em>PATH </em></span>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 <strong>Replace Task Manager</strong> from the <strong>Options</strong> menu of this program.</p><p><strong><span style="color: #ff6600;"> 3) Better Explorer</span></strong></p><p><img style="vertical-align: text-bottom;" src="http://picload.org/image/orrcpwc/snag-0006.png" alt="Better Explorer" width="736" height="226" /></p><p> 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 <a href="http://better-explorer.com/" target="_blank">here</a>.</p><p> </p>Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-40127625182626325392013-07-02T00:03:00.001+02:002013-07-04T21:47:27.381+02:00=== Obtain versions of firefox in linux using python and bash ===<p>The following code will get you the versions of both: The firefox version currently installed and the one available for update on the server:</p><blockquote><p><span style="color: #000080;">01 #!/usr/bin/env python<br />02 <br />03 import os<br />04 <br />05 # we look and store the local version of firefox in this function<br />06 def firefox_get_version_string(inputString):<br />07 firefox_version_string = os.popen(inputString).read()<br /> 08 <br />09 # short name for firefox version number<br />10 fvn = " "<br />11<br />12 for i in firefox_version_string:<br />13 if i.isalpha() != True and i != "-" :<br />14 fvn = fvn + i<br />15<br />16 return fvn.strip()<br />17<br />18<br />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'}"))<br />20 firefox_version_local = (firefox_get_version_string("firefox -v"))<br />21<br />22 if firefox_version_remote == firefox_version_local:<br />23 print("++++++++++++++++++++++++++++++++++++++++++")<br />24 print("This is a Testphase for autoupdate firefox")<br />25 print("version is up to date")<br />26 else:<br />27 print("++++++++++++++++++++++++++++++++++++++++++")<br />28 print("This is a Testphase for autoupdate firefox")<br />29 print("version differs. There might be a newer version available on the remote server")<br />30 print("consider implementing all of it.")<br /></span><span style="color: #000080;">31 print("for now update must be done manually")</span></p></blockquote><p>try it and enyjoy. oh and i am using python 2.7.3 by the way.</p>Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-69763762596828748822013-03-27T20:42:00.001+01:002013-04-09T21:01:11.402+02:00=== Encrypt and automaticly mount external harddrive with debian ===<p>In my <a title="Lockdown Usb devices" href="http://geistreicher-papierkorb.blogspot.de/2013/02/lockdown-usb-devices.html" target="_self">last</a> blogpost i showed you how you can acutal get your usb devices to be encrypted.</p><p>Now let's suppose you have a lot of devices that needs to be encrypted as well as automaticly mounted on boot up.</p><p>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.</p><p>For this i assume you have a partition /dev/sdb1 on your device which already is encrypted.</p><p>(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.</p><p><span style="font-family: "courier new", "courier"; color: #0000ff;">blkid /dev/sdb1 </span><br /> <span style="color: #0000ff; font-family: "courier new", "courier";">>> /dev/sdb1: UUID="056bb8d6-cdf6-4081-23d9-cdef8bf7c18b" TYPE="crypto_LUKS" </span></p><p>(2) Now as root user we are editing the file <span style="color: #000000;"><strong>/etc/crypttab </strong></span></p><p><em>#device<em>alias #uuid #key</em><em> #encrption method<br /> crypt</em>_sdb1 UUID=<from blkid> /etc/cryptkeys/crypt_sdb1.key luks</em></p><p>(3) Next edit the<strong> /etc/fstab</strong> accordingly<br /> /dev/mapper/crypt_sdb1 /mnt/Backup ext4 auto,defaults 0 0</p><p>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.</p><p>(4) The following command will create a key<br /> <span style="color: #0000ff; font-family: "courier new", "courier";">dd if=/dev/urandom of=/etc/cryptkeys/crypt_sdb1.key bs=4k count=1</span><br /> <span style="color: #0000ff; font-family: "courier new", "courier";">chmod 400 /etc/cryptkeys/*</span></p><p>(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<br /> <span style="font-family: "courier new", "courier";"><span style="color: #0000ff;">cryptsetup luksAddKey /dev/sdb1 /etc/cryptkeys/crypt_sdb1.key</span></span></p>Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-59613952415669736452013-02-05T19:36:00.001+01:002013-06-22T16:42:59.094+02:00=== Lockdown USB Devices ===<p>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.</p><p>I do this by</p><p>(I) whitelist the usbdisk that i had bought.</p><p>(II) encrypt the filesystem they are using.</p><p>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.</p><p>(I)<br />To lockup and whitelist usb devices i luckily found this <a title="Malicous USB (PDF opens in new window)" href="http://www.irongeek.com/downloads/Malicious%20USB%20Devices.pdf" target="_blank">article</a> in the internetz. Its a bit diffifcult to understand so will explain here how i did it.</p><p>(1) First lockup the usb stack by using the <a title="Github Script" href="https://github.com/tuxlover/usblock.git" target="_blank">script i wrote</a> 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</p><p><span style="color: #0000ff;">/sys/bus/usb/devices/usb?/authorized_default</span></p><p>You should copy this script to<span style="color: #0000ff;"> /etc/init.d/usblock.</span><strong> Note</strong>: There is no .sh filename extension and add the script as startup service:</p><p><span style="font-family: "courier new", "courier";">chkconfig -a usblock</span></p><p>At this point you <strong>do not need to start the script.</strong></p><p>(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:</p><p><span style="font-family: "courier new", "courier";">udevadm info -a -n /dev/sdb1|grep ATTRS{serial}</span></p><p><span style="color: #ff0000;"><span style="font-family: "courier new", "courier";">ATTRS{serial}=123456789ABC</span></span></p><p><span style="color: #ff0000;"><br /></span>(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:</p><p>+++<br /><em><span style="font-family: "courier new", "courier";"># Script by Adrian Crenshaw<br />## With info from Michael Miller, Inaky Perez-Gonzalez and VMWare<br />#<br />## By default, disable it.<br />ACTION=="add", SUBSYSTEMS=="usb", RUN+="/bin/sh -c 'for host in<br />/sys/bus/usb/devices/usb*; do echo 0 > $host/authorized_default; done'"<br />#<br />## Enable hub devices. There may be a better way than this.<br />ACTION=="add", ATTR{serial}=="123456789ABC", RUN+="/bin/sh -c 'echo 1>/sys$DEVPATH/authorized'"<br />## add further lines like above to allow more devices<br />+++</span></em></p><p>(4) Now start the usblock "service":</p><p><span style="font-family: "courier new", "courier";">service usblock start<br />service usblock status</span></p><p>and restart the udev service</p><p><span style="font-family: "courier new", "courier";">service udev restart</span></p><p>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 <span style="color: #0000ff;">/lib/udev/rueles.d/</span> whereas the second device should be ignored.</p><p>(5) Whenever you need to add new device rules. Remeber that you first have to disable the usblock by using:</p><p><span style="font-family: "courier new", "courier";">service usblock stop</span></p><p><span style="font-family: "courier new", "courier";"><br /></span>before you can deploy new whilelist rules following steps 2 to 4.</p><p>(II)</p><p>(1) To encrypt your usb-sticks you need first to unmount them by using</p><p><span style="font-family: "courier new", "courier";">umount /dev/sdb1</span></p><p>and using luksformat to encrypt and reformat (!) the device. In this step data which is not saved will get lost.</p><p><span style="font-family: "courier new", "courier";">luksformat -t vfat /dev/sdb1</span></p><p> </p><p>thats it for the start of this year.<span style="font-family: "courier new", "courier";"> </span></p>Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-27054845288386045022012-12-10T23:03:00.001+01:002012-12-10T23:03:13.800+01:00This is my bashrc ...<p>based on debian 7 (wheezy) with systemd</p><p><br /># Dont Save duplicated history lines and remove these form the history file<br />HISTCONTROL=irgnoredups:erasedups</p><p># show the date and time when the command was actually executed<br />HISTTIMEFORMAT="%F-%M-%S --> "</p><p># ignore these command and receord them never to the history<br />HISTIGNORE="su":"su *":"sudo *":"sudo":"his":"his *":"history":"history *":"halt":"reboot":"apt-get *":"apt-cache *":"aptitude *":"dpkg *"<br /><br />#CDPATH can be confgiured to have a list of fast available and often used paths<br />#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<br />CDPATH=.:..:/usr/share/:/media/:/home/l1zard/workspace/:/media/<br /><br /># #functions<br /># this function is to search certain keywords in certain section<br />section()<br />{<br />if [ $# -eq 2 ]<br /> then<br /> apropos $1|grep \^\.\*[[:blank:]]\($2\) || echo "sorry no entry for $1 in section $2"<br /> else <br /> echo "Usgae: section word number"<br />fi<br />}<br /><br /><br /># function traffic lists open ports for user<br />traffic()<br />{<br /> ping -c3 google.de && watch -n 10 lsof -i || echo "no network connecttivity"<br />}<br /><br /># function to list kernel threads<br />showthreads()<br />{<br />if [ -z "$1" ]<br /> then<br /> ps -A u |sort -k5 -n|awk '{if($5 == 0){print}}'<br /> else<br /> <br /> ps -A u|sort -k5 -n|awk '{ if($5 == 0){print }}'| grep $1<br />fi<br />}<br /><br /><br /># 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)<br />battery ()<br />{<br />case "$1" in<br /> # returns the percentage of battery charge when discharging<br /> "load") <br /> now=$(cat /sys/class/power_supply/BAT0/energy_now)<br /> full=$(cat /sys/class/power_supply/BAT0/energy_full)<br /> out=$(echo $now/$full*100 | bc -l | cut -c 1-5)<br /> echo "Charge: "$out"%" <br /> ;;<br /> <br /> # returns the battery health. that is the percenatge of the maximal capacity<br /> "health") <br /> design=$(cat /sys/class/power_supply/BAT0/energy_full_design)<br /> current=$(cat /sys/class/power_supply/BAT0/energy_full)<br /> out=$(echo $current/$design*100 | bc -l | cut -c 1-5)<br /> echo "Capacity: "$out"%"<br /> ;;<br /><br /> *) echo "Usage: battery load|health"<br />esac<br />}<br /><br /><br /># function cl to list and cd into a directory at the same time<br />cl()<br />{<br />if [ -z $1 ]<br />then<br /> cd $HOME<br /> ls<br />else <br /> cd "$1"<br /> ls<br />fi<br />echo "Content of $PWD:^^^"<br />}<br /><br /><br /># top 10 processes consuming the most cpu-time<br />top10()<br />{<br />if [[ -n $1 && $1 == "-m" ]]<br /> then<br /> ps auxf | sort -nr -k 4 | head -10<br /> else<br /> ps auxf | sort -nr -k 3 | head -10<br />fi<br />}<br /><br /># function to get translate from dings default dictionary<br />translate ()<br />{ <br />clear<br />tr \| \n < /usr/share/trans/de-en|grep --color $1 <br />}<br /><br /># little function to search for words in rfcs installed locally<br />rfcfind()<br />{<br />zgrep --color $* /usr/share/doc/RFC/rfc-index.txt.gz || echo "no subject found in rfc for $*"<br />}<br /><br /># little function to access locally installed rfcs easily<br />rfc()<br />{<br />find /usr/share/doc/RFC/ -name rfc${1}.txt.gz -exec zless {} \; || echo "rfc ${1} does not exist"<br />}<br /><br /># function to create and change into a directory in one step<br /># function adopted from O'Reilly Coookbook<br />mcd()<br />{<br />local NEW_DIR='_command_failed_'<br />if [ -z "$1" ]<br /> then<br /> echo "mcd: <Datei> [nnn]"<br /> return 1<br />fi<br /><br />if [ -d "$1" ]<br /> then<br /> echo "$1 exists"<br /> NEW_DIR="$1"<br /> else<br /> if [ -n "$2" ]<br /> then<br /> mkdir -p -m $1 "$2" && NEW_DIR="$1" || return 1<br /> else<br /> mkdir -p "$1" && NEW_DIR="$1" || return 1<br /> fi<br />fi<br /><br />cd "$NEW_DIR"<br />}<br /><br /><br />##<br /># funkctions for systemctl<br />all()<br />{<br />echo "Functions for systemctl to handle more easily:"<br />echo "failed"<br />echo "loaded"<br />echo "masked"<br />echo "active"<br />echo "inactive"<br />echo "waiting"<br />echo "running"<br />echo "plugged"<br />echo "mounted"<br />echo "exited"<br />echo "dead"<br />echo "elpased"<br />}<br /><br />failed () <br />{<br /> systemctl --no-pager --all|grep --color failed<br /> systemctl --no-pager --all|grep --color error<br />}<br /><br />loaded () <br />{<br /> systemctl --no-pager --all|grep --color loaded<br />}<br /><br />masked () <br />{<br /> systemctl --no-pager --all|grep --color masked<br />}<br /><br />active ()<br />{<br /> systemctl --no-pager --all|grep --color active<br />}<br /><br />inactive ()<br />{<br /> systemctl --no-pager --all|grep --color inactive<br />}<br /><br />waiting ()<br />{<br /> systemctl --no-pager --all|grep --color waiting<br />}<br /><br />running ()<br />{<br /> systemctl --no-pager --all|grep --color running<br />}<br /><br />plugged ()<br />{<br /> systemctl --no-pager --all|grep --color plugged<br />}<br /><br />mounted ()<br />{<br /> systemctl --no-pager --all|grep --color mounted<br />}<br /><br />exited ()<br />{<br /> systemctl --no-pager --all|grep --color exited<br />}<br /><br />dead ()<br />{<br /> systemctl --no-pager --all|grep --color dead<br />}<br /><br />elapsed ()<br />{<br /> systemctl --no-pager --all|grep --color elapsed<br />}<br />##<br /><br /><br /># add /sbin to PATH to avoid anoying message<br /># add ~/bin to PATH<br />export PATH=$PATH:/sbin:/usr/local/sbin:/usr/sbin:~/bin<br /><br />test -s ~/.alias && . ~/.alias || true<br /><br /><br />## make less more friendly for non-text input files, see lesspipe(1)<br />[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"<br /><br /># uncomment for a colored prompt, if the terminal has the capability; turned<br /># off by default to not distract the user: the focus in a terminal window<br /># should be on the output of commands, not on the prompt<br />#force_color_prompt=yes<br /><br />if [ -n "$force_color_prompt" ]; then<br /> if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then<br /> # We have color support; assume it's compliant with Ecma-48<br /> # (ISO/IEC-6429). (Lack of such support is extremely rare, and such<br /> # a case would tend to support setf rather than setaf.)<br /> color_prompt=yes<br /> else<br /> color_prompt=<br /> fi<br />fi<br /><br />if [ "$color_prompt" = yes ]; then<br /> PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '<br />else<br /> PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '<br />fi<br />unset color_prompt force_color_prompt<br /><br /># If this is an xterm set the title to user@host:dir<br />case "$TERM" in<br />xterm*|rxvt*)<br /> PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"<br /> ;;<br />*)<br /> ;;<br />esac<br /><br /># enable color support of ls and also add handy aliases<br />if [ -x /usr/bin/dircolors ]; then<br /> test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"<br /> alias ls='ls --color=auto'<br /> alias dir='dir --color=auto'<br /> alias vdir='vdir --color=auto'<br /><br /> alias grep='grep --color=auto'<br /> alias fgrep='fgrep --color=auto'<br /> alias egrep='egrep --color=auto'<br />fi<br /><br />## Nice greeting<br />echo -e '\E[32m Viel Spaß am Gerät!'; tput sgr0<br />## show the todo script i wrote everytime i open a shell<br />todo<br /><br />## aliases set by user<br />alias df='dfc -sWT'<br />alias pine='alpine'<br />alias vimpdf='apvlv'<br />alias his='history'<br />alias last10='tail ~/.bash_history'<br />alias del='rm -i'<br />alias emacs='/usr/bin/emacs-nox'<br />alias fstat='stat -c "%a %n"'<br />alias hd='hexdump -C'<br />alias nameservers='grep 'nameserver' /etc/resolv.conf'<br />alias route='route -n'<br />alias vusers='cut -d: -f1 /etc/passwd'<br /># aliasses make the live with python more easier<br />alias py='/usr/bin/python3'<br />alias pydoc='pydoc3'<br />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"'<br />alias ntpdate='/usr/bin/ntpq -p'<br />alias h='man'<br />alias lconfig='cd ~/.local_gitrc'<br />alias release='cat /etc/debian_version'<br />alias halt='sudo shutdown -P now'<br />alias reboot='sudo reboot'<br />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'<br />alias netstat='sudo /usr/bin/watch /bin/netstat -patunel'<br /># aliasses for systemctl<br />alias systemctl='systemctl --no-pager --all'<br />alias india='TZ=Asia/Kolkata date' <br />alias synaptic='gksu synaptic &'<br />alias deborphan='sudo gtkorphan'<br />alias gtkorphan='sudo gtkorphan'<br />alias fusebundlegen='avira_fusebundlegen'<br />alias howto='w3m /usr/local/share/doc/HOWTO/index.html'</p>Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-22929600896477014592012-09-15T23:16:00.004+02:002012-09-15T23:16:39.865+02:00Color 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.<br />
<br />
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.<br />
<br />
The dfc (df color) command which can be downloaded from <a href="http://projects.gw-computing.net/projects/dfc/files" target="_blank">here</a> makes the output of df more colorful and more human readable than the old df one.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHtA2_HvpVhYfE2RuIJ1-m-6hBQi_KtQrbVExNyeYi0Rxg92dKGgowKWWf8P4ELWw9wm0h4FDP9Q5ewOd2bFvovV41Jvpk_PC9SL6EHVVnsFLbJA3uGLX79slhghI2okONBtRJzcaui-E/s1600/Bildschirmfoto+vom+2012-09-15+20_38_32.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHtA2_HvpVhYfE2RuIJ1-m-6hBQi_KtQrbVExNyeYi0Rxg92dKGgowKWWf8P4ELWw9wm0h4FDP9Q5ewOd2bFvovV41Jvpk_PC9SL6EHVVnsFLbJA3uGLX79slhghI2okONBtRJzcaui-E/s320/Bildschirmfoto+vom+2012-09-15+20_38_32.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">df -sW </td></tr>
</tbody></table>
<br />
Once you have finished downloading the the file unpack it:<br />
<br />
<span style="color: blue;">tar xvfz dfc-3.0.0.tar.gz</span><br />
<br />
and change into the directory dfc-3.0.0. To install dfc <br />
<br />
(1) first create the "build "directory beneath:<br />
<br />
(2) Using opensuse install patterns-openSUSE-devel_C_C++ and cmake by issuing<br />
<br />
<span style="color: blue;"> zypper in patterns-openSUSE-devel_C_C++ cmake</span><br />
<br />
(3) Change into the build directory and issue the following command instructing cmake to create the the make files and configure the source code:<br />
<br />
<span style="color: blue;"> cmake .. -DPREFIX=/usr/local -DSYSSCONFDIR=/etc -DCMAKE_BUILD_TYPE=RELEASE</span><br />
<br />
(4) Finally compile and install the program by typing:<br />
<br />
<span style="color: blue;"><span style="background-color: blue;"><span style="background-color: white;"> make && sudo make instal</span></span></span><br />
<br />
(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.<br />
<br />
<span style="color: blue;"> cp /home/hansel/playground/dfc3.0.0/man/dfc.1 /usr/local/man/man1/dfc.1</span><br />
<span style="color: blue;"> chown root:root /usr/local/man/man1/dfc.1 && chmod 755 /usr/local/man/man1/dfc.1</span><br />
<br />
To finally replace the dfc command with the one from the coreutils package you can use an alias. Setting:<br />
<br />
<span style="color: blue;"> alias df='dfc -sW'</span><br />
<br />
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 <b><span style="color: #b45f06;">-t ext4.vfat,ntfs</span></b> only shows the disk statistics for those particular file systems.<br />
<br />
<b>Options:</b><br />
<br />
<b><span style="color: #b45f06;">-h</span></b> help<br />
<span style="color: #b45f06;"><b>-s</b></span> shows a summary and sums up all values used in by the filter<br />
<b><span style="color: #b45f06;">-W</span></b> displays the full text path of both the mount points and the device files used by the devices<br />
<b><span style="color: #b45f06;">-a</span></b> show information about all (psuedo file systems included) file systems<br />
<b><span style="color: #b45f06;">-t </span></b> filter the output by file system<br />
<br />
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. Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-25670943118880515602012-09-13T16:08:00.001+02:002012-09-13T16:08:37.915+02:00Getting frozenbyte games to run in opensuse 12.2For 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.<br /><br />Basics:<br /><b>(1)</b> 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.) <br /><br /><b>(2) </b>After installing the game go to the destination folder and copy your lib32 folder to lib32_bak<br />and create a new lib32 folder using <span style="color: blue;">mkdir</span>. Replace all libraries in lib32 folder with the one installed<br />by zypper/yast. Usually these libraries are found in /usr/lib/ and /lib according to FHS and LSB. <br />
<br /><i><b> a)</b></i> If you cannot find a library try to install them natively with zypper and copy them from there<br /> original places into the lib32 directory.<br /><i><b> b)</b></i> If a library is called /usr/lib/libboost_regex.so.1.49.0 but in lib32 libboost_regex.so.1.35.0<br /> is required just copy /usr/lib/libboost_regex.so.1.49.0 to lib32/libboost_regex.so.1.35.0 in the trine <br /> install folder.<br /><br />Most of the addidional libraries can be found in the addidional opensuse repositories. Only <span style="color: #b45f06;">libNxCharacter.so, libNxCooking.so, libPhysXCore.so and libPhysXLoader.so.1</span> are leaved as original. These are the Nvidia PhysX libraries. <br /><br />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.<br />
<br />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.<br />
<br />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.<br /><br />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:<br />
<br /><span style="color: blue;">#!/bin/bash<br />/home/l1zard/bin/trine/trine-bin32<br /><br />exit 0</span><br /><br />For survivor you need a different script:<br /><br /><span style="color: blue;">#!/bin/bash<br />cd /usr/local/games/survivor<br />./survivor-bin<br /><br />exit 0</span><br /><br />
I don't know why is that<br /><br />If you want to debug more missing or failed libraries you can issue s<span style="color: blue;">trace -o trace.log -f -e trace=open,read trine</span>.<br /><br /><b>What works:</b> Starting and Playing the game.<br /><b>What does not work:</b> Some Pictures are not rendered and therefore are not shown in sequences.Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-23068133256025352412012-09-07T13:33:00.002+02:002012-09-11T18:32:04.073+02:00Imho Mein erster Eindruck von opensuse 12.2<b>Alte - und neue Ärgernisse:</b><br />
<br />
Bei der Installation stolpert der Yast Installationsassistent erst einmal wie üblich über meine externe Festplatte<br />
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.<br />
<br />
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. <br />
<br />
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.<br />
<br />
<b>Neues- und Bewährtes</b><br />
<br />
Opensuse <b> </b>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.<br />
<br />
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 <span style="color: blue;">grub-md5crypt. <span style="color: black;">Ein Wechsel auf dieses Bootsystem führte bei mir allerdings dazu dass das System gar nicht mehr hochkam und den Grub mittels Rescuesystem reparieren </span></span> gestaltet sich mit vollverschlüsselten Festplatten doch als schwierig. Um Grub2 besser einzurichten hat Community Member <br />
<div class="popupmenu memberaction" id="yui-gen1" style="color: black;">
jdmcdaniel3 das Script <a href="http://forums.opensuse.org/blogs/jdmcdaniel3/gnu-grub2-command-help-config-editor-version-1-75-106/">grub2cmd </a>geschrieben.. </div>
<div class="popupmenu memberaction" id="yui-gen1" style="color: black;">
</div>
<div class="popupmenu memberaction" id="yui-gen1" style="color: black;">
Cryptoloop wird ebenfalls als obsolet erklärt und nicht mehr verwendet. Was auch nachzuvollziehen<br />
ist, da es einige bekannte Schwachstellen aufweist.. Wer im übrigen die Mountpunkte seines Usbsticks<br />
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 <b>CDPATH=/var/run/media/$USER</b> zu setzen um sich die Tipparbeit zu sparen.</div>
<div class="popupmenu memberaction" id="yui-gen1" style="color: black;">
<br /></div>
<div class="popupmenu memberaction" id="yui-gen1" style="color: black;">
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 <br />
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. </div>
<div class="popupmenu memberaction" id="yui-gen1" style="color: black;">
<br /></div>
<div class="popupmenu memberaction" id="yui-gen1" style="color: black;">
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.</div>
<div class="popupmenu memberaction" id="yui-gen1" style="color: black;">
</div>
<div class="popupmenu memberaction" id="yui-gen1" style="color: black;">
<b>Fazit:</b> </div>
<div class="popupmenu memberaction" id="yui-gen1" style="color: black;">
</div>
<div class="popupmenu memberaction" id="yui-gen1" style="color: black;">
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. </div>
Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-20365035361221754792012-08-10T16:59:00.001+02:002012-09-04T22:34:14.214+02:00Autostart a terminal at gnome startup with several tools runningThe 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?<br /><br />Yes we can.<br /><br />I used this command line:<br />
<span style="font-family: "courier new", "courier";">gnome-terminal --tab-with-profile="Default" -e "systemd-journalctl -f -a" --tab-with-profile="Default" -e htop --tab-with-profile="Default"</span><br /><br />and added it as a <b><span style="color: red;">gnome-session-properties</span></b> autostart program.<br />
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.<br /><br />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:<br /><br /><span style="font-family: "courier new", "courier";">gnome-terminal -e "sudo apt-get update && sudo apt-get upgrade && sudo apt-get clean && sudo update-command-not-found && sudo -k"</span><br /><br />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.<br /><br />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.<br /><br />And it works perfect.<br /><br /><span style="text-decoration: underline;"><span style="color: black;">Summary gnome-terminal options:</span></span><br /><br /><b>-e "<Command>"</b> Starts the gnome Terminal with this command executed. Using Quotes is only neccessary if you want to use options or links<br />several programs together with logical operators.<br /><br /><b>--tab-with-profile="<Profile>"</b> 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<br />program should be running in each tab.<br /><br /><b>--maximize</b> start the gnome-terminal maximzed.Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-65057952679281056352012-03-09T10:45:00.009+01:002012-03-09T21:43:24.514+01:00Was heißt hier Wohldefniert?<div style="text-align: justify;">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.<br /><br />Ich möchte das einmal zum Anlass nehmen dies dem geneigtem Leser zu erklären.<br /><br />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. )<br />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.<br /></div><br />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 <a href="https://de.wikipedia.org/wiki/Peano-Axiome">natürliche Zahlen</a> und fordern hier einfach die folgende Eigenschaft:<br /><br /><span style="font-family:courier new;"><span style="font-weight: bold;">Für jedes Element <span style="font-style: italic;">a</span> dass ich aus der Menge der natürlichen Zahlen herausgreife, existiert ein Element<span style="font-style: italic;"> e</span></span></span> <span style="font-weight: bold;"><span style="font-family:courier new;">in der Menge der natürlichen Zahlen</span></span> <span style="font-weight: bold;"><span style="font-family:courier new;">mit der Eigenschaft:<br /><br /><span style="color: rgb(0, 0, 153);">a+e=a<br />e+a=a</span><br /></span></span><br />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:<br /><br /><span style="font-style: italic;"><span style="color: rgb(255, 0, 0);"><span style="font-family:courier new;">a+e*=e*+a=a<br /><br />a+e=e+a=a<br /></span></span></span><br />Da nun ja auch unser Element e und e* aus eben der gleichen Menge stammen muss ja auch gelten:<br /><span style="font-family:courier new;"><br /><span style="color: rgb(255, 0, 0);">e+e*=e<br />e*+e=e*<br /><br /><span style="color: rgb(0, 0, 0);"><span style="font-family:arial;"></span></span></span></span>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 <a href="http://timms.uni-tuebingen.de/Browser/Browser01.aspx?path=%2fUniversit%C3%A4t+T%C3%BCbingen%2fMathematisch-Naturwissenschaftliche+Fakult%C3%A4t%2fMathematik%2fVorlesung+Analysis+I+WiSe+2011-2012%2f">etwas langwieriger</a> und nutzt die komplette Bandbreite der Axiome der natürlichen Zahlen aus.) folgt daraus, dass<br /><span style="font-family:courier new;"><span style="color: rgb(255, 0, 0);"><br />e=e+e*<br /><span style="color: rgb(255, 0, 0);"><span style="font-family:courier new;">e+e*=e*</span></span><br /><br /></span></span>Und nun sieht selbst der mathematisch unbegabte Leser, dass offensichtlich<br /><br /><span style="color: rgb(255, 0, 0);">e=e+e*=e*<br /><br /></span><span style="font-family:courier new;"><span style="color: rgb(255, 0, 0);"></span></span>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.<span style="color: rgb(255, 0, 0);"><br /></span><br />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.<br /><br /><span style="font-family:courier new;"><span style="font-weight: bold;">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:<br /></span><span style="color: rgb(255, 0, 0);"><span style="font-style: italic;"><br /><span style="font-style: italic;">x=y^2</span></span></span><span style="font-weight: bold;"><span style="color: rgb(255, 0, 0);"><span style="font-style: italic;"><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"><br /></span></span></span></span></span> </span></span><br /><div style="text-align: justify;">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.<br /></div><br />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)<br />a(ij)+0(ij)=a(ij)<br /><br />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<br />0(ij) und 0(kl) nicht gleich sein. Denn für ungleiche Dimensionen lassen sich Matrizen nicht addieren.<br /><br /><br /><div style="text-align: justify;">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<br />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.<br /></div>Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-49235629254216052832012-02-16T15:14:00.001+01:002012-02-16T16:19:40.703+01:00etckeeper-ng: Taking the distributed version control to the next level<span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;">Update:<br /></span></span></span><span><span><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"></span></span></span></span></span></span></span></span><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"></span></span></span><span><span>A lot has changed since the last time i wrote about this project. First i moved the project to a different <a href="https://github.com/tuxlover/etckeeper-ng">github.</a><br />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.<br /> 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.<br /> 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.<br /> Also i wrote etckkerper-ng it is able to parse Variables from the configuration file /etc/keeper.conf<br /> 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.<br /></span></span><span style="font-weight: bold;"><span style="font-weight: bold;"><br />Update: </span></span><span>Santas Hacking night :D<br />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.<br /></span><span style="font-weight: bold;"><span style="font-weight: bold;"></span><br />Update:</span><span> 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.<br />I have completely disabled the -r Option though since this was highly unusa</span><span style="font-weight: bold;">ble.<br /><br /></span>Hi girls and guys,<br /><br />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 <a href="https://github.com/tuxlover/bashtools/blob/edf82630da4c3dec878e173a1b6f9ec9327ba621/Scripts/testing/etckeeper-ng.sh">github</a> directory and get it from there.<br /><br />By default the Script syncs the /etc to /root/.etcbackup/. You can change this by editing the <span style="font-weight: bold; color: rgb(51, 51, 255);">$BACKUPDIR</span> variable in the script.<br /><br />After initializing the Script with <span style="font-weight: bold;">-i </span>option it saves a copy of /etc to<span style="color: rgb(0, 0, 153);"> <span style="font-weight: bold; color: rgb(51, 51, 255);">/root/.etcbackup/etc</span></span> and a file /<span style="color: rgb(51, 51, 255); font-weight: bold;">root/.etcbackup/content.bak</span> which contains the permissions user and owner of every file in the original /etc directory. All files under <span style="color: rgb(51, 51, 255); font-weight: bold;">$BACKUPDIR </span><span style="color: rgb(51, 51, 255);"> </span>than gets under version control by <span style="color: rgb(0, 153, 0); font-weight: bold;">git</span>.<br /><br />Whenever you have done some changes in the configuration files, you can check them in and commit them to git by using the <span style="font-weight: bold;">-b </span>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.<br /><br />You can list your commits by using the<span style="font-weight: bold;"> -l</span> option.<br /><br />However you will be notified that you should define some files like <span style="font-style: italic;">/etc/passwd</span> or<span style="font-style: italic;"> /etc/shadow</span> that should not be included in the backup. You can define the /etc/passwd<br />file from being backed up by issuing the Script <span style="font-weight: bold;">etckeeper-ng -e passwd</span>. 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 <span style="color: rgb(51, 51, 255); font-weight: bold;">/root/.etcbackup/excludes</span> which will be read by the rsync programm with the --exclude-from option.<br /><br />Checking if someone has something changed can be archived by using the <span style="font-weight: bold;">-c </span>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 <span style="color: rgb(51, 51, 255); font-weight: bold;">$COMPAREDIR</span>. 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.<br /><br />If someone or yourself by accident change the permissions of a particular file you can reset this by using the <span style="font-weight: bold;">-C</span> option. <span style="font-weight: bold;">Note: It's a capital C.</span><br /><br />And finaly restoring the /etc directory can be archived by using the <span style="font-weight: bold;">-r <commit></commit></span><br />were you can use HEAD restoring from the latest commit or the md5sum which is listed after "commit" when you using<span style="font-weight: bold;"> -l</span><br /><br />Hope this script makes the live a little bit easier for you.<br /><br />And please tell me if you find any bugs.<br /><br /><br />That's all folks.Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-13313246340153584842012-02-07T20:40:00.004+01:002012-02-08T23:08:18.094+01:00Sind 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.<br /><br />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.<br /><br />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.<br /><br />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."<br /><br />Mein Freund der gerade ein Reise per äh entschulden Sie mich nach Indien macht schreibt mir:<br />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.Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-26980172307220625522012-01-28T21:57:00.001+01:002012-01-28T21:59:43.118+01:00Todo List in a Nut Shell<span style="font-weight: bold;">Update: </span>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.<br /><span style="font-weight: bold;"><br />Update: </span><span>I fixed some bugs in the script. Entries which are marked as done are moved to the bottom of the $TODO_LIST_FILE</span>. The Script checks if arguments to <span style="font-weight: bold;">-u </span>or <span style="font-weight: bold;">-x </span>or <span style="font-weight: bold;">-m</span> 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.<br />Some rather minor options; the <span style="font-weight: bold;">-B </span>Option (backup your todolist) and the <span style="font-weight: bold;">-R </span>(restore your todolist from backup); have been added.<br /><span style="font-weight: bold;"><br />Update: </span>I spend a little time in the train to implement new features in the todo.sh Script.<br />1) With -m <number> (modify) you are able to edit or correct entries. You need <span style="color: rgb(255, 0, 0);">read</span> and <span style="color: rgb(255, 0, 0);">gawk<br /><span style="color: rgb(0, 0, 0);"></span></span>to get this working.<br />2) With -p you are clearing the todo list. <span style="font-weight: bold;">All</span>(!) Entries getting lost. And with -pp you even remove<br />the $TODO_LIST_FILE.<br /><span style="font-weight: bold;"><br />Update: </span>The newest version does'nt need a new entry enclosed in "". I fixed this issue on weekends.<br /><br /><span style="font-weight: bold;">Update: </span><br />You also can unmark and mark more than one entry at a time. Just list them as arguments separated by spaces.<br /><br />Hi girls and guys,<br /><br />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<a href="https://github.com/tuxlover/bashtools/blob/edf82630da4c3dec878e173a1b6f9ec9327ba621/Scripts/testing/etckeeper-ng.sh"> </a><a href="https://github.com/tuxlover/bashtools/blob/edf82630da4c3dec878e173a1b6f9ec9327ba621/Scripts/testing/etckeeper-ng.sh">most usefull scripts</a>.<br /><br />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 <span style="font-weight: bold;">sed</span> and <span style="font-weight: bold;">grep</span> which would accomplish this task.<br /><br />Simply download the script or clone my github repository. I recommend putitng the script to /<span style="color: rgb(51, 102, 255);">usr/local/bin</span> and link the script to <span style="color: rgb(0, 153, 0);">/usr/local/bin/todo</span>.<br /><br />And this is how it works: You simply add a new entry to your todo list by typing:<br /><span style="font-size:85%;"><span style="font-weight: bold;"><span style="font-family:courier new;"><br />todo </span></span>-<span style="font-weight: bold;">a My new task<br /></span></span><br />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.<br /><br />More entries can be added the same way:<br /><br /><span style="font-weight: bold;"><span style="font-size:85%;"><span style="font-family:courier new;">todo -a just an other task<br />todo -a oh no not again<br /><br /></span></span></span>You now have three open tasks in your todo list which can be seen by typing:<br /><br /><span style="font-weight: bold;"><span style="font-size:85%;">todo -s<br /><br /><span style="color: rgb(153, 51, 0);">1 new task --> [o]<br />2 just an other taks --> [o]<br />3 oh no not again --> [o]<br /></span></span></span><span style="font-weight: bold;"><span style="font-size:85%;"><span style="font-family:courier new;"><br /></span></span></span>if you have finished one task you can mark this particular task as being done using the line number and the -x option:<br /><span style="font-size:85%;"><span style="font-family:courier new;"><span style="font-weight: bold;"><br />todo -x 2<br /><br /></span></span></span><span style="font-weight: bold;"><span style="font-size:85%;"><span style="font-family:courier new;"></span></span></span>You can reveal this by using the -s option again:<br /><br /><span style="font-weight: bold;"><span style="font-size:85%;"><span style="font-family:courier new;">todo -s<br /></span></span></span><span style="font-weight: bold;"><span style="font-size:85%;"><br /><span style="color: rgb(153, 51, 0);">1 new task --> [o]<br />2 just an other taks --> [x]<br />3 oh no not again --> [o]</span></span></span><br /><span style="font-weight: bold;"><span style="font-size:85%;"><span style="color: rgb(153, 51, 0);"><br />--> [x] </span></span></span><span style="font-weight: bold;"><span style="font-size:85%;"><span style="font-family:courier new;"></span></span></span>indicates for you that the task with line #2 has been marked as one you managed to finish.<br /><br />You can inspect only those tasks which are open by using the <span style="font-weight: bold;">-o </span>option and those which you have marked as being done by using the <span style="font-weight: bold;">-d </span>option.<br /><br />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 <span style="font-weight: bold;">-u #N </span>option, where the parameter #N is the number of the line you want to readd.<br /><br />And finaly <span style="font-weight: bold;">todo -r </span>clears all (!) task you have marked as finished.<br /><br />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.<br /><br />that's all folks<br /><span style="font-weight: bold;"><span style="font-size:85%;"><span style="color: rgb(153, 51, 0);"></span></span></span></number>Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-16640914826711661822012-01-17T11:33:00.000+01:002012-01-17T11:38:46.063+01:00Testing and ranting openSUSE 12.1 RC1<div xmlns="http://www.w3.org/1999/xhtml"><span style="font-weight: bold;">Update: </span>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 <span style="font-style: italic;">Alt+F2 </span>and type <span style="font-style: italic;">gnome-session-properties</span>. Here you can disable the tracker daemon. <br style="font-style: italic;"><br /><b><br />Update: </b>Filed a bug about high RAM consummation for 12.1. Will not upgrade to 12.1 on my main machine.<br /><br />First things first SuSE 12.1 is still not ready and i just tested it out on my Desktop PC still having<br />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.<br /><br />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.<br /><br />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".<br /><br />But there are some bugs in the packages. When you install a package you often<br />get a message like this:<br /><br />"<span style="font-style: italic;">/usr/bin/desktop-database --defaults-list unknown option</span>"<br /><br />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 <a href="http://en.opensuse.org/Portal:Snapper">Snappper</a> module to create filesystem snapshots for ext4 and btrfs seems interesting but did not load correctly.<br /><br />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.<br /><br />Changing from sys-V-init to systemd is in fact a big change. And the best documentation i found about this is <a href="http://0pointer.de/blog/projects/systemd-for-admins-1.html">here</a> . 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<br />check of your filesystem when you boot up next time in<span style="color: rgb(204, 0, 0);"> sys-V-init shutdown</span>. I think this is not acceptable. A workaround for this would be setting the check interval to 1 with tune2fs like this:<br /><br /><span style="font-weight: bold; font-family:courier new;" >tune2fs -c 1 /dev/sda1</span><br /><br />and set it back to normal after rebooting like this:<br /><br /><span style="font-weight: bold;font-family:courier new;" >tune2fs -c 60 /dev/sda1</span><br /><br />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.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjprlk4mBnZ5HFxGghKxzP5ry_jn_4UuzFZgsPkEBwC_TzkwxPZoaK_o0k8_9On78XLTVuKEr43m5Cq_ZXVCd1udYhFgum9x4smNO7FnZ_7RD1xW8xIZimRPy7c5DRLEDuiAOKRqeW65eQ/s1600/5.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 200px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjprlk4mBnZ5HFxGghKxzP5ry_jn_4UuzFZgsPkEBwC_TzkwxPZoaK_o0k8_9On78XLTVuKEr43m5Cq_ZXVCd1udYhFgum9x4smNO7FnZ_7RD1xW8xIZimRPy7c5DRLEDuiAOKRqeW65eQ/s320/5.png" alt="" id="BLOGGER_PHOTO_ID_5670072305462743602" border="0" /></a><br />It still uses the patched Version of Grub1 which i am fine with since this is easier to administer.<br /><br />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.<br />You can install the package<span style="font-style: italic; color: rgb(0, 0, 153);"> <span style="font-weight: bold;">gnome2-look-and-feel</span></span><span style="font-weight: bold;"> </span>to get the gnome2 look and feel back if you don't like gnome3 with gnome-shell.<br />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 <span style="font-style: italic;">~/.config/autostart/</span><br />and that you can disable the tracker dameon by using<span style="font-weight: bold; font-family:courier new;" > tracker-control -t all </span><br />Synapse program is much much better than the gnome-do program though and is called to live with the same shortcut.<br /><br />I miss the Terminator Terminal which i used to monitor the system with tools like<span style="color: rgb(0, 153, 0); font-weight: bold;"> sar, htop, iotop and iftop and tail -f /var/log/messages. </span><br /><br />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:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv5r12Qyg7y1Q-ydkFC-9shlbNlH6QQP8qgQHFCuiytueTjYhHWMr7xJliIq8iw0GKNOtS2WGiANpXDZ418BXduoueiYuSy30T-1p11_cAAnWCSom4WffZYf1Tg6KgoTvbglPO68OvykY/s1600/nvidia_is_running.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 200px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv5r12Qyg7y1Q-ydkFC-9shlbNlH6QQP8qgQHFCuiytueTjYhHWMr7xJliIq8iw0GKNOtS2WGiANpXDZ418BXduoueiYuSy30T-1p11_cAAnWCSom4WffZYf1Tg6KgoTvbglPO68OvykY/s320/nvidia_is_running.png" alt="" id="BLOGGER_PHOTO_ID_5670071459510158706" border="0" /></a><br /><span style="font-weight: bold;"><span style="font-family:arial;font-size:85%;">Nvidia driver is running</span><br /><br />(1) Install </span><span style="font-weight: bold;">gcc ma</span><span style="font-weight: bold;">ke a</span><span style="font-weight: bold;">nd kernel so</span><span style="font-weight: bold;">urces and all dependecnies like this zypper ref && zypper in kernel-source make gcc</span><br /><br /><span style="font-weight: bold;">(2) change to runlevel 3 and execute the installer like this<br />./NVIDIA-Linux-(arch)-255.05.09.run. You will be asked whether a file in </span><span style="font-weight: bold;"><br />disable-nouveau.conf in /etc/modprobe.d should be created. answer this with yes and leave the installer for now.<br /><br />(3) Disable the noeveau using cat /etc/modprobe.d/disable-nouveau.conf >> /etc/modprobe.d/50-blacklist.conf<br /></span><br /><span style="font-weight: bold;">(4) in yast or with zypper uninstall the nouveau driver.</span><br /><span style="font-weight: bold;"><br />(5) in yast --> System --> Editor for /etc/sysconfig search for kms and change the value from yes to no.</span><br /><br /><span style="font-weight: bold;">(6) restart the system. init 1 and init 3 wont work with systemd since the old driver is still loaded</span><br /><br /><span style="font-weight: bold;">(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.<br /><br />(8) add the group video to the system user gdm and the user you want to use. In the case the usersname is geeko:</span><br /><span style="font-weight: bold; font-family:courier new;" > usermod -A video gmd && usermod -A video geeko</span><br /><br /><span style="font-weight: bold;">(9) change in runelvel 5 </span><br />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.<br /><br />That's it for today. ;)<br /><br /><div class="zemanta-pixie"><img src="http://img.zemanta.com/pixy.gif?x-id=0d949d33-8f5b-88aa-b98e-62be3103a18c" alt="" class="zemanta-pixie-img" /></div></div>Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-32247708218519817352012-01-16T15:06:00.004+01:002012-01-17T10:48:16.984+01:00Alle meine PodcastsNach längerer Zeit mal wieder einen kurzen Artikel in meiner Muttersprache und ein Update für Podcastempfehlungen:<br /><br />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.<br /><br /><a href="http://fnordfunk.de/beta/wordpress/">Fnordfunk</a> (de, Audio)<br /><br /><a href="http://cre.fm/">CRE</a> (de, Audio)<br /><br /><a href="http://podcast.wdr.de/quarks.xml">Quarks und Co</a> (de,Video)<br /><br /><a href="http://www.ndr.de/podcastlink/extra3_videopodcast.xml">Extra3</a> (de, Videoo )<br /><br /><a href="http://feeds.feedburner.com/linuxoutlaws">Linux Outlaws</a> (en, Audio)<br /><br /><a href="http://feeds.feedburner.com/raumzeit-podcast">Raumzeit</a> (de,Audio)<br /><br /><a href="http://podcast.hr2.de/derTag/podcast.xml">Hr2 Der Tag </a> (de,Audio)<br /><br /><a href="http://www.elektrischer-reporter.de/index.php/site/rss_qt/">Elekrischer Reporter</a> (de,Video)<br /><br /><a href="http://feeds.feedburner.com/NotSafeForWorkPodcast">Not Safe for Work </a>(de,Audio)<br /><br /><a href="http://www.ndr.de/podcastlink/daserste_annewill.xml">Anne Will Audio </a>(de,Audio)<br /><br /><a href="http://alternativlos.org/ogg.rss">Alternativlos </a>(de,Audio)<br /><br /><a href="http://www.hoaxilla.de/podcast/hoaxilla.xml">Hoaxilla </a>(de, Audio)<br /><br /><a href="http://www.wrint.de/?feed=podcast">Wrint </a>(de,Audio)<br /><br /><a href="http://retrozirkel.de/episodes.mp3.rss">Retrozirkel </a>(de,Audio)<br /><br /><a href="http://feeds.feedburner.com/elementarfragenmp">Elementarfragen </a>(de,Audio)<br /><br /><a href="http://pauldotcom.com/podcast/psw.xml">PaulDotCom Security Weekly</a> (en, Audio)<br /><br /><a href="http://www.mathcast.org/aktuell/podcast.xml">MathCast</a> (de, Video, dead)<br /><br /><a href="http://socialengineer.podbean.com/feed/">Social-Engineer Podcast </a>(en, Audio)<br /><br /><a href="http://www.metronaut.de/category/podcast/feed/atom/">Metronaut</a> (de,Audio)<br /><br /><a href="http://www.br-online.de/podcast/mythen-michael-koehlmeier/cast.xml">Mythen - Michael Köhlmeier </a>(de, Video)<br /><br /><a href="http://doctorwho.podspot.de/rss">WhoCast</a> (de,Audio)<br /><br /><a href="http://luftpost-podcast.de/feed/">Luftpost Podcast </a>(de, Audio)<br /><br /><a href="http://feeds.feedburner.com/bicyclemarkscommunique">Citizen Reporter</a> (en,Audio)Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-44028945968402777312011-12-08T13:46:00.003+01:002011-12-08T16:08:54.842+01:00Dictionary in a BoxHi girls and guys,<br /><br />This time just a short trick. If you need a good dictionary<br />you can use dict based for the shell too. I installed<br />ding via zypper<br /><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family:courier new;" >zypper in ding</span></span><br /><br />and added this function to my <span style="color: rgb(0, 0, 153); font-weight: bold;">.bashrc in $HOME</span><br /><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family:courier new;" >translate()</span><br /><span style="font-weight: bold; font-family:courier new;" >{</span><br /><span style="font-weight: bold; font-family:courier new;" >clear</span><br /><span style="font-weight: bold; font-family:courier new;" >tr \| \n < /usr/share/dict/de-en.txt |grep --color $1</span><br /><span style="font-weight: bold; font-family:courier new;" >}</span></span><br /><br />this way you can type<br /><br />translate hello<br /><br />in a bash and get a colorized output of the translation. Hope you find this a useful hint.<br /><br />You may also use one of these <a href="http://www.dicts.info/dictionaries.php">dictionaries</a>.<br /><br />Until next time than.Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-46414821488953787582011-11-10T19:05:00.004+01:002011-11-11T15:05:35.514+01:00Run Jobs asynchronous with anacron<blockquote><p>Hi Girls and Guys,</p><p>today i will tell you something about <strong>anacron</strong>. </p><p>With anacron you are able to install and maintain a Crontab which runs periodically but asynchronous. Now what does this mean?</p><p>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.</p><p>I will guide you through setting up a job for your anacron having a virusscan with <a title="avgscan" href="http://free.avg.com/de-de/download-free-all-product" target="_blank"><span style="color:#000080;">avgscan </span></a>but first let me tell you a little bit more about anacron: First of all <strong>anacron</strong> is not an other cron daemon. Rather think of it as an extension to the already installed Cron Daemon. If you first</p><p>installing ancron for your distribution anacron sets up a script in<em> /etc/cron.hourly</em> to startup /<strong><span style="color:#008000;">usr/sbin/anacron </span></strong><span style="color:#000000;">every hour reading and executing the</span> commands you have specified in <span style="color:#008000;"><em><strong><em></em></strong></em></span>your <span style="color:#008000;"><em>/etc/anacrontab</em></span>. In openSUSE you can install anacron using zypper. Simply type:</p><p><span style=" ;font-family:courier new,courier;color:#000000;" ><strong>zypper in cronie-anacron</strong></span></p><p>as root to install it.</p><p>Now lets take a look at the <span style="color:#008000;"><em>/etc/anacrontab: </em></span></p><p><span style="color:#008000;"><em>++++++++<br /></em></span></p><span style="font-size:85%;">SHELL=/bin/sh<br />PATH=/sbin:/bin:/usr/sbin:/usr/bin<br />MAILTO=root<br />RANDOM_DELAY=45<br />START_HOURS_RANGE=18-23<br /><br />#period in days delay in minutes job-identifier command<br />@daily 30 cron.avg_l1zard avgscan -W /home/l1zard/.wine -awbHpPcmj -r /var/log/avg_l1zard.report /home/l1zard/<br /><br />@daily 30 cron.avg_tmp avgscan -awbHpPcmj -r /var/log/avg_tmp.report /tmp/<br />@daily 30 cron.avg_root avgscan -awbHpPcmj -r /var/log/avg_root.report /root/</span><br /><em><span style="color:#008000;">++++++++</span></em><p>The variable <span style="font-family:courier new,courier;"><strong>SHELL</strong></span> tells the <strong>anacron </strong>program which Shell is going to be used to execute the commands. The <strong><span style="font-family:courier new,courier;">PATH</span></strong> variable is like the environment variable PATH in bash which tells the shell where to look for executable files. With <strong><span style="font-family:courier new,courier;">MAILTO</span></strong> you can specify a list of users which will receive a system informing these users about success or failure regarding these jobs. With <strong><span style="font-family:courier new,courier;">RANDOM_DELAY</span></strong> you can specify the maximum range of the random delay which is added to the base delay setup in column 2. The <strong><span style="font-family:courier new,courier;">START_HOURS_RANGE</span></strong> 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.</p><p>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 <span style=" ;font-family:andale mono,times;color:#ff0000;" >@daily @monthly</span> or <span style=" ;font-family:andale mono,times;color:#ff0000;" >@weekly</span> 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 <strong><span style="font-family:courier new,courier;">RANDOM_DELAY </span></strong>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<em> /var/spool/anacron/job_identifier.</em>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 <strong><span style="font-family:courier new,courier;">PATH </span></strong>of your configuration file.</p><p>So lets test our anacrontab as a final step. Executing</p><p><strong><span style="font-family:courier new,courier;">anacron -T && echo "ok" </span></strong></p><p>will test the for us whether the anacrontab we just installed is valid. And with</p><p><strong><span style="font-family:courier new,courier;">anacron</span> -fs</strong></p><p>we can test whether the commands we have are doing what we want them to do for us. The <strong>-s </strong>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.</p><p>That's it for today folks.</p><p><img src="http://scribefire/images/logobitkom.jpg" alt="" /></p></blockquote>Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-39080397771810669432011-10-26T18:14:00.006+02:002011-10-27T15:04:01.808+02:00No I said this Way! IO RedirectionOne 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<br />from and to Other Descriptors.<br /><br />There are basicly 3 of them as i described above:<br /><span style="font-weight: bold;">0 or the StdIn is the Standard Input descriptor.</span><br /><span style="font-weight: bold;">1 or the StdOut is the standard output descriptor.</span><br /><span style="font-weight: bold;">2 or the StdErr is the standard error descriptor.</span><br /><br /><br />You may use other descriptors like <span style="font-weight: bold;">3</span> or higher up to <span style="font-weight: bold;">255</span> for programming or scripting purposes, i.e when creating a script that uses <span style="font-style: italic;">zenity</span> or <span style="font-style: italic;">dialog. </span>Using<br /><br /><span style="font-weight: bold;font-size:85%;" ><span style="font-family:courier new;">ls /dev/fd/</span></span><br /><br />will reveal all descriptors you have available in the current shell.<br /><br />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.<br />However you have to make sure that the <span style="color: rgb(0, 0, 153); font-style: italic;">noclobber</span> option of bash is disabled to overwriting<br />existing files. Check this by using:<br /><br /><span style=" font-weight: bold;font-family:courier new;" >echo $SHELLOPTS</span><br /><br />If you see noclobber here in the output you can disable this by using:<br /><br /><span style="font-weight: bold; font-family:courier new;" >set +o noclobber</span><br /><br />Basically you have these redirection options for the program myprogram<br /><br /><span style=" font-weight: bold; color: rgb(0, 102, 0);font-family:courier new;" >(1) myprogram > Output.log redirects StdOut to the file Output.log</span><br /><br /><span style=" font-weight: bold; color: rgb(0, 102, 0);font-family:courier new;" >(2) myprogram >> Output.log appends hate StdOut to the file Output.log</span><br /><br /><span style=" color: rgb(0, 102, 0); font-weight: bold;font-family:courier new;" >(3) myprogram 2> Output.log writes the StdErr to the Output.log. Respective the same for >>.</span><br /><br /><span style="color: rgb(0, 102, 0); font-weight: bold;">(4) myprogram &> Output.log writes StdErr and StdOut to the Output.log file.</span><br /><br />Some administrators still using the older and more complected to write <span style="font-style: italic;"><br />myprogragramm > Output.log 2&>1 . </span>These Construct basically appends the Stderr to StdOu<span style="font-style: italic;">t</span><br />(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<span style="color: rgb(0, 102, 0); font-weight: bold;"> N&>M </span>will always concatenate the descriptor N to descriptor M.<br /><br /><span style="color: rgb(0, 102, 0); font-weight: bold;">(5) myprogram < Input.lst the program reads its input from Input.lst</span><br /><br />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.<br /><br /><span style="color: rgb(0, 102, 0); font-weight: bold;">(6) myprogram >2| Output.log, will force the redirection to Output.log</span><br /><br />Sometimes, if you write a demonized script for example you will find it useful l to close certain descriptors:<br /><br /><span style="font-weight: bold; color: rgb(0, 102, 0);">7) 2<&- will close the Input for StdErr.</span><br /><br />And guess what<br /><br /><span style="color: rgb(0, 102, 0); font-weight: bold;">(8) 2>&- does? It closes the Output for StdtErr.</span><br /><br />Again this does apply to any file descriptor you may bring to live or that already exists.<br /><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">Here are two examples what else you can do with IO-Redirection:</span><br /><br />If you don't have an Editor you may "create" one by using<br /><br /><span style="font-weight: bold; font-family:courier new;" >cat > My.txt << EOF</span><br /><span style="font-weight: bold; font-family:courier new;" >foo</span><br /><span style="font-weight: bold; font-family:courier new;" >bar</span><br /><span style="font-weight: bold; font-family:courier new;" >EOF</span><br /><br />to write foo and bar to the file My.txt. Clearing a file is often done by using<br /><span style="font-style: italic;">cat /dev/null > Output.log</span> But using:<br /><span style="font-weight: bold; font-family:courier new;" >:> Output.log</span><br />is faster to write and does the same. This is because the : applies to nothing in bash. and :> overwrites the file with nothing.<br /><br /><span style="font-weight: bold; color: rgb(255, 0, 0);">Want Real Logging?</span><br /><br />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.<br /><span style="font-weight: bold; font-family:courier new;" ><br />logger Script.Err mydaemon.sh</span><br /><br />will send logging information to the syslog daemon. You can configure the logging target by editing the<span style="color: rgb(0, 0, 153);"> /etc/syslog.conf</span> to determine the logging target.Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-10724826929602341442011-10-24T16:32:00.002+02:002011-10-24T16:50:59.069+02:00The Art of Human HackingHi Girls and Guys,<br /><br />I just read this book:<br />http://www.social-engineer.org/social-engineering/the-art-of-human-hacking/<br /><br />Not that i will encourage anybody to use these Techniques. But to be prepared against the weakest peace in a chain, the human is the best way to protect your infrastructure and yourself from security flaws. The CCC has some good videos form various congresses showing how easy it is to take over someones infrastructure:<br /><br /><a href="http://media.ccc.de/browse/conferences/camp2011/cccamp11-4488-steal_everything_kill_everyone_cause_financial_ruin-en.html">here</a><br /><a href="http://media.ccc.de/browse/conferences/eh2010/EH2010-3765-de-socialengineering.html">and here</a><br /><br />Have funMatthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-33282586383331551172011-10-16T19:02:00.001+02:002011-10-16T19:04:08.278+02:00Good Documentation Praxis<span style="font-weight: bold;">UPDATE (16.10.2011)</span><br /><br />Hi girls and guys,<br /><br />whenever there is something to reinstall or to recover there might be some additional tasks to fulfill to get everything back in the state it's supposed to be. Sure backing up a system often can safe you a lot of effort, but what's also necessary is to document your system and keep track of the things you are changing from the point on you are going away from a fresh vanilla setup.<br /><br />There are several reasons why you should doing this and i will list them shortly:<br /><span style="font-weight: bold;"><br /></span><span style="color: rgb(0, 0, 153);">Fixing Issues can often be a lot easier when you know exactly what has changed, which</span><span style="color: rgb(0, 0, 153);"> software was installed or upgraded recently and which configuration settings have changed.</span><br /><br /><span style="color: rgb(0, 0, 153);">Along comes the time where you have to get the hard track of a task that is very complex and a good documentation of your tracks can save you a lot of time.</span><br /><br /><span style="color: rgb(0, 0, 153);">On such systems where more than one administrator does the job documenting for others, so they are able to follow the steps your were working on, makes life for everyone a bit nicer.</span><br /><br /><span style="color: rgb(0, 0, 153);">Also it can be a good method to write down what you want to implement/deploy later on for your system.</span><br /><br />So that nails it down to 4 very simple document entries in my personal Wiki:<br /><span style="font-style: italic;">Bugs</span> --> where you describe errors and unusual behavior for yourself and others.<br /><span style="font-style: italic;"><br />Howto</span> --> where document stepwise what you are doing to fulfill a major task such as setting up a Web server for example.<br /><br /><span style="font-style: italic;">Last action taken</span> --> where you document whenever you change something on the system. Here you should also document whenever you update certain packages or change even big things.<br /><br /><span style="font-style: italic;">Todo </span>--> Tasks you not yet have managed to do, because of lack of time or maybe because you need to inform yourself how to get this done.<br /><br />You can use a <a href="http://www.wikimatrix.org/wizard.php">Web server based Wik</a><a href="http://www.wikimatrix.org/wizard.php">i </a>but you may want to give <a href="http://zim-wiki.org/index.html">zim</a> or <a href="http://rednotebook.sourceforge.net/">rednotebook</a> a try to accomplish this.<br /><br />But using a wiki is only half the true. You also should comment your work. That means whenever you change a line in a configuration file, document it and whenever you are writing a programm or a script comment what the lines are meant to do, especially those line where you where sitting hours figuring out how to accomplish a particular task.<br /><br />The next step is what is called a versioning system for your /etc folder. You may want to use the etckeeper. Since i use git for developing, i will use<br />git as version controling with <a href="http://kitenet.net/%7Ejoey/code/etckeeper/">etckeeper. </a>I am not going in detail how to use<br />and install etckeeper since there are several blogs out there discussing this topic.<br /><br /><a href="http://bryan-murdock.blogspot.com/2007/07/put-etc-under-revision-control-with-git.html">http://bryan-murdock.blogspot.com/2007/07/put-etc-under-revision-control-with-git.html</a><br /><a href="http://www.jukie.net/%7Ebart/blog/20070312134706">http://www.jukie.net/~bart/blog/20070312134706</a><br /><br /><br />You also should keep an eye on the history command. Some Editing may safe you time and work<br />in the future. So go on and edit your local or your global bashrc...<br />First expand your history from the default size of 1000 to maybe 100000 by changing or<br />definig these variables in your bashrc<br /><br /><span style="font-weight: bold;">HISTSIZE=1000000</span><br /><span style="font-weight: bold;">HISTFILESIZE=1000000</span><br /><br />If you want knowing when a specific command was executed, you may want to set the HISTTIMEFORMAT varibale, which is normaly not set. For example i set this to:<br /><br /><span style="font-weight: bold;">HISTTIMEFORMAT="%F-%M-%S --> "</span><br /><br />So my History output looks like this:<br /><span style="font-weight: bold;font-size:78%;" > 996 2011-09-30-05-08 --> pull -u<br />997 2011-09-30-05-08 --> git pull -u<br />998 2011-09-30-05-08 --> cd</span><span style="font-size:78%;"><br /></span><br />Preventing duplicated lines can be archived by<br /><span style="font-weight: bold;">HISTCONTROL=ignoredups</span><br /><br />Also you may want to set the HISTIGNORE variable:<br /><span style="font-weight: bold;">HISTIGNORE="su *":"sudo *"</span><br /><br />to avoid that somebody can determine which command were exacted by root.<br /><br />that's all for todayMatthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-77399227477782774192011-07-27T19:24:00.008+02:002011-08-01T17:13:24.450+02:00My Backup Strategy Part Itoday i will tell you something about the most important tasks of maintaining a system up and running. Today i will show you my backup solution.<br /><br />In fact my backup solution does not involve technology you will find on server infrastructure such as raid or lvm. I was able to get all my system and private data backuped without this sophisticated technology. The reason why i don't use backup with raid and lvm is, that raid does not prevent you from doing stupid things. For example when you delete data on a RAID 1 array you also delete this data from all your backup disks as well.<br /><br />I use only scripts and cron jobs and couple of extra hard disks. First thing i build in an extra hard disk of the same size which is mounted to /mnt/Backup.<br /><br />This disk could be bigger than the disk where your operating system is sitting but it should not have less space.<br /><br />For the systems backup you should realize that you do not need to save the data which were installed by rpm or debian packages. Instead to save time and space only save those files which are different from an installed or not installed by a system package. In suse you can use the yast backup tool which does exactly this. In debian you can create an iso image of installed packages from aptoncd program and find those files not installed and save this into a tar.gz file as the yast backup tool does.<br /><br /> With Yast you are able to easily set up a automated cronjob running once a week on friday 22 pm for example. It will save both the packages installed on your system and the list of packages you have installed. If you prefer a more stable backup you could use the script <a href="https://github.com/tuxlover/bashtools/blob/22647a22bc864a36e3ccc4fff4b3d22e690292b3/Scripts/package_state.sh">package_state</a> and use the -s option to save the current state of packages in a tar.gz file.<br /><br />In debian you can archive this by using:<br /> <br /><span style="font-weight: bold;font-size:85%;" ><span style="font-family:courier new;">dpkg -l|grep '^ii.*'|awk '{print $2}' >> </span></span> <span style="font-weight: bold;font-size:85%;" ><span style="font-family:courier new;">installed.lst</span></span><br /><br /> <span style="font-weight: bold;font-size:85%;" ><span style="font-family:courier new;">apt-get install --download-only --from-file=installed.lst --targt=/Your/desired/directory</span></span><br /><br /><span style="font-weight: bold;font-size:85%;" ><span style="font-family:courier new;"> tar cvfz backuped_packages.tar.gz /Your/desired/directory</span></span><br /> <br /><span style="font-size:85%;"><span style="font-weight: bold; font-family:courier new;" >mv backuped_packages.tar.gz /mnt/Backup/system/</span></span><br /><br />But i am not an Debian Expert. So there might be other ways for accomplishing this task.<br /><br />Also i always make a copy of the whole /etc directory just in case. You could use etckeeper on debian systems. On rpm systems you have todo this task with the copy command:<br /><br /><span style="font-size:85%;"><span style=" font-weight: bold;font-family:courier new;" >cp -av /etc/* /mnt/Backup/system/etc/</span></span><br /><br />With this solution when the backup disk fails you simply plug in a new disk a make a new backup. when the main disk fails, where your system is running on you plug in a new disk for system and recover your system from the packages you have previously installed.<br /><br />And copying back the /etc directory and the files which were not installed<br />by any package.<br /><br />Now for the users home directory i recommend to use separate /home partition so whenever installing a new system you dont need to delete these files. You can even backup the users files and settings wiht my rsync wrapper script<br /><a href="https://github.com/tuxlover/bashtools/blob/22647a22bc864a36e3ccc4fff4b3d22e690292b3/Scripts/backup_userhome.shhttp://">backup_userhome</a>. You clearly need rsync to be installed. Afer that you can call the script with:<br /><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family:courier new;" >backup_userhome /mnt/Backup User</span></span><br /><br />And restoration is just the other way around with <a href="https://github.com/tuxlover/bashtools/blob/22647a22bc864a36e3ccc4fff4b3d22e690292b3/Scripts/restore_userhome.shhttp://">restore_userhome </a><br /><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family:courier new;" >restore_userhome /mnt/Backup User </span></span><br /><br />Be sure you delete all data from users home which where deployed during the insatllation, then have the restore script running and then login for the<br />first time. et vola all is back where it should be. you even can visit the files you were last working on by using the places in gnome.<br /><br />thats it:<br />Part II will be written when gnu hurd ready or even earlier ;)Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-80884557780133618252011-07-15T01:10:00.000+02:002011-07-15T01:10:14.076+02:00LinuxWissen<span style="font-weight: bold;">Update:</span><br />Das Linuxwissen ist auf github umgezogen: <a href="https://github.com/tuxlover/LinuxWissen">https://github.com/tuxlover/LinuxWissen</a><br /><br /><br />Ich habe nun begonnen mein Linux Sheet in html zu gießen.<br />Dank <a href="http://zim-wiki.org/">zim</a> konnte ich es relativ einfach bewältigen.<br />Es ist zu ca 40% fertig und enthält auch einige Verbesserungen gegenüber der <a href="http://geistreicher-papierkorb.blogspot.com/2011/03/mein-damen-und-herren-ich-prasentiere.html">Textvariante</a>, die auch weiterhin verfügbar bleibt aber nicht mehr aktuallisiert wird.<br /><br />Ich werde versuchen es relativ regelmäßig upzudaten. Eine finale Version kann es aufgrund der Komplexität natürlich niemals geben.<br /><br /><a href="http://propstmatthias.bplaced.net/LinuxWissen/">http://propstmatthias.bplaced.net/LinuxWissen/</a>Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0tag:blogger.com,1999:blog-2792058579975174398.post-82062228040255684612011-06-11T21:16:00.002+02:002011-06-11T21:20:20.800+02:00removing U3 cd image from usb stickHi guys and girls,<br /><br />i finally found out how i can get rid off this enoying U3 partition from those sandisk <br />Usb Sticks. Just get the <a href="http://sourceforge.net/projects/u3-tool/files/">u3-tool</a> and issue<br /><br />u3tool -p 0 E /dev/sdX<br /><br />where X is you device. Be certain you have a backup since this could destroy your data.Matthiashttp://www.blogger.com/profile/06884527634772209904noreply@blogger.com0