Friday, May 30, 2014

HDD-Bug on Jessie with Toshiba

With Debian Jessie and my notebook from Toshiba i found no solution for the hdd-notebook-bug.
I added the apm value of 254 (and for testing 255) several times to the system. Without effect. The hdd go to park position every 60 seconds.


I addes a small shell script to the /etc/rc.local that reads every 30 seconds the smart parameter and write it into nul.
With this script the problem is solved.
 
#!/bin/bash
while :
do
sleep 30
/usr/sbin/smartctl -g apm /dev/sda > /dev/null
done

Tuesday, May 27, 2014

Installing Debian on Toshiba Satellite C50D-1-133

Here i write how to install Debian on my new Toshiba laptop.


Debian Wheezy was not working. Wlan was not found, the graphic card not correctly detected. Using a backport kernel solved the wlan problem, but not the graphic to work. Even with firmware only the vesa mode were used.

Because this i decieded to use Debian Testing (jessie build date 19.06.2014).
At the bios i disable secure boot, and switch vom uefi to csm mode.

With the Debian installer i delete all partitions of Windows 8.1, and the uefi partition. After this the installer was not able to write the grub2 into the mbr.
So i start with a Ubuntu live-cd and uses gparted to change the partion scheme to msdos.
After this the installer was able to create the partitions.

The installation works good, wlan and lan are found.

After the installation i installed the packages firmware-linux-free and firmware-linux-nonfree with dpkg -i .
Now the graphic works fine.

Sometimes during boot the kernel shows no messages at the text-mode.
The screen only keeps black. The solution i found was adding "vga=791" to the kernel.

The brightnesscontrol did not work after installation. The screen always has the highest brightness. For this problem i had to add a kernel parameter too:
acpi_backlight=vendor


The /etc/default/grub file of this machine now looks like this:

GRUB_CMDLINE_LINUX_DEFAULT=”vga=791 acpi_backlight=vendor”

After this only updating the grub with grub-update.

Wednesday, May 21, 2014

Analyse header and create email forwarding

For redirect emails before sending or receiving you can search the header of a file for keywords and create a rule for it.
The keywords can be a part of the email adress.
With this solution you can intercept emails or create a vacation representation.

I add the following line to main.cf:
header_checks = regexp:/etc/postfix/header_checks

At the file header_checks are the keywords and the forward/redirect destinations stored.
/^(To|From|Cc|Reply-To):.*DASISTDASSUCHWORT*/ REDIRECT andre@nitschke-marl.de
 
This line search for the key "DASISTDASSUCHWORT" and if it is found the mail is redirected to the email andre@nitschke-marl.de

Friday, May 16, 2014

Jabberserver connectet to other

After routing port 5269 my jabberserver coult connect to
other server and transfer the messages to them.


Now i can use my own server for talking to every jabber account.

Tuesday, May 13, 2014

Small python program

The first program after “Hello World”:

#!/usr/bin/python
wort = raw_input(”Wort:”)
wiederholen = input(”Anzahl:”)
if wiederholen == 0:
   print”0 mal geht ja wohl nicht, bitte nochmal eingeben”
  wiederholen = input(”noch ein Versuch:”)
for i in range(0, wiederholen):
  print wort


The program ask for a text-string and a number. Both is stored
as variable.
A minimal fault tolerance is the if statemenf for 0 so that a message appears.
Then the word is written as often as the variable says to the terminal.


Learned: using variable, if statement, for loop and printing variable.


Monday, May 12, 2014

Start with Python

My first Python Programm on Debian,
 of course the “Hello World”

#!/usr/bin/python
print “hello world”


More about Python in future at my Wiki on www.nitschke-marl.de