Flattr this!

A is for awk, which runs like a snail, and
B is for biff, which reads all your mail.
C is for cc, as hackers recall, while
D is for dd, the command that does all.
E is for emacs, which rebinds your keys, and
F is for fsck, which rebuilds your trees.
G is for grep, a clever detective, while
H is for halt, which may seem defective.
I is for indent, which rarely amuses, and
J is for join, which nobody uses.
K is for kill, which makes you the boss, while
L is for lex, which is missing from DOS.
M is for more, from which less was begot, and
N is for nice, which it really is not.
O is for od, which prints out things nice, while
P is for passwd, which reads in strings twice.
Q is for quota, a Berkeley­type fable, and
R is for ranlib, for sorting ar table.
S is for spell, which attempts to belittle, while
T is for true, which does very little.
U is for uniq, which is used after sort, and
V is for vi, which is hard to abort.
W is for whoami, which tells you your name, while
X is, well, X, of dubious fame.
Y is for yes, which makes an impression, and
Z is for zcat, which handles compression.
– THE ABC'S OF UNIX
/usr/share/games/fortune/songs­poems

 

Flattr this!

Hello, how are you mates?

I have received second monitor at my job. I had to make everything work as i wanted to.

1) I wanted to make my second monitor show something ;)

So I made a simple command:


dpkg-reconfigure -phigh xserver-xorg


then by pressing CTRL + ALT + BACKSPACE i restarted my X server, and whoohoo!

But is it what we wanted to be?
NO! So task number 2:
2) Make two monitors display different view ;)

So as I mentioned, I wanted that Second monitor would show something different :) so I searched for dual-head xorg, found some xorg.conf files, but it didn’t worked for me… also found a super nice utility… so I tied to do something with it but no success ;) what to do? Oh let’s try: man xorg.conf it was successful!!! So I modified /etc/X11/xorg.conf


# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us,ru(phonetic),lt"
Option "XkbVariant" "us,lt,ru(phonetic)"
Option "XkbOptions" "grp:alt_shift_toggle"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Screen1" 1280 0
Screen "Screen2" 0 0
#Screen "Screen2" RightOf "Screen1"
InputDevice "Generic Keyboard"
#InputDevice "Configured Mouse"
EndSection

Section "Files"
EndSection

Section "Module"
Load "glx"
EndSection

Section "Monitor"
Identifier "SAMSUNG"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection

Section "Monitor"
Identifier "LG"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection

Section "Device"
Identifier "Generic Video Card"
Driver "fglrx"
BusID "PCI:1:0:0"
Screen 0
EndSection

Section "Device"
Identifier "Device1"
Driver "fglrx"
BusID "PCI:1:0:0"
Screen 1
EndSection

Section "Screen"
Identifier "Screen1"
Device "Generic Video Card"
Monitor "SAMSUNG"
DefaultDepth 24
SubSection "Display"
# Modes "1280x1024" "1280x960" "1152x864" "1024x768" "832x624" "800x600" "720x400" "640x480"
# Virtual 2048 1024
EndSubSection
EndSection

Section "Screen"
Identifier "Screen2"
Device "Device1"
Monitor "LG"
DefaultDepth 24
SubSection "Display"
#Viewport 0 0
Depth 24
# Modes "1280x1024" "1280x960" "1152x864" "1024x768" "832x624" "800x600" "720x400" "640x480"
# Virtual 2048 1024
EndSubSection
EndSection

Section "Extensions"
#Option "Composite" "Enable"
Option "Composite" "Disable"
EndSection


As you see it’s nothing so complicated :) as it look’s like ;)

 

Flattr this!

We will use:

heh, I have installed many packages, so i might miss some packages please fix me if so… (maybe libusb, cupsys?)
So lets add squeeze resource:


deb http://debian.mirror.vu.lt/debian squeeze main
deb-src http://debian.mirror.vu.lt/debian squeeze main


to file: /etc/apt/sources.list.d/squeeze.list
then install p910nd:

apt-get update
apt-get install p910nd


and do not forget to remove squeeze from apt list ;) using command:

rm /etc/apt/source.list.d/squeeze.list

Next we need just install drivers to our printer and launch printing daemon…
So p910nd printing daemon conf file: /etc/default/p9910nd

# Printer number, if not 0
P910ND_NUM=""
# Additional daemon arguments, see man 8 p910nd
P910ND_OPTS="-b -f /dev/usb/lp0 0"
# my printer connects to device: /dev/usb/lp0 ;)

# Debian specific (set to 1 to enable start by default)
P910ND_START=1


So lets start it:

/etc/init.d/p910nd restart

Next, Dowload firmware: sihp1020.dl extracting it:

wget http://lpic.lt/wp-content/uploads/2010/08/sihp1020.dl.tar.bz2
bunzip2 sihp1020.dl.tar.bz2
tar -xf sihp1020.dl.tar


drop firmware into yours printer:

cat sihp1020.dl > /dev/usb/lp0

As I mentioned /dev/usb/lp0 – my printer device in linux :)
so, :) what’s next?
As i recall that’s it… Just go to http://localhost:631 ? (I appeared to be :) after one of cups or cupsys is installed)

If something do not work after reboot or replugging USB printer we should copy paste script a to /usr/sbin/hplj1020 so script a:


#!/bin/sh

if [ -f /tmp/busy-prn ]; then
exit 99
fi

touch /tmp/busy-prn

sleep 2

D=$(awk '/Manufacturer/ {print $2} ' /proc/bus/usb/devices | grep -v Linux | wc -l)

if [ $D == 1 ]; then
# No daemon running
# Start daemon if printer is attached
if [ -e /dev/usb/lp0 ]; then
/etc/init.d/p910nd start
sleep 1
cat /root/sihp1020.dl > /dev/usb/lp0
fi
else
if [ $D == 0 ]; then
# No Printer attached but daemon running
# Kill daemon
/etc/init.d/p910nd stop
fi
fi

# Kill the spare process //hid3

kill `pidof p9100d | awk '{print $2}'`

rm -f /tmp/busy-prn


now copy:

cp a /usr/sbin/hplj1020

that’s it? ;)

External link:
https://answers.launchpad.net/ubuntu/+source/hplip/+question/45032

 

Flattr this!











 

Flattr this!

Hello, How are you?

I have missed functionality in my Lenny kernel… (I think it’s for the first time…) So I needed to compile my own Linux for my Debian GNU to make if even better then it is.

I have received Linux/kernel package from here and reiser4 grab it from here.


wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.tar.gz -c
wget http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.32.patch.gz -c


Adding -c if file with the same name exists continue downloading.

Unpackage everything. and move to linux source dir:


tar -xf linux-2.6.32.tar.gz
tar -xf reiser4-for-2.6.32.patch.gz

or if you have bz2
bunzip2 reiser4-for-2.6.32.patch.bz2
cd linux-2.6.32


now we need to patch our new Linux with a super puper function patch :) :


patch -p1 < ../reiser4-for-2.6.32.patch


So now we need to copy our working config file to linux directory:


cp /boot/config-`uname -r` ./.config


Now just make install of needed packages:


apt-get install kernel-package libncurses5-dev fakeroot wget bzip2 build-essential liblzo2-dev gzip


Then we need to enable Reiser4 in our kernel by executing:


make menuconfig
And selecting:

File systems —>
< *> Reiser4 (EXPERIMENTAL)


Now save config and the last but not the least step is making/compiling linux kernel:


make-kpkg clean
fakeroot make-kpkg –initrd –append-to-version=-custom kernel_image kernel_headers


How we just need to install these debs:


dpkg -i linux*.deb


What’s for RPM’s?


make binrpm-pkg


© 2012 LPIC - Linux Professional Institute Certification Suffusion theme by Sayontan Sinha