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


Tuesday, February 28, 2012

xbmc-live upgrade errors

when getting the next error during upgrade:


/var/lib/dpkg/info/xbmc-live.postinst: 165: cannot create /var/lib/polkit-1/localauthority/50-local.d/20-xbmclive.pkla: Directory nonexistent 


dpkg: error processing xbmc-live (--configure): subprocess installed post-installation script returned error exit status 2 


Errors were encountered while processing: xbmc-live E: Sub-process /usr/bin/dpkg returned an error code (1)


remedy:


sudo apt-get purge xbmc-live
sudo apt-get install upower acpi-support uxlaunch
sudo apt-get install xbmc-live

myunity for ubuntu

sudo add-apt-repository ppa:myunity/ppa
sudo apt-get update
sudo apt-get install myunity

Monday, February 27, 2012

Create APPlication Menu Links for used WEBAPPS

Create the needed files in /usr/share/applications/ and add the needed permitions (777 is ok)

*note to self: make sure u have the needed icons in the needed dirs.


XDA.desktop

[Desktop Entry]
Version=1.0
Name=Google Chrome
GenericName=Web Browser
Comment=Access the Internet
Exec=/opt/google/chrome/google-chrome %U --app=http://forum.xda-developers.com/
Terminal=false
Icon=/usr/share/pixmaps/xda.png
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/
https;x-scheme-handler/ftp;
X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito
Name[C]=Google Reader
Comment[C]=Google Reader
Name[en_US]=XDA
Comment[en_US]=XDA



XP Lite.desktop



[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=XP Lite
Comment=Starts the VirtualBox machine XP Lite
Type=Application
Exec=/usr/lib/virtualbox/VirtualBox --comment "XP Lite" --startvm "4461ed56-5c4c-4627-a77
d-6c02226f0d5d"
Icon=virtualbox-vbox.png




 Reader.desktop

[Desktop Entry]
Version=1.0
Name=Google Chrome
GenericName=Web Browser
Comment=Access the Internet
Exec=/opt/google/chrome/google-chrome %U --app=http://www.google.com/reader/view/
Terminal=false
Icon=/home/dni/Pictures/icons/google-reader.png
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/
https;x-scheme-handler/ftp;
X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito
Name[C]=Google Reader
Comment[C]=Google Reader


Name[en_US]=Reader



Calendar.desktop

[Desktop Entry]
Version=1.0
Name=Google Chrome
GenericName=Web Browser
Comment=Access the Internet
Exec=/opt/google/chrome/google-chrome %U --app=https://www.google.com/calendar/
Terminal=false
Icon=/home/dni/Pictures/icons/calendar-google.png
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;x
-scheme-handler/ftp;
X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito
Name[C]=Calendar
GenericName[C]=Comet Engineering Contacts
Comment[C]=Gmail Calendar Interface


Docs.desktop

[Desktop Entry]
Version=1.0
Name=Google Chrome
GenericName=Web Browser
Comment=Access the Internet
Exec=/opt/google/chrome/google-chrome %U --app=https://www.google.com/calendar/
Terminal=false
Icon=/home/dni/Pictures/icons/google doc.png
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;x
-scheme-handler/ftp;
X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito
Name[C]=Docs
GenericName[C]=Comet Engineering Contacts
Comment[C]=Gmail Contacts Interface


 gmail.desktop 

[Desktop Entry]
Version=1.0
Name=Google Chrome
GenericName=Web Browser
Comment=Access the Internet
Exec=/opt/google/chrome/google-chrome %U --app=http://gmail.com
Terminal=false
Icon=/home/dni/Pictures/icons/gmail_logo_stylized.png
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;x
-scheme-handler/ftp;
X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito
Name[C]=Mail - Comet
GenericName[C]=Comet Engineering E-mail
Comment[C]=gmail interface




Automaticlaly mount the NAS Shares

add the smbfs package:apt-get install smbfs

apt-get install smbfs

add the smb share line in /etc/fstab

//n2200/NAS_Public /home/dni/NAS_Public cifs users,noauto,guest,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

this will allow default user to mount the main share 

*note to self: make sure the symlinks on the localfilesystem are setup on the main share so you dont waste time copying later with filebot .


FileBot and TED

Automaticaly manage media files:

install mediainfo:


apt-add-repository ppa:shiki/mediainfo
apt-get update
apt-get install mediainfo

get filebot .deb package from:

http://pkgs.org/ubuntu-11.10/getdeb-apps-i386/filebot_0.0.0r465-1~getdeb1_all.deb.html

and install it with:

dpkg -i filebot*.deb


Then Download Ted (stable and nigtly) - problem here is that latest nightly does not have english translation (stable has problems with reading some peers, and nigtly does not have english language, so I have to combine those both)

http://www.ted.nu/download.php

unpack both versions in /home/dni/ted (nightly) and /home/dni/ted_stable (stable version)

using nautilus (archive manager) open the ted.jar file from the ted_stable and go into ted/translations directory and extract tedLang_en_EN.properties file.

add this file to the nigtly (SVN) ted.jar (ted0972-0.972-SNAPSHOT.jar) in /home/dni/ted

now move /home/dni/ted to /home/dni/.ted

create a file /usr/bin/ted.sh and make it executable


#!/bin/bash


cat /proc/mounts | grep /home/dni/NAS_PUBLIC > /dev/null
if [ $? -eq 0 ] ; then
  echo NAS_PUBLIC is mounted
  echo starting ted
  java -jar /home/dni/ted/ted.jar
  exit
fi

echo "mounting NAS_PUBLIC and starting ted"
mount /home/dni/NAS_PUBLIC && java -jar /home/dni/ted/ted.jar
exit



create a file /usr/share/application/ted.desktop and make it executable


[Desktop Entry]
Name=Torrent Episode Downloader
Comment=TED Downloader
OnlyShowIn=GNOME;Unity;
Exec=sh /usr/bin/ted.sh 
Icon=winicon
StartupNotify=true
Terminal=false
Type=Application
Categories=GNOME;GTK;Core;Documentation;Utility;Internet



create a file /usr/bin/filebot.sh and make it executable


#!/bin/bash


cat /proc/mounts | grep /home/dni/NAS_PUBLIC > /dev/null
if [ $? -eq 0 ] ; then
  echo NAS_PUBLIC is mounted
  echo starting filebot
  /usr/bin/filebot
  exit
fi

echo "mounting NAS_PUBLIC and starting filebot"
mount /home/dni/NAS_PUBLIC && /usr/bin/filebot
exit



create a file /usr/share/application/ted.desktop and make it executable


[Desktop Entry]
Name=Filebot
Comment=FileBot Manager
OnlyShow=uIn=GNOME;Unity;
Exec=sh /usr/bin/filebot.sh 
Icon=/usr/share/pixmaps/filebot.png
StartupNotify=true
Terminal=false
Type=Application
Categories=GNOME;GTK;Core;Documentation;Utility;Internet


FileBot rename settings so XBMC can scrape it

/home/dni/NAS_PUBLIC/TV_SHOWS/{n}/Season{S.pad(2)}/{n}-S{s.pad(2)}E{e.pad(2)}-{t}.{ext}



my PPA Repositories

on main desktops


http://launchpad.net/~gnome3-team/+archive/gnome3 - gnome 3
https://launchpad.net/~ricotz/+archive/testing - gnome shell testing
https://launchpad.net/~n-muench/+archive/vlc - gnome3 extensions


https://launchpad.net/~n-muench/+archive/programs-ppa - filezila, gnucash wireshark
https://launchpad.net/~n-muench/+archive/calibre - calibre
https://launchpad.net/~ubuntu-wine/+archive/ppa wine
https://launchpad.net/~ajf/+archive/trg - transmission remote gtk
https://launchpad.net/~ferramroberto/+archive/java - sun java
https://launchpad.net/~jfi/+archive/ppa - psensor
https://launchpad.net/~n-muench/+archive/vlc - VLC
https://launchpad.net/~webupd8team/+archive/y-ppa-manager - ppa manager
https://launchpad.net/~llyzs/+archive/ppa - remmina remote manager (not working for 11.10 yet)
https://launchpad.net/~danielrichter2007/+archive/grub-customizer - gruub customizer
https://launchpad.net/~shiki/+archive/mediainfo - mediainfo - for ted and filebot automation


https://launchpad.net/~matthaeus123/+archive/mrw-gimp-svn - gimp svn



https://launchpad.net/~myunity/+archive/ppa - myuniti - unity configurator


On media server:

https://launchpad.net/~team-xbmc/+archive/unstable

Install PPA Manager Ubuntu


Open a terminal (hopefully this will be the last time you install PPA via the terminal) and type:
sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager

Once installed, go to “Applications -> System Tools -> Y PPA Manager“.
yppa-main

Hopefully  Future Y PPA Manager version will use internet to downlad descriptopns for PPA's :

Configure Touchpad on Aspire 7738G ubuntu 12.04



edit /etc/default/grub.conf and change line:


GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nomux"

run update-grub and restart

install the alps driver for ubuntu 

http://people.canonical.com/~sforshee/alps-touchpad/psmouse-alps-0.10/psmouse-alps-dkms_0.10_all.deb


configure /etc/X11/xorg.conf (if nonexistant Create it)



Section "InputClass"
   Identifier "enable synaptics SHMConfig"
   MatchIsTouchpad "on"
   MatchDevicePath "/dev/input/event*"
   Option "SHMConfig" "on"
EndSection


configure the psmouse module to treat the touchpad as a mouse with scrool

echo "options psmouse proto=imps"|sudo tee -a /etc/modprobe.d/psmouse.conf
sudo modprobe -r psmouse
sudo modprobe psmouse

Change hostname in Ubuntu

sudo /bin/hostname mynewhostname
sudo /bin/hostname > /etc/hostname
sudo nano /etc/hosts

Configure Asus eee 7'' to use only TV for XBMC on ubu

as root:

X - configure

copy xorg.conf.new to /etc/X11/xorg.conf

edit xorg.conf to look like this:





Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection


Section "Files"
        ModulePath   "/usr/lib/xorg/modules"
        FontPath     "/usr/share/fonts/X11/misc"
        FontPath     "/usr/share/fonts/X11/cyrillic"
        FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
        FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
        FontPath     "/usr/share/fonts/X11/Type1"
        FontPath     "/usr/share/fonts/X11/100dpi"
        FontPath     "/usr/share/fonts/X11/75dpi"
        FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/$
        FontPath     "built-ins"
EndSection

Section "Module"
        Load  "dbe"
        Load  "glx"
        Load  "record"
        Load  "extmod"
        Load  "dri2"
        Load  "dri"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection#Disable LVDS1 output
Section "Monitor"
        Identifier   "LVDS1"
#       VendorName   "Monitor Vendor"
#       ModelName    "Monitor Model"
        Option  "Ignore"        "1"

EndSection

#Enable VGA1 za primary Output
Section "Monitor"
        Identifier   "VGA1"
#       VendorName   "Monitor Vendor"
#       ModelName    "Monitor Model"
        Option  "primary"        "1"

EndSection

Section "Device"
        Identifier  "Card0"
        Driver      "intel"
        BusID       "PCI:0:2:0"
        Option "monitor-TV1" "TV1"
        Option "monitor-LVDS1" "LVDS1"
        Option "monitor-VGA1" "VGA1"
EndSection

Section "Screen"

        Identifier "Screen0"
        Device     "Card0"
        Monitor    "VGA1"
        DefaultDepth    24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                modes "1360x768"
        EndSubSection
EndSection




Enable VNC (Desktop Sharing) via Console


Install X11vnc
sudo apt-get install x11vnc
Set a password (as the user used to automaticaly log into the desktopl)
x11vnc -storepasswd
Make X to load X11vnc at startup
echo "x11vnc -display :0 -bg -nopw -noxdamage -forever" > ~/.xsessionrc

Search This Blog