eXTReMe Tracker
Jul 202012
 

In the newer versions of Linux, an open source driver is usually installed by default to run the graphic cards. However this driver can sometimes be absolutely messy, and it is essential to remove the Nouveau driver and install the binary driver from Nvidia.

However, if after you reboot into the service mode from grub menu, and try to install the NVIDIA-Linux-x86_64-xxx.run driver in the init 3 level, the program will kick you out saying that the Nouveau driver is still in use.

The way to disable the Nouveau drivers from kernel is to boot in the service mode and run the following commands:

echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf
 update-initramfs -u

Once its done reconfiguring the kernel, you will need to reboot, and again get to service mode.

After that, get into init 3 mode, and install the NVIDIA-Linux-x86-64.xxx.run script. The installation should be successful at this point.

Dec 062011
 

The newer releases of Ubuntu and Linux Mint have started getting stuck during LiveCD installation or after distribution/kernel upgrade.  Usually the point where it gets stagnant is when it reaches this line:

kernel_thread_helper+0x7/0x10

Nothing happens past that point. A solution or a workaround to this is to insert the nolapic acpi=off switch in the grub boot line. There are 3 ways to do this:

1: If you are starting a fresh install from a CD and the installation pauses at the kernel_thread_helper line, you need to restart your computer.

When you boot from your installation CD, choose F6 before you continue trying out the LiveCD. This give you boot option at the bottom of your screen.

At the very end of the line add nolapic acpi=off and hit enter to continue booting from LiveCD. In most cases this should work.

2. The same problem may arise when you do a distribution upgrade or even a kernel upgrade. In that case you need to change your grub.cfg file. Follow these steps:

sudo nano /boot/grub/grub.cfg

Enter your sudo password and it will bring you to your grub menu configuration.

Look for the section that read similar to this:

menuentry 'Ubuntu, with Linux 2.6.38-11-generic' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 set gfxpayload=$linux_gfx_mode
 insmod part_msdos
 insmod ext2
 set root='(hd0,msdos6)'
 search --no-floppy --fs-uuid --set=root 337e2841-fc82-61b3-84be-5a9c71ae43b8
  linux   /boot/vmlinuz-2.6.38-11-generic root=UUID=337e2841-fc82-61b3-84be-5a9c71ae43b8 ro quiet splash vt.handoff=7
 initrd  /boot/initrd.img-2.6.38-11-generic
 }

You want to change the line that I have identified above to read:

linux   /boot/vmlinuz-2.6.38-11-generic root=UUID=337e2841-fc82-61b3-84be-5a9c71ae43b8 ro quiet splash vt.handoff=7 nolapic acpi=off

After adding these switches to the boot menu option, press ctrl-X, then save and exit.

This is for a permanent change if you can boot using an older kernel.

3: If you cannot login to an older kernel or recovery mode because of the kernel_thread_helper error,  you have to press “e” (without the quotation marks)  to edit the boot options when you get the grub menu.

For the kernel you want to use, edit the end of the line that reads

linux   /boot/vmlinuz-2.6.38-11-generic root=UUID=337e2841-fc82-61b3-84be-5a9c71ae43b8 ro quiet splash vt.handoff=7

to

linux   /boot/vmlinuz-2.6.38-11-generic root=UUID=337e2841-fc82-61b3-84be-5a9c71ae43b8 ro quiet splash vt.handoff=7 nolapic acpi=off

Press Enter and you should be able to boot.

Sep 192011
 

The latest version of Ubuntu is heavily based upon Unity environment. Unfortunately Unity has no track record of playing nice with existing gnome programs. For network applications such as VNC, Unity crashes the program with whole bunch of errors. These crashes are observed occasionally in the Ubuntu 11.04 (Natty Narwhal) release, and most certainly in the latest beta 1 release of Ubuntu 11.10 (Oneiric Ocelot).

If you have gotten comfortable with Ubuntu and want to continue using Gnome as the main environment, you can do so by using Linux Mint 11 (Katya). It has the same repositories as Ubuntu and you can even use the ubuntu-restricted-extras and build-essential packages which lets you obtain some of the fonts, codecs and libraries that Ubuntu fetches for you.

Ubuntu is starting to put more emphasis on making their release into an eye-candy, at the cost of reduced functionality. Having used Ubuntu since Dapper Drake days, its sad to ditch it for another distro. IMO Ubuntu 10.04 was the cleanest distro they put out – things have been going downhill after that. Linux Mint on the other hand picked up at the point when Ubuntu started to go dysfunctional. It has everything that Ubuntu should have been. There isn’t much to write about Mint 11. Its very similar to Ubuntu 10.04, has a newer kernel 2.6.38.xx, clean graphics, and the same repositories as Ubuntu. The transition is very easy, and things look a lot more neater in Mint.

To recap: If you are currently using Ubuntu and are afraid to upgrade to the 11.10 release, your fear is quite justified. Make a backup of your /home folder and go for a clean install of Linux Mint instead. I moved to Mint about a month ago and have had a rather smooth sailing so far.

May 112011
 

For the first time I was able to get VNC to work with Ubuntu with Gnome session instead of a xterm on gray background. The steps involved were exactly the same as I was following earlier, with one exception: the setup of xstartup in the ~/.vnc folder.

For your xstartup file in ~/.vnc (the “.vnc” folder in

your home directory), you need the following:

#—————————–

#!/bin/sh

# Uncomment the following two lines for normal desktop:

# unset SESSION_MANAGER

# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic &

xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &

gnome-session &

# twm &

#————————

instead of uncommenting the lines as the script suggests, you change the window manager to gnome-session

make sure restart vnc4server

The line which got Gnome working was “gnome-session &”

========================================

Now for all the steps involved (works in Karmic Koala Alpha 2, Ubuntu 9.10, kernel 2.6.30-10)

1. Install ssh server, ssh client, VNC viewer, VNC server, and xinetd

sudo apt-get install openssh-server openssh-client vnc4server xinetd vncviewer

2. Setup the ssh password for your login

ssh-keygen

3. Test out the ssh server by typing in

ssh localhost or ssh your_login@your_ip_address

4. Then create a vnc password

sudo vncpasswd ~/.vncpasswd

5. Edit the xstartup file in ~/.vnc directory

For your xstartup file in ~/.vnc (the “.vnc” folder in

your home directory), you need the following:

—————————–

#!/bin/sh

# Uncomment the following two lines for normal desktop:

# unset SESSION_MANAGER

# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic &

xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &

gnome-session &

# twm &

————————

instead of uncommenting the lines as the script suggests, you change the window manager to gnome-session

6. Create a VNC desktop

vnc4server :1 -geometry 1024×768

7. Then to tunnel into your VNC desktop, first create a SSH tunnel by logging into SSH with the comand:

ssh -L 5901:your_ip_address:5901 your_username@your_ipaddress

8. Finally, load up your VNC desktop

vncviewer localhost:1

And now you are ready to use connect to your machine remotely and use administer the computer remotely.

P.S: If you are using a firewall (hardware or software, you need to get enable port forwarding and unblock ports 22 and 5900-5999 on the Ubuntu machine to allow SSH and VNC to be accessed.

May 112011
 

Running scripts in serial order on a multi-core machine will take quite a bit of time. If the tasks are repetitive, the command can be run under GNU Parallel.

You can install it on RPM or Debian based distribution from the GNU Parallel repository. Install the binary that fits your flavour of Linux. Please note that even though the latest release of GNU Parallel has a flavour of Linux associated with it, it runs on most of the older AND newer distributions. For instance I was able to install the April 21st 2011 release of amd_64 RPM on a RHEL5 machine, and it ran just fine for that 8 core machine.

After installation you can try it out on a sample directory by running:

ls -d */ | sed ‘s/\///g’ | parallel zip -r -q {}.zip {}

This will recursively zip all the directories within a given folder, in parallel. By default, it will use up the maximum number of cores, but you can check the man pages of parallel to check how to employ N number of processors to run the task in parallel.

ls *.jpg | parallel convert {} -resize 75% -quality 80% {}

If you have imagemagick installed, you could save a whole bunch of space by converting some of the high-res images to a slightly lower resolution. The above example will resize the images to 75% of their original size with 80% quality. The original images will be overwritten by the resize and downsampled ones. While this is running, you can fire up htop in another terminal window to watch all the processors working in parallel.

Mar 152011
 

If you are on a network that has MAC addresses hardwired, i.e. you can only access the network if a certain MAC address is plugged into a specific ethernet jack on the wall, you don’t have too many options.

One option I used recently is spoofing the MAC address of your device. Its done by editing the hardware address to match the MAC address of the device that’s allowed on that ethernet jack.

If you are using Linux, make a note of your current IP address in a text file.

sudo ifconfig -a | grep eth0 > ~/Desktop/netaddressbak.txt

Run the same command on the device that’s attached to the network to find its MAC address: Lets say its – 01:82:39:B2:41:30

Before you attach your new device to the ethernet cable, change its MAC address to the one listed above.

sudo ifconfig eth0 down
sudo ifconfig eth0 hw ether 01:82:39:B2:41:30
sudo ifconfig eth0 up
sudo ifconfig eth0 | grep HWaddr

This should now list the address as 01:82:39:B2:41:30.

You can now attach this device on the network to gain full connectivity (unless there are some programs that are supposed to ping every once in a while).

Apr 192010
 

For the first time I was able to get VNC to work with Ubuntu with Gnome session instead of a xterm on gray background. The steps involved were exactly the same as I was following earlier, with one exception:  the setup of xstartup in the ~/.vnc folder.

For your xstartup file in ~/.vnc (the “.vnc” folder in
your home directory), you need the following:
—————————–
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
gnome-session &
# twm &
————————

instead of uncommenting the lines as the script suggests, you change the window manager to gnome-session

make sure restart vnc4server

The line which got Gnome working was “gnome-session &”

========================================

Now for all the steps involved (works in Karmic Koala Alpha 2, Ubuntu 9.10, kernel 2.6.30-10)

1. Install ssh server, ssh client, VNC viewer, VNC server, and xinetd

sudo apt-get install openssh-server openssh-client vnc4server xinetd  vncviewer

2. Setup the ssh password for your login

ssh-keygen

3. Test out the ssh server by typing in

ssh localhost  or ssh your_login@your_ip_address

4. Then create a vnc password

sudo vncpasswd ~/.vncpasswd

5. Edit the xstartup file in ~/.vnc directory

For your xstartup file in ~/.vnc (the “.vnc” folder in
your home directory), you need the following:
—————————–
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
gnome-session &
# twm &
————————

instead of uncommenting the lines as the script suggests, you change the window manager to gnome-session

6. Create a VNC desktop

vnc4server :1 -geometry 1024×768

7. Then to tunnel into your VNC desktop, first create a SSH tunnel by logging into SSH with the comand:

ssh -L 5901:your_ip_address:5901 your_username@your_ipaddress

8. Finally, load up your VNC desktop

vncviewer localhost:1

And now you are ready to use connect to your machine remotely and use administer the computer remotely.

P.S: If you are using a firewall (hardware or software, you need to get enable port forwarding and unblock ports 22 and 5900-5999 on the Ubuntu machine to allow SSH and VNC to be accessed.

Jul 032009
 

For the first time I was able to get VNC to work with Ubuntu with Gnome session instead of a xterm on gray background. The steps involved were exactly the same as I was following earlier, with one exception:  the setup of xstartup in the ~/.vnc folder.

For your xstartup file in ~/.vnc (the “.vnc” folder in
your home directory), you need the following:
—————————–
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
gnome-session &
# twm &
————————

instead of uncommenting the lines as the script suggests, you change the window manager to gnome-session

make sure restart vnc4server

The line which got Gnome working was “gnome-session &”

========================================

Now for all the steps involved (works in Karmic Koala Alpha 2, Ubuntu 9.10, kernel 2.6.30-10)

1. Install ssh server, ssh client, VNC viewer, VNC server, and xinetd

sudo apt-get install openssh-server openssh-client vnc4server xinetd  vncviewer

2. Setup the ssh password for your login

ssh-keygen

3. Test out the ssh server by typing in

ssh localhost  or ssh your_login@your_ip_address

4. Then create a vnc password

sudo vncpasswd ~/.vncpasswd

5. Edit the xstartup file in ~/.vnc directory

For your xstartup file in ~/.vnc (the “.vnc” folder in
your home directory), you need the following:
—————————–
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
gnome-session &
# twm &
————————

instead of uncommenting the lines as teh script suggests, you change the window manager to gnome-session

6. Create a VNC desktop

vnc4server :1 -geometry 1024×768

7. Then to tunnel into your VNC desktop, first create a SSH tunnel by logging into SSH with the comand:

ssh -L 5901:your_ip_address:5901 your_username@your_ipaddress

8. Finally, load up your VNC desktop

vncviewer localhost:1

And now you are ready to use connect to your machine remotely and use t

Jun 242009
 

The upcoming release of Ubuntu 9.10 (Karmic Koala) is in its Alpha 2 stage at the moment. One outcome of having an alpha released installed on your machine is the massive amounts of daily updates – with a major kernel update every once in a while. Things were going pretty smooth with the Karmic Koala until it was on 2.6.30-9 kernel.

Just this morning, there were a bunch of updates listed in the update manager. Among the things that were in line for the upgrade was a brand new kernel, 2.6.30-10. The updating process itself went pretty well. Then when it was time to restart, I picked the newly updated kernel from the Grub expecting nothing unusual.

Booting options after updating to kernel 2.6.30.10

Booting options after updating to kernel 2.6.30-10

After selecting Kernel 2.6.30-10, all I got was a green screen and the computer refused to do anything past that point. The only alternative was to restart and boot with the 2.6.30-9 kernel which I am currently using to make this post.

Ubuntu Karmic Koala (Kernel 2.6.30.10): Green Screen Of Death

Ubuntu Karmic Koala (Kernel 2.6.30-10): Green Screen Of Death

It not something one sees that often with Linux distros. I saw it today!

P.S.: The newer kernel 2.6.30-10 has been fixed. It boots and functions normally now.

Feb 112009
 

There were unmet dependencies (libx264-59) for vlc and mplayer in the latest release of Jaunty Alpha. A bug report was filed by several users on launchpad.net

One of the users posted this workaround to get both mplayer and VLC working in Ubuntu (9.04) Alpha 4.

To solve the problem, just get libx264 here:
http://packages.ubuntu.com/us/intrepid/i386/libx264-59/download
Just installed it manually (sudo dpkg -i libx264-59_0.svn20080408-0.0ubuntu1_i386.deb)
I then installed mplayer and vlc using medibuntu repos.

Running:

sudo apt-get install mplayer vlc

Gets these packages working!

Feb 102009
 

The system beep is one of the most distracting and annoying occurrences when you are doing some constructive work. Be it working in a text editor, or a terminal, or a program window – wherever a sound notification is programmed into any module, it emits a fairly audible beep. To disable the beep, we have to disable the PC speaker by adding it to the blacklist.

sudo gedit /etc/modprobe.d/blacklist

Add the following line to the end of that file:

blacklist pcspkr

Save and exit. Then in terminal,

sudo modprobe -r pcspkr

This completely turns off the speaker. You won’t hear your system beep, even if there is something truly wrong. If you are doing something critical and need to rely on the beeps, comment out the line from the blacklist and run the modprobe command. Beeping will restart.

Jan 302009
 

Until today’s kernel update to 2.6.28.6, the Atheros wifi card was not functioning correctly. Since the update to new kernel, the wifi card can now be used with the ath5k module which can be found in linux-backports-modules.

In order to get the Atheros 5007EG card to work, you first need to disable the built-in hardware driver.

System >> Administration  >> Hardware Drivers > Deactivate “Support for Atheros 802.11 cards”

Selection of Hardware Drivers in Januty

Selection of Hardware Drivers in Januty

Disable the Support for Atheros 802.11 cards

Disable the Support for Atheros 802.11 cards

After the card has been deactivated, open the terminal and install the backports modules for Jaunty.

sudo apt-get update && sudo apt-get install linux-backports-modules-jaunty

Install Jaunty backports modules

Install Jaunty backports modules

This adds the ath5k module which supports the Atheros 5007EG card.

The computer needs to be Shutdown and powered back on. Somehow Restarting doesn’t work at times. The card has to be completely powered down for a few seconds and then started during power up.

You should be able to see the available wireless network list by clicking on the network manager icon. Thereon, you all know what to do :)

Jan 202009
 

The Alpha-3 version of Jaunty became available two days past the scheduled release date. It included the kernel 2.6.28.4. It’s the first (alpha) release to include a kernel that supports EXT4 filesystem. The EXT4 became officially available in Dec 2008, and in less than a month it was incorporated into the 2.6.28 kernel.

There are several sites which post the performance benchmarks for EXT4 compared with other filesystems.

1 2

EXt4 is supposed to be much faster than existing filesystems. Several people have reported a booting time between 21 and 25 seconds, which is the time taken from bootloader selection till the login screen appears.

But beyond fast loading the alpha leaves a lot of room for improvement. Its integration with the /home/user partition is pretty buggy. One of the least stable module appears to be the alsamixer. The interface of volume applet has been changed significantly and is actually a lot less intuitive and quite inefficient.

Screenshot of volume control applet

Screenshot of volume control applet

As you see, the controller has a horizontal slider instead of the conventional vertical slider. More interestingly, double clicking on the volume control icon doesn’t open up the mixer like it used to. I’ve yet to figure out the workings of this applet.

Perhaps I might have figured out its usage, but I can’t vouch for the accuracy. One way to do it is:

Volume control applet (right click) >> Preferences >> HDA xxxx (Alsa Mixer) >> Select the device you want to control >> Close

Screenshot of volume control prefernces

Screenshot of volume control prefernces

I was able to change the line-in volume for use with a TV tuner card by the procedure I described above.

However the alsa module is very unstable in its present state. It causes one or more applications to crash at random. Most crashes were encountered when playing some form of flash media. Skype fails to load altogether. As soon as the login information is entered, the program coredumps with the following errors:

user@user-computer:~$ skype
ALSA lib ../../src/conf.c:2700:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so
ALSA lib ../../../src/control/control.c:909:(snd_ctl_open_noupdate) Invalid CTL hw:0
Aborted (core dumped)
user@user-computerf:~$

The video drivers for nvidia cards have yet to be released. Searching for Hardware Drivers yields a blank window. The drivers nvidia-glx-17x and nvidia-glx-96 are present in the repositories but the installation messes up the X and gdm loading. The only way to get back to X, is to remove the nvidia drivers and install ubuntu-desktop along with xorg. Once its done, typing

startx

gets you back into GDM.

On wireless side, ath5k is not included in the default distribution and it is still quite a bit of hassle to obtain it from backports and blacklisting the ath_pci modules *.

All in all, there is a lot that needs to be done w.r.t. Ubuntu 9.04 before it is released as a beta and then finally as an official release in April. It would be nice to try out a fresh install including a brand new /home directory.

ETA: * The Alpha 4 release of Ubuntu and Kubuntu contained ath5k, even in the LiveCD, thus the part about Ubuntu (jaunty) not having support for Atheros cards out of the box is no longer valid. I haven’t heard other testers say anything since Alpha 4 came out, so I guess it must be working for quite a number of folks. Still no support for the ATI graphics card though.