Wednesday, July 28, 2010

Installing the latest nVidia driver on Ubuntu 10.04

I updated my kernel and I had to update my nVidia driver again. (One of these days, I will come up with a bash script to automate this)

If you just want to install driver that works, just go to
System > Administration > Hardware Drivers
and follow the instruction.

If you want to install the latest one. Here is the step
1. Download the driver from nVidia website (I am going to assume you are downloading to Download folder)
2. Open up virtual terminal by pressing Ctrl+Alt+F1. If you just see a black screen. Go back to the desktop by pressing Ctrl+Alt+F7 and follow this post.
3. stop your graphic user interface, gnome by
sudo /etc/init.d/gdm stop
4. You might get a bunch of error messages. Type Ctrl+Alt+F7 to check if gnome has shutdown. Type Ctrl+Alt+F1 to switch back to the virtual terminal.
3. cd ~/Download/ (this is where you downloaded the file from the website)
4. sudo sh NV
type Tab to complete and enter
5. You should be able to follow the instruction and finish the setup now.

6. But if you get this message: NVIDIA driver install - Error: Unable to find the kernel source tree. This command will fix the problem:
sudo apt-get install linux-headers-`uname -r`

You still might get an error message like:
ERROR: File '/usr/lib/xorg/modules/extensoins/' is not a symbolic link.
But you will be fine and the installation will complete.

Fixing virtual terminal on Ubuntu 10.04

Ctrl+Alt+F1 usually gives you a virtual terminal. But with grub2 on Ubuntu 10.04, something funny is going on and it gives you a blank screen as oppose to a virtual terminal (tty)
Here is how you fix it.

sudo nano /etc/grub.d/10_linux
Go to line 95 and find: linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
change linux to linux16
linux16 ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
Go to line 105 and find: initrd ${rel_dirname}/${initrd}
change initrd to initrd16
initrd16 ${rel_dirname}/${initrd}
Save and exit (Ctrl+o, Ctrl+x)
sudo update-grub

I had a solution for 9.10, but this solution works for both 10.04 and 9.10. Keep in mind that vga= option is now deprecated.

Friday, July 23, 2010

No Namoroka or Shiretoko, My old Firefox please!

If you see a blue orb and no fox on the icon, and your flash stops working, you are using an incremental release of firefox. You want your old Firefox back, here is how:
"System >> Administration >> Software Sources >> Other Software" and disable the
ubuntu-mozilla-daily ppa

Then type these in the terminal:
sudo add-apt-repository ppa:mozillateam/firefox-stable
sudo apt-get update
sudo apt-get upgrade

Thursday, July 22, 2010

How to Install and setup Dan's Guardian parental control with GUI on Ubuntu 10.04

Dan's Guardian is a parental control program for Linux systems. It's difficult to set it up, but once you do, it's very powerful.

If you are googling one of these messages, you are having a difficult time installing Dans Guardian:
sudo dansguardian restart
Firefox is configured to use a proxy server that is refusing connections
Error connecting to parent proxy
For some reason squid is not working very well, and /etc/init.d/squid will give you error messages. The steps shown here works, without squid. But the step 5 had a wrong directory. I simplified stuff and added something, so I recommend you to follow the steps below

1. Open up a terminal and type these:
sudo apt-get update

sudo apt-get install dansguardian dansguardian-gui tinyproxy firehol
2. Edit: sudo gedit /etc/dansguardian/dansguardian.conf
a) Add "#" in front of UNCONFIGURED, which will comment the line out.
b) Add virusscan=off at the end of the line.
3. Edit: sudo gedit /etc/firehol/firehol.conf
Add all of the following at the start of the document:
iptables -t filter -I OUTPUT -d -p tcp --dport 3128 -m owner ! --uid-owner dansguardian -j DROP
transparent_squid 8080 "root root"
interface any world
policy drop
protection strong
client all accept
server cups accept
4. Edit: sudo gedit /etc/default/firehol
Change "NO" to "YES":
5. Edit: sudo gedit /etc/tinyproxy.conf
Change/add the following lines (by scrolling through the document):
User root
Group root
Port 3128

I found each one of them on lines: 15, 16, 23
6. Restart each program:
sudo /etc/init.d/tinyproxy restart
sudo /etc/init.d/firehol restart
sudo /etc/init.d/dansguardian restart

If you get error messages, ignore them
7. In Firefox: Edit -> Preferences -> Advanced -> Network -> Settings
Click the "Manual proxy configuration" and type the following:
HTTP Proxy: 127.0.01 Port: 8080
and check: "Use this proxy server for all protocols"
8. Configure Dans Guardian:
System >> Administration >> Dansguardian GUI
Click on Autoconfigure/Reset Dansguardian and Tinyproxy >> Okay
Click on Lock Firefox Proxy
Click Filter setting and choose which one you'd like.
If you ever need to change preference, Dansguardian GUI is the place you need to visit back

9. (Optional) Enforce Safesearch on Google. Credit:
Edit: sudo gedit /etc/dansguardian/lists/urlregexplist
Add these lines:

Update: You can use Dan's Guardian on Goolge Chrome by changing the proxy setting.
Options >> Under the Hood >> Change proxy settings
* Manual proxy configuration
HTTP proxy: 127.0.01 Port:8080
Also add "" on Ignored Host.
Unfortunately Chrome does not have lockdown option, so if your children are tech-savvy, avoid using Goolge Chrome with Dan's Guardian.

Why Dan's Guardian is so good

I am not a parent, but I am very much into parental control. I don't want to see any porn on my computer. Period. It's a distraction and I want to become a good father and husband one day, so I am training myself by abstaining. (And to not sin)

I used OpenDNS on my Linux machine but it was not enough. Google search did not enforce Safe Search, allowing racy and naughty pictures on my screen. It was a naughty no-no.
That's where Dan's guardian came to rescue. If you follow my instruction, you will be able to enforce VerySafeSearch on you ubuntu machine. Also OpenDNS does not have an extensive blacklist, just domain blacklist, but Dan's Guardian has everything. It can effectively select and ban: IPs, Sites, URLs, Phrases, MIME Types, and File Extensions. Only feature it lacks is the scheduled blocking, but I am fine without it.

FYI, I use K9 Web protection and OpenDNS on my Windows machine.

Monday, July 19, 2010

Installing another language on 10.04

1. Go to the menu: System > Administration > Language Support
2. Click 'Install / Remove Languages'
3. Choose the language of your choice
4. Make sure all boxes are checked: Translations, Input Methods, Extra fonts
5. Click 'Apply Changes'
6. Choose 'ibus' for Keyboard input method system. If this is greyed out or you cannot choose anything, simply close the window and repeat step 1

Make IBus start automatically when I restart my computer
1. Go to the menu: System >> Preferences >> Startup Applications
2. Click the button: Add
3. Type the following in each textarea:
Name: IBus daemon
Command: /usr/bin/ibus-daemon -d
Comment: Start IBus daemon when Gnome starts

Now you may go to System >> Preferences >> iBus Preferences
to set it the way you like it

The very first post! Welcome!

It has been two years since I have starting using Ubuntu. It's great when I got used it, but troubleshooting all these problems and errors were difficult as a beginner. I wrote pithy solutions for each problem I encountered and I though it would be great to share them. So I decided to make a blog full of easy-to-follow, tried-and-proven solutions.
There will be some advanced or cool things once in a while. But I hope you get to save a lot of time by coming to my blog and get to enjoy the world of Linux.