John Mercier
programming
Page Menu

Stats
Weblogs: $site.weblogCount
Users: $site.userCount
Entries: $site.entryCount
Comments: $site.commentCount

Friends
  • Ed
  • Shane

Links

Categories

Feeds
Setting up nvidia drivers on ubuntu 9.10

I recently wiped my dell xps m1210 and reinstalled ubuntu. It has been over a year since I have had to worry about the nvidia support on linux I wanted to make a post about it so I can remember everything I have to do to get this thing working right.

For those of you new to this, linux does not like proprietary software. I'm not sure how this makes linux better than windows but it really makes it hard for new users to get the best out of their system. Some of the major issues that come with linux are easily fixed in windows. Those issues are dvd support, multimedia files (such as mp3, mp4, and avi), sound drivers, video drivers. Today I'm going to work on video drivers.

Ubuntu makes installing video drivers pretty easy. All I had to do to install it was click system->administration->Hardware Drivers. The program will look for a nvidia driver to activate and make it work. Now, this is much better than when I first started using linux. I used to have to download the source for the drivers, compile them, and install them.

There are many problems I have with the nvidia driver. For one thing I use a laptop. I need to be able to quickly hook up a second monitor and use it with my laptop closed. On ubuntu this is not a fast process at all. I need to switch to that monitor using Fn+F8 twice. Then, when I close the laptop it goes into sleep mode. So, I have to make sure that is turned off in power management. Now that I am on my other monitor I have to adjust the screen resolution. My laptop has a 1280X800 resolution and my monitor is a 1920X1200. I'm not going into any more details on how difficult it is to get everything properly setup. It takes way to long and it is one of those things that keeps users away from linux.


Google Chrome

I remember the first time I heard of google chrome I had just completed changing my OS from Windows XP to fedora linux. The change was complete and I had not yet tried running windows on a VM. I didn't try to install chrome until I switched from fedora to Ubuntu, when I found out that chrome does not hava a linux installer. It sucked that I could not use if at all but I decoded to try it on a windows vm. Well, now my browser experience is about to completely change because google has finally came out with a linux installer.

Google chrome beta is not in the ubuntu repository, and although I hate manually installing software I had to try this out. The browser is easy enough to install. Just go the the site, download the package, and use any package manager to install it. It's so nice that linux can easily install software. This is one of the reasons I decided to switch. I remember having to always compile software to get it working, and linux books always start out with compiling software from source to install it. For a new user this can be annoying. I don't think linux better at installing software than windows, its just that linux has improved so much that I love the way it works now.

There are a few issues that I have with chrome so far. First, it doesn't use the ubuntu theme at all. If there is a way to make it look like all the other windows I haven't found it yet. Second, the dialog boxes do not fit into my netbook's  small screen. This is a big deal to me since I use my netbook more than any other computer I have. Google should incorporate scroll bars into all dialog boxes so users can view content that may go off screen. Netbeans does this and it works great on my netbook.

One thing that I like about Chrome, besides its speed and awesome layout, is the extensions. The only extention I use is xmarks so this makes chrome more usable for me. So, the only thing that chrome needs to do is fix the dialog boxes and I will be sold on it. Google, thanks for this wonderful product. The wait was worth it.


Album Creator 1.0a

Image ConverterAlbum Creator 1.0a
Released: February 21, 2009
Created: April 2, 2007

Album Creator 1.0a is a program I wrote to generate the photo album for VAQ-138. It was really only used once, but I learned alot about swing, multi-threading, velocity, Netbeans, and Java2D. Please, read the webpage to learn more about why and how this program was made.


Added bookmarks using roller
Now all of my links to external sites are generated using the bookmarks stored in roller!

wired networking fixed on 1005HA
Today, I figure out how to install my wired lan driver on linux. It is pretty simple, but I had a hard time getting the AR81Family-linux-v1.0.0.10.tar.gz file. I emailed the atheros website to see if they could fix their broken links. Updates on that later. Here are the simple steps to get it working.

1. download the AR81 driver (I could only find the 1.0.0.9 version because the atheros website is broken).
2. switch to the src directory and run make
3. run make install

After this I had to restart and it worked.

Working theme

Hello everyone! Right now you may notice that everything looks like crap. Well you are going be dealing with this for a while and (depending on your opinion of my design skills) possible forever. That is right folks I'm working on my own theme.

So far, I only have the basic files set up in roller so that I can edit the theme at my own pace. I hope to have the theme work for the entire website (except old pages) using templates for the index and project pages.

As a side note I think I found a bug in roller. The roller-startup.log file cannot be set in the roller-custom.properties file. Let me explain. For some reason I was getting a long error in the Catalina output saying that the log file could not be created. This is probably because of my shared server environment being locked down and not allowing this file to be written wherever it goes by default. Anyways, I tried to change the property in the roller-custom.properties file (because that is where all changes should be, right?) and I still got the error. I believe that this property cannot be set in this file because the file is loaded after the log is used. So, I had to change the path in the file I'm not supposed to edit log4j.properties. Not a big deal, but the file says I should be making this change in roller-custom.properties.

Well that is it for my rant. I will continue working on the theme so things can look nicer.


Update

I just wanted to make a quick update here.

  • I upgraded roller to a new version
  • started work on a new front page
  • removed some of my old posts at moaxcp
My life has been crazy since getting back from Afghanistan. I have signed up for three classes, I have been studying for SCJP, and I am looking for a job. I want to start posting about these things once I get my routine down. Thanks for reading.

Album Creator 1.0.a
I just finished making a web page for a program I made. Check it out.

Circular String 2
Ok everyone, I finished making my CircularString class. For now, it does not use generics because I only need it for integers. That will be changed if I find a need for it. I have also made a CircularStringShift class that, instead of using a fillIndex, shifts the contents of the buffer and adds to the end. I tested both with 100,000,000 characters, and they are about the same speed. Here is the code.[Read More]

StringReaderInputStream

Have you every made your own InputStream such as a text formatter or a url extractor. In my case, I made an InputStream that can extract urls from any other InputStream and send those urls to an interface called LinkEater. What I want to talk about in this post is how I tested my LinkParserInputStream.

Everyone that claims to know java should know how InputStreams are designed. They use composition to modify the behavior or other InputStreams. InputStreams are a classic example of the Decorator pattern. I took advantage of this pattern when I made my LinkParserInputStream. It obviously HAS-A InputStream and when it is read from it looks for urls in its composit partner. Just what kind of InputStream can it contain? Well any, but what if you want to test it.

To test my LinkParserInputStream I made a class that can read from a string and return characters like an InputStream. By combining a StringReader with the InputStream interface I was able to do this very simply. I believe this pattern is called the Adapter pattern. Here is how the class turned out...[Read More]

Circular String

Here is a power point I made about Circular Strings. It is my own variant of a Circular Buffer.


Notes on spellcheck
This is a program that will basically spellcheck a single webpage. This is a research project that will help me learn the Java Application Framework, HTTPClient, downloading, parsing, and spellchecking. The things that I learn here will help me in another project I am working on.[Read More]

moaxcp
moaxcp is an old web site I created at johnmercier.net. I started working on this project in 2003 while I attending PTI. The web site is actually built on top of another project I made for blogging called blogson. Blogson has many blogging features but is not very good for everything a website might need. moaxcp was a presentation of every project I had made at that time.

Technology used: jsp, jdbc
Design Pattern: Model 1
The view is not seperated from the model or control at all. In fact, all three of them are combined. Each module of the program is in its own jsp file so the index.jsp only has to include the header, footer, left, center, and right jsp files. The index.jsp file also includes a connection.jsp file which connects to the database and creates a Statement object for all the modules to use. Each jsp file can include other jsp pages. This allows for a seperation of code but does not seperate the scope used for each jsp. This is slightly different from the traditional Model 1 approach but once the jsp is precompiled it all gets turned into one jsp page for the program.
Interesting featers:
  • The ant build script creates a build.properties file containing an auto-incrementing build number and date. This file is read by the jsp page to display the information.
  • The ant build script actually deployed the entire site, through ftp, to the host server.
  • The ant build script zipped all projects into a zip file for the Download section of the site.
  • The ant build script created md5 checksums for each download in the Download section.
Again this project was only meant to combine all of my projects in a webpage.

Why I love Math Class

My Math professor always has something interesting to say when it comes to making a point. Here is a quote from a pdf file:

The word term means a variable or any combination of arithmetic operations involving variables, such as

Math Equation 

or even something perfectly hideous, like

probability distribution

which is a 'probability distribution' function used in Statistics, its use being one reason that statistical predictions never match reality and governments should refrain from making them.


Roller

I've run into a few issues with the blogging software I'm using for this site. Here they are:

  • site model is not availiable by default
  • comments cannot be switched on
  • Tag cloud displays tags from draft posts
  • bookmarks are deleted when moved
  • themes cannot be completely created from roller

Honestly, I'm glad that roller has become an official apache project, but it has a few problems. I'm a big believer that once a program is installed I should not need go into the installation directory and edit text files just to set something up. I have a feeling that the first two problems are probably configuration issues, but I've been through the entire site and the two manuals and I have not found a thing that helps. Roller just seems like it is made for big blogger communities where administrators have time to figure these things out. For a one person blog though it is not too good. It would be interesting to work on these problems and fix them in the spirit of open source software, but I'm not sure I have the time to do that. The second and third issues would be easy but the last would be much harder. I will continue to look into these problems and see if I can submit a bug report.


Valid HTML 4.01 Strict