Saliya's Blogs

Mostly technical stuff with some interesting moments of life

Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Avoid Comcast DNS Hijacking in Ubuntu

Recently I switched to Comcast from AT&T because of an interesting deal on internet. Today I was on my Ubuntu machine in a different network and ran into the issue of not being able to connect to internet. After doing bit of looking into I figured that DNS is not working properly. I was getting a reply that had "hsd1.in.comcast.net" when I tried to do a host lookup (e.g. host -a google.com).

Then when I opened the /etc/resolv.conf I found that Comcast has inserted its nameservers into that and after removing those entries and setting the nameserver to Google's 8.8.8.8 I was able to connect and browse as usual.

Hope this helps someone in a similar situation!

Running MPI.NET Applications with Mono in Ubuntu

Sometime back I played around Mono to get some of our parallel applications running on Ubuntu. These applications were C# based and used MPI.NET.

The following blog post is a great starting point with all the details you'll need. So I'll skip the steps, except to point out couple of caveats you need to consider.

http://blog.biophysengr.net/2011/11/compiling-mpinet-under-ubuntu-oneiric.html


  1. automake versions above 1.9 will give you an error when building MPI.NET. May be you can change the make script to work with them, but I found it easy to just install automake1.9 to solve it.
  2. You'll need to add /usr/local/lib to your LD_LIBRARY_PATH. Essentially what you need to do is add this path to /etc/ld.so.conf and run ldconfig as root. See documenation from Mono on this at http://www.mono-project.com/DllNotFoundException
  3. Make sure to do chmod +x to your dlls

Command Line: Relaxing Colors

I have been using a color theme for the command line in both Windows and Ubuntu for sometime now and it has been really comfortable for the eyes. So if you feel tired or bored using the white on black try these.

Background Color: #3A4237 (in RGB this is 58,66,55)
Text Color: White

It will give you this feeling of a good old chalk board. Here's a screen capture of how it looks.

Windows7 and Ubuntu 9.10

I just wiped out my Dell Insipiron E1505 notebook and installed Windows7 Professional and Ubuntu 9.10. I had enough of the Windows XP Media Center Edition. I thought of moving to Ubuntu 9.10 as well, just feel the fun.

Unlike in the previous experience with Windows, the Windows 7 performs really well. Regarding Ubuntu, it's better than 9.04 (I was happy with 9.04 as well). The only funny thing is that I had to find drivers and manually install my ATI Raedon X1300 VGA for Windows7. Earlier I used to do this for Ubuntu installations :)

For the moment, these two OSs seems to be a great combination if you are planning to get the best of both worlds.

Running Matlab Remotely: ssh -X

I wanted to run Matlab by logging into the university account remotely from my machine. Everything went fine except for the graphics. Matlab started in no graphics mode.

After bit of a search I found the solution. You have to set the X11 forwarding in you ssh configuration file. Here's how to do it.

1. cd /etc/ssh
2. sudo vi ssh_config
3. uncomment the lines "ForwardAgent" and "ForwardX11". Set their values to "yes"
4. sudo vi sshd_config
5. uncomment "X11Forwarding" and set it value to "yes" as well.

that's it and you are good to go.

Type ssh -X username@domain

To test if everything works fine try running xclock once you log in. It should open up a graphical clock window.

Ubuntu 9.04: Way better than 8.10

I have used Ubuntu since it's version 6.04 simply because I felt that it is easy to work with. Anyway, for me, the versions x.04 never gave a good impression. So I used to say "hey! if it's not a x.10 version then it's not what I like". Interestingly, I am finding it is hard to say with Ubuntu 9.04.

Here's a list of things I felt really cool with 9.04.

1. No configuration necessary for the ATI drivers. Yea I had a really fun time configuring stuff with 8.04, 7.10, and 6.10 (Um, I can't remember what I did with 6.04).

2. External display detection is really awesome. It can even arrange the displays in any order I like (e.g. external one on top of default one).

3. Intel wireless card works like a charm.

4. Easy configurations for printers; hmm, I should really admire this.

5. Reliable (so far). Didn't crash, didn't reboot with errors, and most interestingly hibernate seems to work better than in previous versions.

6. Improved graphics.

In summary, I am beginning to like x.04 s as well :)

Running Scheme on Ubuntu 8.04

Just hitting "scheme" in the console does no good if you are in Ubuntu 8.04. A workaround is explained here (http://ubuntuforums.org/showthread.php?p=4868292)

Here's the solution in brief:

sudo sysctl -w vm.mmap_min_addr=0

Now run scheme

Ubuntu: Resizing Partitions

"No space left on device": Damn, how did this happen?, I told my self. I am pretty sure that I gave enough space for my home partition to carry on with Maven builds at WSO2. Out of curiosity, I issued df -h to see the partitions. Gee, I have accidentally assigned the larger partition to / (root) and smaller one for the home. The only solution is to resize the partitions. After a while, I remembered the great tool that comes with Ubuntu distribution, i.e. gparted.

I booted my machine using an Ubuntu CD and ran gparted. I was very much pleased with its graphical view and was done with my problem in just minutes. Initially my paritions were like,

|------------home----------|--------------/ (root)---------------------------------------------|

After resizing it looked like,

|----------------home----------------------------------------|----------------/ (root)---------|

I was pretty happy with this little tool since it saved me from one hell of a trouble.

ATI X1300 with Ubuntu 8.04 (Hardy)

In one of my previous posts I mentioned how to setup ATI X1300 graphics card in Ubuntu Gusty. Recently I installed Ubuntu Hardy because Gusty came up with couple of bugs. Unfortunately I had to set up my graphics card again :(

So I tried with the Unofficial ATI Wiki and it worked just as expected. Try method 2 mentioned here.

The great news is hibernation works with it :)

ATI x1300 with Ubuntu Gusty (7.10)

Ah! I had to give another fight to get my x1300 ATI card working properly with Ubuntu Gusty. The restricted driver that comes by default would correct the wide screen problem but video quality is changed. You will find lot of illuminant people while watching a film in totem.

So here goes the answer

Good luck and have fun :)

Ubuntu 7.10 on DELL E1505 Notebook

I installed Ubuntu (Gusty Gibbon) on my Dell notebook and I felt the beauty of it from the very beginning.

The two most interesting features I see:
1. Read/Write facility to NTFS (Windows) partitions
2. Easy configuration of restricted drivers (no need to worry about setting up your ATI video card :)

Installing ATI X1300 Raedon Mobility Display Driver in Ubuntu Edgy(6.10)

I was able to configure my graphics card (ATI X1300 Raedon Mobility) on my Dell Inspiron E1505 laptop from this nice link. However, I was bugged with the error "Xlib: extension "XFree86-DRI" missing on display ":0.0".". Then I found out that deactivating the composite extension in /etc/X11/xorg.conf would do the job.

Here's what I did from the beginning:
sudo apt-get update
sudo apt-get install xorg-driver-fglrx
sudo apt-get install linux-restricted-modules-2.6.17-10-generic
sudo depmod -a
sudo aticonfig --initial
sudo aticonfig --overlay-type=Xv

Now edit the /etc/X11/xorg.conf to include following three lines

Section "Extensions"
Option "Composite" "0"
EndSection

Note: You need to have root privileges to edit this file. So use the command sudo vim /etc/X11/xorg.conf

Then add the following line to /etc/modules

fglrx

Note: You need to have root privileges to edit this file. So use the command sudo vim /etc/modules

Finally press ALT+CTRL+Backspace to restart XServer

Type fglrxinfo in a terminal to verify your installation. You should see something like this

display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon X1300 Generic
OpenGL version string: 2.0.6011 (8.28.8)

Now it's DONE :)






Enable Opening of .rar Files from Ubuntu Archive Manager

Download the (latest) rar http://files.rarlab.com/rar/rarlinux-3.6.0.tar.gz

Extract the content using tar -xvvzf rarlinux-3.6.0.tar.gz

Copy the file "rar" inside the extracted folder to "usr/bin"

That's it and now archive manager can open .rar files.