Monday, March 5, 2012

list packages



for p in `dpkg -l |grep ^ii | tr -s " " | cut -d " " -f 2` ; do echo $p ; apt-cache show $p | grep ^Section: ; echo ; done > pckglist.txt

Listing all installed packages and sorting them by their installed size:

dpkg-query -W --showformat='${Installed-Size}\t${Package}\t${Status}\n' | grep "ok installed" | sort -gr > pckglist.txt

Thursday, March 1, 2012

xbmc add automatic subtitle downloader - periscope

add periscope ppa


 add-apt-repository ppa:patrick-dessalle/ppa

apt-get update
apt-get install periscope-gnome 

after that add the command to cron to do it daily

periscope /path_to_mounted_NAS/Moves -l en
periscope /path_to_mounted_NAS/Moves -l en

xbmc Wake On Lan

NOTE - STILL NOT WORKING :(

install needed packages

apt-get install ethtool wakeonlan acpitool

.....

Supports Wake-on: g
....

check the status of wht acpi

acpitool -w 

Device S-state Status Sysfs node
 --------------------------------------- 
 1. P0P3 S4 *disabled pci:0000:00:1e.0 
 2. P0P4 S4 *disabled pci:0000:00:1c.0
 3. P0P5 S4 *disabled pci:0000:00:1c.1 
 4. P0P6 S4 *disabled pci:0000:00:1c.2 
 5. P0P7 S4 *disabled 
 6. MC97 S4 *disabled 
 7. USB1 S3 *disabled pci:0000:00:1d.0 
 8. USB2 S3 *disabled pci:0000:00:1d.1
 9. USB3 S3 *disabled pci:0000:00:1d.2 
 10. USB4 S3 *disabled pci:0000:00:1d.3 
 11. EUSB S3 *disabled pci:0000:00:1d.7

find out the Device ID of the network card with lcpci 

 lspci -tv
-[0000:00]-+-00.0  Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller
           +-02.0  Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller
           +-02.1  Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller
           +-1b.0  Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller
           +-1c.0-[04]--
           +-1c.1-[03]----00.0  Atheros Communications L2 Fast Ethernet
           +-1c.2-[01-02]--
           +-1d.0  Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1
           +-1d.1  Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2
           +-1d.2  Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3
           +-1d.3  Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4
           +-1d.7  Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller
           +-1e.0-[05]--
           +-1f.0  Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge
           +-1f.2  Intel Corporation 82801FBM (ICH6M) SATA Controller
           \-1f.3  Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller


find out he id of the PCI Bus where tne lancard is connected


lspci | awk '/PCI Bridge/ { print $1

enable acpi bus on landcard and on pci bus

acpitool -W 3
acpitool -W 3



create wakeonlan script in /etc/init.d




#!/bin/bash
COMMAND="$1"
case $COMMAND in


start|stop)
echo "wakeonlan"
ethtool -s eth0 wol g


  ACPIDEV="P0P3"
  echo "Enabling ACPI device $ACPIDEV so that WOL works..."
  #
  if acpitool -w | grep -q "$ACPIDEV.*enabled"; then
    echo "Already enabled"
  else
    acpitool -W $(acpitool -w | awk -F. '/'"$ACPIDEV"'/{print $1}')
  fi
  ACPIDEV="P0P5"
  echo "Enabling ACPI device $ACPIDEV so that WOL works..."
  #
  if acpitool -w | grep -q "$ACPIDEV.*enabled"; then
    echo "Already enabled"
  else
    acpitool -W $(acpitool -w | awk -F. '/'"$ACPIDEV"'/{print $1}')
  fi


exit
;;;


*)
echo "usage wakeonlan star|stop"
exit 1
;;
esac





run script and check if wakeonlan is enabled

ethtool eth0


Search This Blog