Tag Archives: Lenny

Debian GNU/Linux lenny (stable) + cups + hplip + HP LaserJet 1010 + windows client

Sveiki,
kaip sekas?

Vat prireikė greitai išspręsti tokią problemėlę… Debian GNU/Linux lenny + HP LaserJet 1010 + Windows client 🙂

Taigi… Ką darom?
Na susidiekime CUPS su HP palaikymu…
aptitude install cups hplip -t lenny-backports
Dabar beliko tik sukonfiguruoti…

Tikiuosi samba jau susikonfiguruota.?.

Taigi atsidarom vi /etc/cups/mime.convs ir atkomentuokim:
application/octet-stream application/vnd.cups-raw 0 -
atsidarom failą:vi /etc/cups/mime.types ir ten atkomentuokit:
application/octet-stream
Tuomet vi /etc/cups/cupsd.conf ten paziurekite sias opcijas:
Listen *:631
<Location /printers>
AuthType None
Order Allow,Deny
Allow From 192.168.1.*
</Location>

Tuomet restartuokim CUPS 😉


/etc/init.d/cups restart


em, beje, uzeikim i http://localhost:631 ten pridekit printeliuka… 🙂
Ten eikime: Administration > Add Printer Čia pildome… Name bus matomas šiuo vardu.
Tuomet pasirenkame: HP Printer (HPLIP) ir ten pasirenkame iš sąrašo… na nepamenu dabar plačiau… 🙂

Taigi, jei jau spausdina… ( jei ne brūkštelkit, bandysim debug’inti )

Dabar samba 😉
Atsidarykime failiuką vi /etc/samba/smb.conf ir ten patikrinkime ir atkomentuokime:


[global]
printcap name = cups
printing = cups

[printers]
security = share
comment = All Printers
browseable = yes
path = /var/spool/samba
printable = yes
# guest ok = yes
guest only = yes
public = yes
read only = yes
create mask = 0700
create mode = 0700
use client driver = yes


Beliko tik perkrauti…
/etc/init.d/samba restart
lyg ir tiek 😉 Ai tiesa… draiveriuko juk reik!
Taigi draiveriukai:
XP
Vista (64 bit) ir Windows 7 (64 bit)
Vista (32 bit) ir Windows 7 (32 bit)

Ačiū
Internal Link:
SambA serveris mano namuose

External Link:
Sharing Printers With Windows PCs Debian and Windows Shared Printing mini-HOWTO

Debian GNU/Linux (stable / lenny) ATI Radeon X1950 Pro (two) dual head (monitors)

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 😉

HP10xx Hewlett-Packard LaserJet 1020 Debian Lenny (stable) english

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

HP10xx Hewlett-Packard LaserJet 1020 Debian Lenny (stable)

Tam naudosime:

heh, daugybe paketu prisidiegiau, tai nezinia ar kazko nepraleidau… (Galbut libusb, cupsys?)
Taigi pradzioje prisijunkim:


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


i byla: /etc/apt/sources.list.d/squeeze.list
tuomet susidiekime p910nd:


apt-get update
apt-get install p910nd


ir nepamirskime squeeze pasalinti is resursu: komandele:


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


Toliau mums beliko sudiegti draiveriukus musu printeriui ir paleisti spausdinimo demona…
Taigi p910nd spausdinimo demono konfiguravimas byloje: /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"
# pas mane jis prisijunge prie device: /dev/usb/lp0 ;)

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


Ir paleiskime si demona:


/etc/init.d/p910nd restart


Toliau parsisiuskime failiuka: sihp1020.dl ir issiarchyvuokime:


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


tuomet numeskim si firmware’a musu printeriui:


cat sihp1020.dl > /dev/usb/lp0


Kaip minejau /dev/usb/lp0 i cia prisilinkino mano usb printeriukas 🙂
toliau 🙂 kas?
lyg ir reiktu tiesiog uzeiti i http://localhost:631 ?

Norint, kad ikisus USB laideli dar reiktu nukopinti skripta a i /usr/sbin/hplj1020 taigi byla 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


Ir kopijavimas:


cp a /usr/sbin/hplj1020


Lyg ir tiek ;)

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

Debian 5 (lenny) xFce4.6 + compiz

Heh, kaip aš tokį pasišaipymą iš savo nešiojamo sumąsčiau? Ogi dėstytojas paminėjo, kad Microsoft idėjo vat gražų 3d efektą… na ir norėjosi jam parodyti, kad tas gražus 3D efektas yra seniena… ir jau senai naudojamas t.y. compiz, beril, compiz-fusion. Vat, nu teko pasiknist bet priverčiau veikti…

Pasinaudojant pora manualų ir pora patarimų. Taigi aš įdiegiau:


sudo apt-get install compiz compizconfig-settings-manager\
compiz-fusion-plugins-main compiz-gnome compiz-gtk


Na iš esmės visus compiz paketus… pažiūrėkite savo distribusijoje… toliau dar įdiekite fusion-icon paketą. Ir jo, pagaliau, aš paleidau savo compiz varikliuką, keitimas xfce4-session.rc ir tik fusion-icon paketo pagalba aš paleidau compiz varikliuką, nes kitaip jo neįstengiau paleisti, na jis pasileisdavo panaudojant compiz –reload bet… Beje, reik xorg.conf pamodifikuoti, pas man Intel vaizdo plokštė taigi viskas yra įjungta “By default”:


# 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”
# Jei ka tai šioje vietoje prisidedu klavietūros išdėstymus:
# Lietuvių ir rusų fonetinį (phonetic)
Option “XkbLayout” “us,lt,ru(phonetic)”#,ru(legacy)”
# Option “XkbVariant” “grp:alt_shift_toggle”
# Šioje vietoje, nustatau, kad perjungimas kabų būtų naudojant ALT + Shift
Option “XkbOptions” “grp:alt_shift_toggle”
EndSection

Section “InputDevice”
Identifier “Configured Mouse”
Driver “mouse”
Option “Protocol” “ImPS/2”
# Option “Device” “/dev/mouse”
Option “EmulateWheel” “on”
Option “EmulateWheelButton” “2”
# Šie nustatymai naudojami viduriniojo mygtuko įgalinimui, ThinkPad x61s nešiojamame
# Option “YAxisMapping” “4 5”
# Option “XAxisMapping” “6 7”
EndSection

Section “Device”
Identifier “Configured Video Device”
# Šis gali būt įjungtas arba išjungtas
Option “UseFBDev” “true”
# Driver “intel”
# BusID “PCI:0:2:0”
Option “XAANoOffscreenPixmaps” “true”
EndSection

Section “Monitor”
Identifier “Configured Monitor”
EndSection

Section “Screen”
Identifier “Default Screen”
Monitor “Configured Monitor”
EndSection
Section “Module”
# dabar negaliu rast, bet kažkur buvo minėta, kad reiktų įjungti šias sekcijas
Load “dbe”
EndSection
Section “Extensions”
Option “Composite” “Enable”
EndSection


Norite kad visuomet pasileidinėtų 3d aplinka, compiz varkiliukas? aš paleidau įdėjęs į Application Autostart tabą programoje xfce4-session-settings, jei nėra tokio… paieškokit xfce ir paspauskite TAB komandinėje eilutėje.

External Links

Debian compiz