Archive for March, 2005

Linspire Five-Oh! - Dual Display with nVidia FX5200 Ultra

Wednesday, March 30th, 2005

I’m assuming this fix will work for most, if not all FX-series cards. Simply follow the steps below to get your Linspire set up on dual monitor view:

  1. Open /etc/X11/xorg.conf in a text editor of your choice (I use Kate).
  2. Look for a section labeled “Devices”.
  3. At the end of this section insert the following 3 lines:
     Option "TwinView" Option "MetaModes" "1280x1024,1024x768" Option "TwinViewOrientation" "LeftOf"
  4. Adjust the following to your needs:
    a. The first entry in the MetaModes line is your Monitor1 resolution, the second entry your Monitor2 resolution, regardless of placement on your desk. Monitor1 is usually your main monitor that you have been using so far.
    b. The option in the TwinView Orientation line is the placement of the additional monitor in relation to your main monitor. Known values are “LeftOf” or “RightOf”.
  5. If you like to see the nVidia logo while booting up, comment out the line in the same section that reads Option “nologo”.

In summary, your Devices section should now look something similar to this:

Section "Device" Identifier    "Device1" Driver        "nvidia"#    Option    "nologo" BusID        "PCI:2:0:0" Option "TwinView" Option "MetaModes" "1280x1024,1024x768" Option "TwinViewOrientation" "LeftOf"EndSection

If things turn out not to be working right and you end up hanging on reboot, simply do a hard-reboot and load in Rediscover mode.

Linspire Five-Oh! - Boot Up with NumLock On

Monday, March 28th, 2005

I know this one may sound a bit mundane. However, it did take me this long to figure out how to get this working, so if you’re wondering how to get Linspire to boot up with your NumLock on, and you happen to be browsing my Blog, then this is for you:

  1. Click Launch -> Settings -> Control Center.
  2. Selecte Peripherals -> Keyboard.
  3. Make sure that “NumLock on KDE Startup” is selected to “Turn On”.
  4. Click “OK”.

That’s that! Happy computing!

Linspire Five-Oh! - How To Make Windows Partitions Accessible

Monday, March 28th, 2005

Ever since I installed Linspire, I couldn’t figure out how to give standard users access to the other (windows) partitions on my computer. However, the admin user had access, but it’s a pain to always log in and out of that account just to copy over a few files, etc.

After some resarching and asking around on the Linspire forums, I was presented with the following answer:

  1. Open /etc/fstab with Kate or a similar text editor.
  2. Change the partition entries to include ‘umask=0′ in the options column (the 4th column that also has entries like ‘exec,suid,users’, etc.
  3. Save the file and to a quick restart.

Now your entries should look something like:

/dev/hda1    /mnt/hda1        ntfs      noatime,user,exec,dev,suid,umask=0  0 0

I would like to thank pvdl-of-afu.com of the Linspire forum, and all the others that made an effort to try to solve this dilemna. Also, I’d like to wish pvdl-of-afu.com all the best with his upcoming book on Linspire: http://afu.com!

Make your Blog Googable!

Friday, March 25th, 2005

You know, after even just a few posts it can get a it tedious to find information that has been posted in your blog in the past. One way around this is to add a google search to your blog. That saves you the time and effort of having to create your own search utility.

To do this, you need a few things:

Now that you have that, you’ll need to customize the search code a bit. Lets start with the base code (I’ll use the safe search code):

<!-- Google SafeSearch  --><center> <form method="get" action="http://www.google.com/search">  <input name="ie" value="UTF-8" type="hidden">  <input name="oe" value="UTF-8" type="hidden">  <input name="safe" value="strict" type="hidden">  <table bgcolor="#ffffff">   <tbody>    <tr>     <td>      <a href="http://www.google.com/search?safe=vss">       <img src="http://www.google.com/logos/Google_Safe.gif" alt="Google" align="middle" border="0" height="45" width="115" />      </a>            <input name="q" size="25" maxlength="255" value="" type="text">            <input name="sa" value="Google Search" type="submit">          </td>        </tr>      </tbody>  </table> </form></center><!-- Google SafeSearch -->

For my purposes I got rid of some ‘unnecessary’ things like the Google logo and reduced the button text to ‘->’. The main reason for this is saving space. I also added another form field that instructs google to search my blog site only:

<!-- Google SafeSearch  --><center>  <form method="get" action="http://www.google.com/search">    <input name="ie" value="UTF-8" type="hidden">    <input name="oe" value="UTF-8" type="hidden">    <input name="q" size="25" maxlength="255" value="" type="text">    <input name="safe" value="strict" type="hidden">    <input name="sitesearch" value="eureka.emmgee.com" type="hidden">    <input name="sa" value="->" type="submit">  </form></center><!-- Google SafeSearch -->

Google away, mateys!

Transparent Redirects

Thursday, March 24th, 2005

How to do transparent redirects if you don’t have control of the httpd.conf file (for apache servers) and can’t make symbolic links (no telnet access)? After much researching I didn’t like the answer I found at all: namely the most clumsy frame-in-the-hat trick. :(

Appearently the only way to keep a user from knowing the they are being redirected is to have the entry page be a full-page frame, which then will the desired source target. So if you want http://www.mygreaturl.com to point to http://www.mynotsogreaturl.com, you’d place the following in http://www.mygreaturl.com/index.html:

<frameset rows="*">    <frame src="http://www.mynotsogreaturl.com/"></frameset>

This is about the only way I could get this to work. But, like I said, there are numerous more elegant ways to do this if you have access to TelNet or even your httpd.conf file.

PHP - File Uploading How-To

Tuesday, March 22nd, 2005

Use the following code in your target page from the file upload form to handle saving the file on the server:

//set the destination directory$uploaddir = '/var/www/uploads/';//set the destination file name$uploadfile = $uploaddir . $_FILES['userfile']['name'];print('');//move file to designated directory, then test if successfulif (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)){    print('File is valid, and was successfully uploaded. ');    print('Here's some more debugging info:n');    print_r($_FILES);}//show if problems occurelse{    print('Possible file upload attack! Debugging info:n');    print_r($_FILES);}print('');

Link: http://www.php.net/features.file-upload

Cross-Plattform Versioning System: In the search for an alternative to VSS!

Tuesday, March 22nd, 2005

In a cross-plattform development environment, something that only works in windows is terribly restrictive. Its even worse, if there are no Linux clients available. In this case the dilema is Visual Source Safe. While a good package overall, I have identified the following shortcomings:
- No good rollout process.
- Server application is Windows only.
- Client application is Windows only. I haven’t been able to find a Linux client for this.
- In order to access the VSS database on a remote computer, you need to have VSS installed locally.

What I am looking for:
- A cross-plattform solution that provides clients for at least Windows and Linux.
- The server application itself can run on a windows box, but a solution that caters to at least Linux and Windows is preferrable.
- A system that supports incremental rollouts and patches, concurrent versioning, multi-checkout capable, …

So far I’ve come accross the following:
- JEDI CVS
- CVSGUI: graphical frontends for various CVS-based systems.
- TortoiseCVS: a windows client for CVS.
- GNU CVS: opensource CVS system.

Research to be continued on the various available packages…

Linspire Five-Oh! - Installing Bluefish 1.0

Saturday, March 19th, 2005

Heya folks!

In the past I had problems installing the new and improved 1.0 version of Bluefish (web-dev application for Debian-based Linux) in Linspire. However, I came across a helpful post on the Linspire forums that really helped me out:

  1. Edit /etc/apt/sources.list and uncomment the URL paths.
  2. Open a console window and enter super-user mode (su -> ENTER -> admin password).
  3. Type the following: “apt-get install bluefish”.
  4. Apt-Get will now download the latest version of Bluefish, including any missing dependencies, and install everything.
  5. To run Bluefish, navigate: L -> Run Programs -> Software Development -> Bluefish Editor.

During this installation I did indeed see some warnings pop up, however, everything seemed to work fine. My guess is that those were configuration settings that the apt-get package was expecting, but don’t exist in Linspire.

Happy coding!