Thursday, May 28, 2009

"Dansguardian does an outstanding job of web content filtering to protect from rubbish on the internet. This howto is a synthesis of information"

From "HOWTO: Install Dansguardian on a single desktop AND for a network":
HOWTO: Install Dansguardian on a single desktop AND for a network

Dansguardian does an outstanding job of web content filtering to protect from rubbish on the internet. This howto is a synthesis of information taken from:
http://www.pilpi.net/journal/item-985.php

Setting up Dansguardian using Tinyproxy and Firehol on Ubuntu/Edubuntu
...

Read more: http://ubuntuforums.org/showthread.php?t=207008.

Thursday, March 12, 2009

Minirok: A Nice Simple Music Player for Linux

From Minirok homepage:
Minirok is a small music player written in Python using Qt/KDE and GStreamer. The main interface is a tree view of the filesystem, with a playlist that can only be populated via drag and drop. There is no collection built from tags, so it’s targeted at people whose music collection is structured in a tree already at the filesystem level.

Tuesday, March 10, 2009

What is Firefox doing when it is using 100% CPU? 'strace' to the rescue!

I have found that you can use strace to see what system commands a Linux process is calling. For example, if Firefox is acting up, you can see if it is calling gettimeofday() over and over.

Thanks to Brett Smith for telling me about this!

Saturday, March 7, 2009

Edit DVD VOB files with Avidemux

Using Avidemux you can edit the vob files off a DVD (vob files are quite like or just like mpegs I think).

Friday, March 6, 2009

Getting Samsung SCX-4100 printer and scanner working

This is simply a paste from this guide: http://www.elijahlofgren.com/ubuntu/#scx-4100

If you have any suggestions for updates please let me know by posting a comment. Thanks!


Update March 6, 2009: You may be able to get the scanner working on Ubuntu Hardy Heron by following my guide here: Getting Samsing SCX-4521F printer and scanner working:

Last updated: March 1, 2008, I can't seem to get my scanner working on Gutsy :/


  1. First, you need to install some required libs and programs:

    sudo apt-get install libstdc++2.10-glibc2.2 libsane-dev sane sane-utils
  2. Download the Linux driver from the SCX-4100 Downloads page


  3. Open a terminal and change to the directory where you downloaded the driver (example: /home/install/samsung-scx-4100-printer):

    cd /home/install/samsung-scx-4100-printer


  4. Extract the driver (the driver could be named something different if it has been updated):



    tar -xzf 20070725084555687_UnifiedLinuxDriver.tar.gz


  5. Start the driver installation script:

    sudo ./cdroot/Linux/install.sh
  6. Press "4" because you want to install the "[4] SCX 4100 Series" driver
  7. Press "1" since you want to "[1] Install driver package".


  8. You should already have CUPS installed so Press "2":

    [2] I am sure I have necessary software installed. Continue installation

  9. You'll get a whole spew of stuff printed on the screen along with some errors that you can probably just ignore.


  10. Open /etc/cups/printers.conf Under "DefaultPrinter scx4100" change the "DeviceURI" so it looks like this:

    DeviceURI file:/dev/usblp0



  11. Restart cups:

    sudo /etc/init.d/cupsys restart
  12. If printer gets stuck in a stopped state do the following (on KDE, I assume Gnome has something similar)


    1. Click on "K Menu -> System Settings"
    2. Click on "Printers"
    3. The "scx4100" printer should already be selected, if not click on it.
    4. Click on the "Printer" button near the top.
    5. From the drop-down click on "Start/Stop Printer -> Start Printer"
  13. Printing should now work.
  14. {literal}

  15. Add the following 2 lines near end of /etc/udev/rules.d/45-libsane.rules
    (use sudo with your favourite text editor)

    # Samsung|SCX-4100
    SYSFS{idVendor}=="04e8", SYSFS{idProduct}=="3413", MODE="664", GROUP="scanner"
    
    Be sure to put it before LABEL="libsane_rules_end"
    All this does is make sure that the permissions for the device file is correct
    and setting its group to scanner. The device is identified by the vendor id and
    product id. So all users in group scanner will now have access to the scanning
    functions.



  16. Add the following 2 lines to the end of /etc/udev/rules.d/60-symlinks.rules
    (use sudo with your favourite text editor)

    # Create symlink for usb printer to /dev/usb/lp*
    BUS=="usb", KERNEL=="lp[0-9]*",         SYMLINK+="usb/%k"
    
    A usb printer is assigned the device file /dev/usblp0 (or whichever number at
    the end). See /etc/udev/rules.d/20-names.rules which is where it is assigned.
    These lines make sure that the devices are also symlinked to /dev/usb/lp0.


    These rules will be read and executed on startup so no other startup scripts
    are necessary.

  17. You don't have to restart just execute:

    sudo /etc/init.d/udev restart
    This will restart udev.
  18. Scanning using OpenOffice.org (Insert -> Picture -> Scan -> Request), and the GIMP (File -> Aquire -> xscanimage -> Device dialog...) should now work.

Guide: Getting Samsing SCX-4521F printer and scanner working

This is simply a copy and paste from "Elijah Lofgren's Blog: Log of Setting up Kubuntu Linux 8.04 for my parents" as I work toward centralizing some of my Linux  tips.

Printer

  • KMenu -> System Settings -> User Management -> Administrator Mode -> Users tab -> Select "family" -> Modify... -> Priveleges and groups -> Check "Use scanners" -> OK -> Close. (I don't know if this is needed)
  • Referenced and quoted: HOWTO Install Samsung Unified Printer Driver
  • From: http://www.samsung.com/us/support/download/supportDownDetail.do?group=&type=&subtype=&model_nm=SCX-4521F&language=&cate_type=all&mType=DR&dType=D&vType=L&cttID=801111&prd_ia_cd=06010300&disp_nm=SCX-4521F
  • Download this:
  • Here's what I did:
    • cd /home/install/Samsung-SCX-4521f-printer-driver/
    • tar xzf 20070720165133984_UnifiedLinuxDriver.tar.gz
    • mv cdroot /home/install
    • cd /home/install/cdroot

    • sudo chown -R root:root *

    • sudo ./autorun
    • "Go through the graphical installer, which doesn't ask much in the way of information."
    • Connected printer
      • Seems Kubuntu auto-detected and installed printer as SCX-4x21_Series?
    • "When you get prompted to select and install your specific printer, you may be successful if your printer is connected directly to your computer, turned on, and automatically detected, in which case go right ahead and select everything as you desire. Otherwise, cancel this step and allow the installer to finish."
      • I hit cancel since my printer was not detected.
    • sudo ln -s /usr/share/cups/model/samsung /usr/share/ppd/custom/samsung
    • Printed test page with Firefox 3 to SCX-4x21_Series and am satisfied with result.

Scanner:

  • KMenu -> Samsung Unified Driver -> Samsung Unified Driver Configurator -> Switch to Scanners Configuration -> results in "No scanners were identified"
  • sudo apt-get install xsane
  • sudo xsane
    • No scanners detected, so we need to fix something.
  • Reference: I DID IT!!!!! The SAMSUNG SCX-4200 now works on HARDY HERON!!!!!!
  • Edit /etc/init.d/mountdevsubfs.sh
    • Change this:

      •         #
                # Magic to make /proc/bus/usb work
                #
                #mkdir -p /dev/bus/usb/.usbfs
                #domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listm$
                #ln -s .usbfs/devices /dev/bus/usb/devices
                #mount --rbind /dev/bus/usb /proc/bus/usb
    • To this:

        •         #
                  # Magic to make /proc/bus/usb work
                  #
                  mkdir -p /dev/bus/usb/.usbfs
                  domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmo$
                  ln -s .usbfs/devices /dev/bus/usb/devices
                  mount --rbind /dev/bus/usb /proc/bus/usb
  • Now reboot.
  • Now run this and scanning works! :)
    • sudo xsane
  • Scanning with OpenOffice.org Writer does not work.
    • Insert -> Picture -> Scan -> Select Source
      • OpenOffice.org crashes.
  • Try scanning with the GNU Image Manipulation Program
    • sudo apt-get install gimp
    • Wait, not needed. the Samsung Unified Driver Configurator works :) 
  • Scanning with the Samsung Unified Driver Configurator
    • Double-click on "Samsung Unified Driver Configurator" on the desktop
    • On the left, click the scanner icon to "Switch to scanner configuration"
    • On the right, click "Properties"
    • On the top, click the big "Scan" button
    • Now you can click "Save" to save the scanned image somewhere.
      • I would change the "File type" to Portable Network Graphics (*.png)"