Friday, July 29, 2011

Plumbing pipes and fittings comparison

Copper pipes must be replaced.  Minute holes developed in copper pipes over time lead to leaks, and millions of homes have no insurance once that sort of flood occurred.

Replacing all the copper in the home with plastic and sell the copper will make your a fortune.

The advantage of copper remains that it is rigid metal, and you can burn it without problem.  Also it act as earth point for the electrical system in homes.

Copper can be replaced by CPVC and PEX.  The other camp is PVC which is not copper compatible.  PVC is usually found outside houses for the main supply, and for irrigation.  PVC is not usually found inside houses as it cannot be used for hot water.

If your pipes are PVC, it does not make sense to change it to something else.  Unless you need to connect to metal devices.  I'm not sure what the code is, but screw them together is pretty easy and leak proof.  But anyway, threads are trouble.

In the copper/CPVC/PEX camp, all can be connected with push fittings.  CPVC is rigid, using glues, while PEX is flexible and uses clamps.

Almost certainly PEX is the material of choice whenever you can.  You don't need angle couplings to go round corners.  The total number of joints is less.  With clamps you can use it immediately.  If you don't want to invest in a good clamp for over $100, you can get push fittings at a few dollars each.

Measurements no longer need to be accurate, as long as the pipe is longer than what you wanted. For example, to replace a broken section of copper pipe or CPVC, you need to cut pipe to exact length and use unions to connect to the old pipes.  For PEX you just need two adapters and a length of pipe longer than the bad section.


Fittings/couplings/joining

Soldering copper pipes need a lot of clearance from the sides, or else you need a soldering shield.  Glues are best when you have little space to work with.

Push fit need to have clearance along the pipe to push things in, and to take it out.

Soldering and gluing are rigid joints while push fit couplings can be rotated freely.  This could be a good or bad point.  Ball valves with push fit ends are still able to rotate after you install it.  You need two hands to operate the valve handle.

Threads are trouble but they are compact compared to other reusable push fittings.  In practice, never assume that they are reusable.  The threads are so easily damaged when you screw it back again.  Often you can't even unscrew them apart in the first place.


Gatorbite vs Sharkbite

I used both but can't comment much other than that they works.  Threads always start dripping at the beginning, but somehow hard water seals the threads.

When you put two devices with push fit together, you need to use a short pipe to connect the two.  It's is bulky.  I was too stupid to use too short a pipe, and I can't even put the disconnect tool in place.  I saw the two apart.  The good thing about Sharkbite is that no matter how short the pipe left alone inside the coupling, you can take it out with a nose pillar and some patient.

Monday, July 25, 2011

Auto startup applications in Ubuntu Linux

Ubuntu has a startup menu as in Windows.  It's at System>Preferences>Startup Applications.  It's fine if it's a GUI user application.

If your application has no GUI, such as a command or a script, you can put it in .login.  Of course NOT, now they use .profile if you the default Gnome desktop.

Many applications can be a command or with GUI.  You can pick one of the two methods.

Many times you have a mix of both such as in a script, or you do not want to learn both methods.  Now here's some techniques for mix and match, either using .profile or Startup Applications.

First, the most troublesome are commands/apps that require privilege access.  "sudo yourcommand" do not usually works in Startup.  Instead you need "su-to-root -X -c command".  -X means it's GUI.

To eliminate superuser password prompt on some of the apps, you can do:

sudo visudo

add the following line to the end of the file:

yourusername ALL = NOPASSWD: /usr/sbin/firestarter, command2, etc

Never force edit when there are parse errors, or you need to go into recovery mode.  (The safer alternative using sudoers.d do not work using the same syntax.)

To run a command as a GUI program, all you need to do is give it a GUI terminal:

gnome-terminal -e "your command"

It's also the simplest way to say Hello World in Gnome.

Many times you don't really need the Startup App.  For example, you can put this in the .profile:

truecrypt mountfile /media/truecrypt1

Obviously the best thing about Linux is that backup is easy (via a command and cron) and built-in.  Backing up encrypted volumes into encrypted volumes is also the same.  You just need to mount the volume as above and then backup.  The alternative is to copy the whole encrypted volume, a few GB or much more usually, that you don't want to every day.  You can do incremental backup every hour.

In Windows it's terrible.