Shane's ramblings
Discussions of Coldfusion, life, the universe, and everything

Home

Installing Ubuntu on Dell XPS 400 and E196FP Display

I finally broke down and switched my main desktop system over to Linux last week. The machine in question is a Dell XPS 400 which ships with the NVidia 6 Series graphics board which I heard could be a bit of a pain getting set up correctly. Not to be outdone by the video card, the flat panel did not want to report the dot clocks when the installer probed for it. This post is mostly for my reference, but maybe someone else might find it useful.

[More]

How Do You Setup Your Dev Environment in (Ubuntu) Linux

The last three months or so have been pretty entertaining. I have moved from working in Windows only environments to using Linux almost exclusively. I think the toughest learning curve comes from minor details I never had a need to worry about in Windows.

As an example, I created a /pub directory that contains all my local web roots such as /pub/localhost/www. Each new development application gets put in the same way. Scott Stroz did a great post on how he set up his dev environment so mine is roughly modeled after his recommendations.

That is pretty straight forward. The issues I am having has to do with file permissions once the directory structure is set up. Since I am the one that created the directories, I have no problems going in and editing files and such with CFEclipse. The real issues become apparent when helper apps like Transfer go to create the cache. Since the web root directory technically belongs to me I would assume the process ColdFusion is running under does not have write access to that directory. Currently I get around this by doing a "sudo chmod -R 777 /path/..." which recursively goes through the directory giving everyone read/write access. While this works, if I add a directory later on I have to rerun chmod.

Anyone else out there developing and deploying on Linux that would care to offer suggestions on setting directory permissions so its automatically read/writeable for users and services?

Starting ColdFusion on Boot with Ubuntu

Since my recent move to Linux I have been slowly but surely getting my development environment set up. In Ubuntu 8.10 it is fairly painless to get an ACME server up and running quickly. Apache, MySQL, and Eclipse are easily installed through package managers or using CLI tools in the shell. ColdFusion is easy enough to install as well, the main issue I had during my installation was the fact that ColdFusion did not start when the system booted using the install scripts installed by Adobe. Apparently the installer only likes RedHat and SuSE Linux so I had to do a little poking around to get it starting up automatically.

I will be the first to admit I currently know just enough about Linux to be dangerous. At any rate, here is how I got it working in case it may help someone else. If any gurus out there see me doing someone that is obviously wrong, please let me know!

First I created the scripts in /etc/init.d/ that will be used to start and stop the ColdFusion server. Using vi (running as root of course) I created coldfusion_start.sh and coldfusion_stop.sh to start and stop the ColdFusion server, respectively. The files short and to the point. As an example, here is my coldfusion_start.sh script:

#!/bin/sh -e
/opt/coldfusion8/bin/coldfusion start

The coldfusion_stop.sh file is almost identical except we send the stop parameter instead of start.

#!/bin/sh -e
/opt/coldfusion8/bin/coldfusion stop

After getting the scripts setup, we need to be able to execute them which is easy enough to do with a "sudo chmod +x /etc/init.d/coldfusion_start.sh" and "sudo chmod +x /etc/init.d/coldfusion_stop.sh" without the quotes, of course.

Now here is where my process gets a little less than scientific. Starting with /etc/rc0.d/ and working my way to /etc/rc5.d/ I looked for any symbolic links that had the Apache daemon starting or stopping. If Apache was starting I created a new symbolic link to my coldfusion_start.sh script and if Apache was stopping I created a symbolic link to the coldfusion_stop.sh script. I always made sure that ColdFusion was started or stopped after the Apache service.

For example, the link to kill ColdFusion in /etc/rc0.d/: sudo ln -s /etc/init.d/coldfusion_stop.sh /etc/rc0.d/K90coldfusion

The link to start ColdFusion in /etc/rc3.d/: sudo ln -s /etc/init.d/coldfusion_start.sh /etc/rc3.d/S95coldfusion

In retrospect, it may make more sense to stop the ColdFusion server before the Apache server is stopped but currently I have it starting and stopping after Apache. However, everything appears to be running smoothly.

XWindow Display Larger than the Screen

I ran into this problem when installing Untangle the other day and I have seen quite a few other people who have run into this problem.  In a note to myself, and hopefully help some other people out along the way, here is the solution.

I was installing Untangle on a Dell machine with on-board video which is setup with a 1MB video buffer in shared memory and when the XDM probed the video card I had some errors to the effect it could not probe the display device correctly.  The XWindow session started, but the screen was larger than the display resolution which meant I had to move windows around to even be able to view the window content. 

I did some digging around in the Untangle forums and came across a solution.  This works with Untangle, but it should also work with other distributions of Linux if you are having problems probing your video card.  In the case of the Dell machine I was loading it defaults to 1MB shared video memory for the video card.  Changing the shared video memory from 1MB to 8MB fixed the probing errors and the problem was resolved.  No more beating my head on a desk trying to figure out the problem.

Moving development to Linux

In an effort distance myself from all Windows based machines I have recently moved my main development machine to Ubuntu Linux. While the change has not exactly been seamless, I would say it has been fairly painless.

My main concern in moving to Ubuntu was the fact I primarily use wireless networking at home or at the office. When I do not have a wireless network available I also use my Sprint Mobile Broadband adapter which concerned me because I use it quite a bit. Doing a little digging around it was actually quite easy to configure the Sierra Wireless 595U adapter in Linux.

Next I just have to get the development environments working. Hopefully it will be just as painless getting Eclipse to work as getting the rest of the hardware setup.