Install HP LaserJet M1132 MFP printer drivers at Ubuntu 11.10 Oneiric Ocelot Linux hplib hp-setup hp-plugin

UPDATE: For Ubuntu 12.04 it has become much easier to install the HP LaserJet M1132 MFP – use this guide instead if you have Ubuntu 12.04: LINK.

Start your terminal by pressing: CTRL+ALT+T

SKIP IF YOU ARE NOT 64 BIT USER
1. Setup 64 bit libraries for current user:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/

Make this permanent:
gedit ~/.bashrc

Add these two lines to the end of the file and save it:
LD_LIBRARY_PATH=/usr/lib64/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

Setup t4 bit libraries for root user:
gksudo gedit /etc/ld.so.conf.d/lib64.conf

Add the following line to the file and save it:
/usr/lib64/

Now run this command to load the root libraries:
sudo ldconfig

CONTINUE HERE

Then follow this guide: http://hplipopensource.com/hplip-web/install/install/index.html

if a plugin is missing, then run (requires that your internet connection is working and that the hplib mirror is online):
sudo hp-plugin -g

You probably have to exit the installer to restart at some point, then run “hp-setup” from the terminal when the computer has restarted.

DONE – gotta love Ubuntu – feel free to comment ๐Ÿ™‚

Unity Dash Privacy at Ubuntu 11.10 Oneiric Ocelot – hide porn folder

UPDATE: For Ubuntu 12.04 it has become much easier to hide a folder and in general keep things private – just go to “System Settings” and find the “Privacy” button at the “Personal” tab. If you have Ubuntu 12.04 or newer, then I will strongly recommend you to use the built-in Privacy system. However, if you are stuck with Ubuntu less than 12.04, then you can read the following guide:

The Activity Log Manager can exclude certain folders/files from showing up in the Unity Dash on Ubuntu 11.10 Oneiric Ocelot – e.g. your porn folder ๐Ÿ™‚

1. Download latest Activity Log Manager from this site (look for the “Downloads” section to the right of the page): https://launchpad.net/activity-log-manager

Here is a direct link for the lazy geeks (but that link will be outdated when a new version of Activity-Log-Manager is released):
http://launchpad.net/activity-log-manager/0.8/0.8.0/+download/activity-log-manager-0.8.0.tar.gz

2. Unzip the activity-log-manager-0.8.0.tar.gz to somewhere convenient – e.g. your homefolder:
/home/YOUR_USERNAME/activityLogJournal

3. Now open a new terminal window by pressing CTRL+ALT+T and navigate to the unzipped folder:
cd /home/YOUR_USERNAME/activityLogJournal

4. Now make activity-log-manager executable:
chmod +x activity-log-manager

5. Run activity-log-manager using the following command:
./activity-log-manager

(If there is some .py error now, then please write a comment to my post including the full error message and then I will try to solve it – It is probably just a missing dependency but make sure that you are using Ubuntu 11.10.)

You should see the following window:
Activity Log Manager used to exclude certain folders/files from Unity Dash on Ubuntu 11.10 Oneiric Ocelot - e.g. your porn folder :)

6. Click the “Files” tab.

8. Click where your username (YOUR_USERNAME) is located (look at where the cursor is located on the previous screenshot).

9. Click “other” and find the folder you want to exclude from the Unity Dash history.

10. Click “Ok” and Click “Add” and from now on that folder will be excluded from the Unity Dash history.

11. DONE. You can also delete any existing Unity Dash history by navigating to the “History” tab (which can be seen on the screenshot above), select the desired timeframe and click “Ok”.

Comments
I covered this topic for ubuntu 11.04 in a previous post (), but as that does not work anymore in Ubuntu 11.10, so I thought that I should publish a new guide ๐Ÿ™‚

You could also setup a new repository for activity-log-manager instead of downloading the source, but that seems overkill if you are only going to setup the blacklisting once like me.

Ubuntu 4 ever!!! ๐Ÿ™‚ Please feel free to leave me a comment, so I know that my effort is not wasted ๐Ÿ™‚

Ubuntu 11.04 Unity Dash Privacy

UPDATE: For Ubuntu 12.04 it has become much easier to hide a folder and in general keep things private – just go to “System Settings” and find the “Privacy” button at the “Personal” tab. If you have Ubuntu 12.04 or newer, then I will strongly recommend you to use the built-in Privacy system. However, if you are stuck with Ubuntu less than 12.04, then you can read the following guide:

GUIDE UPDATED FOR UBUNTU 11.10:ย http://www.andersaaberg.dk/blog/2011/unity-dash-privacy-at-ubuntu-11-10-oneiric-ocelot-hide-porn-folder/

Ubuntu 11.04 stores history in a component called zeitgeist. This history is also displayed when using the Unity Dashboard, which may show many irrelevant files or private files such as porn or microsoft love letters. Currently, the only way to avoid this is to install the gnome-activity-journal PPA, open it and add entries to its blacklist. Here comes the details:
Install the gnome-activity-journal PPA (the default in the 11.04 repository does NOT work):
sudo add-apt-repository ppa:zeitgeist/ppa
sudo apt-get update && sudo apt-get install zeitgeist gnome-activity-journal

Open gnome-activity-journal PPA -> Open “Preferences” -> go to the “Blacklist” tab and add entries such as:
file:///home/USERNAME/public_html/*
and
file:///home/USERNAME/Downloads/PORNFOLDER/*

Later a much better GUI called zeitgeist-global-privacy should makes this much easier.

Mount files in Ubuntu

UPDATE: Save yourself a lot of trouble and get the convenience of a GUI for mounting images – use the FREE program “Furius ISO Mount”, which you can find in Synaptic or the Ubuntu Software Center.. If you really want to mess with low level stuff and scripts, then you can use the following guide…

Instructions
sudo chmod +x mount.sh
sudo chmod +r mount.sh
sudo chmod +r unmount.sh
sudo chmod +x unmount.sh

Now you need to copy them nautilus scripts:

sudo cp mount.sh ~/.gnome2/nautilus-scripts/mount.sh
sudo cp unmount.sh ~/.gnome2/nautilus-scripts/unmount.sh

How to use
Rightclick on the image file (e.g. .iso) -> script -> mount/unmount
use the command wine path/to/file.exe to execute files on cd’s
Use IAT to convert weird formats to .iso (sudo apt-get install iat)

Installation
sudo chmod +x mount.sh
sudo chmod +r mount.sh
sudo chmod +r unmount.sh
sudo chmod +x unmount.sh

Mount-file
#!/bin/bash
#
# nautilus-mount-iso

gksudo -k /bin/echo "got r00t?"
BASENAME=`basename "${1%.*}"`
sudo mkdir /media/"$BASENAME"
echo $BASENAME

if sudo mount -o loop -t iso9660 "$*" /media/"$BASENAME"
then
if zenity --question --title "ISO Mounter" --text "$BASENAME Successfully Mounted.

Open Volume?"
then
nautilus /media/"$BASENAME" --no-desktop
fi
exit 0
else
sudo rmdir /media/"$BASENAME"
zenity --error --title "ISO Mounter" --text "Cannot mount $BASENAME!"
exit 1
fi

Unmount-file
#!/bin/bash
#
gksudo -k /bin/echo "got r00t?"
BASENAME=`basename "${1%.*}"`
sudo umount /media/"$BASENAME" && zenity --info --text "Successfully unmounted /media/$BASENAME/" && sudo rmdir "/media/$BASENAME/"

Best way to rip music from www.youtube.com in Ubuntu

Download videos:
Use Video DownloadHelper extention for Firefox to download videos as .flv or .mp4. (however its conversion functionality is buggy)

Rip video to mp3:
sudo apt-get install ubuntu-restricted-extras
sudo apt-get install ffmpeg
sudo apt-get install winff

Now find winff in Applications -> Sound and Video and use the GUI to rip the videos you have downloaded.

install and setup LAMP on Ubuntu for development

LAMP stack: Linux, Apache, MySQL, PHPMyAdmin

LAMP: Linux Operating System, Apache Webserver, PHP programming language, MySQL database, PHPMyAdmin database web interface

First install Apache2, PHP5, Mysql, Phpmyadmin in that order.

WEBROOT
########################
Then lets setup ~/public_html as webroot rather than /var/www/ (because it requires root privileges to modify there which is a pain!):

1. Copy the existing website configuration (virtual directory):
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mysite

2. Modify the following of mysite:
gksudo gedit /etc/apache2/sites-available/mysite
/var/www -> /home/USERNAME/public_html

3. enable mysite and disable default
sudo a2ensite
sudo a2dissite default
sudo /etc/init.d/apache2 reload

/home/USERNAME/public_html can now be accessed as webroot in webbrowser as http://localhost

PHP
########################
Setup PHP at this file: /etc/php5/apache2/php.ini
short_open_tag = Off (only use <php ?>? rather than non-standard <? ?> (inverted <)
error_reporting = E_ALL | E_STRICT (see all errors including the E_STRICT ones)
display_errors = On (obvious…)
display_startup_errors = On
html_errors = On

Remember to run this to update the apache configuration:
sudo /etc/init.d/apache2 restart

MYSQL
########################
user = root
Remember to use innoDB as storage engine for mySQL databases as it enables transactions and much more.

PHPMYADMIN
########################
access phpmyadmin at localhost/phpmyadmin (use “root” as user)

External guide with lots of more stuff including security: https://help.ubuntu.com/10.04/serverguide/C/httpd.html

Memory stick duo internal reader @ dell m1330 in Ubuntu 10.10 (Ricoh R5C592)

UPDATE: Ubuntu 12.04 includes the Ricoh internal card reader driver, so I will advice you to upgrade your Ubuntu to minimum 12.04 so you do not have to mess around with installing drivers for the Ricoh internal card reader… However if you are stuck with an old version of Ubuntu less than 12.04, then you can follow the guide below:

This is the essential information needed to install a driver for the Ricoh internal card reader (R5C592) so that it can read memory stick duo. It works for my Dell m1330 laptop.

I have got all information from the following bug thread and if there is any problem with my guide then it is probably a good idea to have a look at that thread (e.g. if the linux kernel is not supported):
link

Lets get started! First we gotta make sure that you have the particular memory stick reader chipset.

type the following command: lspci | grep Ricoh

It should output this (03:01.x can vary):
03:01.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)
03:01.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)
03:01.2 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)
03:01.3 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 12)

Now go ahead and click “download master.tar.gz” from http://gitorious.org/ricoh-kernel/ricoh-kernel/trees/master to download the needed driver. I have also uploaded a version of it here, but it might be outdated for the current kernel: ricoh-kernel-ricoh-kernel-master.tar Then unzip the folder.

Open the unzipped folder in a terminal, open to the subfolder “memstick” and write the following commands (if any of them fails, try preceding them with sudo):
make
make install
make load

Now the drive should be present!!!

Big thanks to the Maxim Levitsky for the driver and guidance!!

EDIT:
Be aware that you need to reinstall the driver each time you update the kernelโ€ฆ But I have made a simple gui based script to make it much faster to reinstall the driver: installMemstickDriver.sh

Just put the file in the root folder of the unzipped file (ricoh-kernel-ricoh-kernel-master.tar), make it executable and run it.

This is my first attempt in shell scripting so please donโ€™t be offended by my newbie mistakes.