2016 Netconnect Update
As most of the Windows based computers in my family have now been converted to run Microsoft Windows 10, it became clear that a number of network service routines were changed. The NetConnect utility I created for my family to use needed to be updated to better handle error status. I updated the utility to handle the pre-existing connection better and deal with failed system calls. The tool continues to make it easy for my family to connect to and use the central Samba based Linux file server.
Eric C. Martinson, Software Professional
Thursday, April 28, 2016
Thursday, July 8, 2010
NetConnect - Update
The NetConnect utility I wrote in C# has gone through a number of updates since I started the project. At this point the software is installed on 4 machines in my house and all have simplified access to the file server as a result.
HW Eventually Fails-Believe It
During the last week of June my favorite desktop machine experienced it's final death rattle. About 2 weeks earlier I woke up on the morning I was scheduled to leave for Sacremento CA to coach my girls 18Gold softball team to discover the machine simply turned off. The other machines in the room were running with no evidence of trouble. I turned the machine back on and the disks ran through quite an extensive FSCK and rebuild, replaying large numbers of reiserfs transactions. I checked the various logs and didn't find anything too interesting. I simply assumed the power-off was due to a brown out, and that the power supply in this particular machine was more susceptible since the box had quite a large number of older hard disks.
I looked into 3 different updates to the machine. All 3 included a new 450watt power supply. The least expensive solution was a new motherboard and Intel Core 2 DUO 2.93 gHz processor. The most expensive was an I5 2.66gHz processor and corresponding processor. There was an AMD solution (quad core) in the middle. After reviewing performance characteristics from what I had to the 3 choices, I chose the least expensive and went with the Intel Core 2 DUO 2.93 gHz CPU.
What's Better
- Old Machine Summary
ASUS-M2V-MX Motherboard
AMD Athlon X2 64 bit CPU
Antec Case w/380W supply
2GB (1Gx2) DDR2 800 Memory
OpenSUSE 10.1 Linux OSX86_64
I looked into 3 different updates to the machine. All 3 included a new 450watt power supply. The least expensive solution was a new motherboard and Intel Core 2 DUO 2.93 gHz processor. The most expensive was an I5 2.66gHz processor and corresponding processor. There was an AMD solution (quad core) in the middle. After reviewing performance characteristics from what I had to the 3 choices, I chose the least expensive and went with the Intel Core 2 DUO 2.93 gHz CPU.
- New Machine Summary
ASUS P5G41-M LE/CSM Motherboard
Intel Core 2 DUO E7500 CPU (2.93GHz)
Antec Case w/450W supply
4GB (2Gx2) DDR2 800 Memory
Hitachi 750G SATA/300 Disk
OpenSuSE 11.2 Linux OS X86_64
What's Better
- The old machine used IDE drives for the linux installation and user directories. Linux used tuning of IDE interfaces. This was removed when SATA became the dominant drive type and the lower level interfaces were basically layered over the SCSI system. Now that the new machine is entirely SATA based, it is much quicker.
- Current Linux!
Having a machine that is more up-to-date has allowed me to install a number of applications that I couldn't use before. The most important is Google Chrome for Linux and the newer version of Thunderbird. - Faster!
The entire machine seems faster than the old system.
- The on-board video capability of the P5G41-M LE/CSM motherboard produces sharp and crisp video. The performance, however, is not very good. Screen updates for remote desktop displays is pretty slow. I'm planning on reinstalling Nvideo 8400GS based AGP video board I have which I'm hoping will resolve this problem.
Monday, January 12, 2009
NetConnect - A C# Project
My personal computer network consists of 7 machines running various operating systems including:
All of the desktop machines (Linux and Windows) share data from the Linux file server. The Widnows machine use a simple authenticated SMB connection to access the file space on the Linux server. In the past I have been created a batch file for my family members to use to connect to the server after they login to a PC. The batch file works but doesn't adapt well to network changes and requires that I had edit these files for them when I make a change. I started a project to create a simple GUI in TCL/TK to make the process easier but I didn't care for the final results of the GUI.
Recently I began exploring C# through the MS Visual Studio. After a number of examples from the tutorials I began writing a utility to replace the network connect batch file with a user interface that would allow easy connection edits but also allow for one click restores of the connection. Below is a screen shot of the resulting C# application:
The application consists of a table of work connections that associate network paths. The table is a GridDataView widget that allows for resizing and reordering the table per the users requirements.
The File menu has the following entries:
The Edit menu has the following entries:
The Speebar has the following entries that correspond to the File and Edit menus:

Connections defined in the tool can be saved to a file through the "Save connections" speed button or File menu entry. The file is saves as an XML file in the users data directory. Sensitive data in the connection file is encrypted to preserve security.
Connections can be verified/validated by using the "Check connections" speed button or File menu. The connection is verified as having a valid path and valid connection point.
The bottom of the window provides a status line and a color coded status symbol. A green status symbol indicates the connections have been loaded into the tool and have not been modified. A red status symbol indicates the connection table has been modified and needs to be verified/saved.
Connections defined by the user can be saved to a file. The file location is the application data path for the current user. This directory, under a normal installation, is secure and readable only by the user. If not, the user should secure the directory to make certain the file is only readable by the user. The contents of the file consists of the defined connections in XML format. The XML format was chosen to allow the contents of the file to be viewable. The password for the user of each connection is stored encrypted. Edits to the password field render the file unusable. If the password field is set to zero length or deleted, the file can be loaded but no password will be available.
NetConnect is used in one of two different ways. The first method is to create or define one or more network connections. The defined network connections can be executed by the user interface. If the connections are going to be needed again, they can be stored to the users connection file.
- Linux
- Windows XP
- Windows Vista
All of the desktop machines (Linux and Windows) share data from the Linux file server. The Widnows machine use a simple authenticated SMB connection to access the file space on the Linux server. In the past I have been created a batch file for my family members to use to connect to the server after they login to a PC. The batch file works but doesn't adapt well to network changes and requires that I had edit these files for them when I make a change. I started a project to create a simple GUI in TCL/TK to make the process easier but I didn't care for the final results of the GUI.
Recently I began exploring C# through the MS Visual Studio. After a number of examples from the tutorials I began writing a utility to replace the network connect batch file with a user interface that would allow easy connection edits but also allow for one click restores of the connection. Below is a screen shot of the resulting C# application:
The application consists of a table of work connections that associate network paths. The table is a GridDataView widget that allows for resizing and reordering the table per the users requirements.
The File menu has the following entries:
The Edit menu has the following entries:
The Speebar has the following entries that correspond to the File and Edit menus:

Connections defined in the tool can be saved to a file through the "Save connections" speed button or File menu entry. The file is saves as an XML file in the users data directory. Sensitive data in the connection file is encrypted to preserve security.
Connections can be verified/validated by using the "Check connections" speed button or File menu. The connection is verified as having a valid path and valid connection point.
The bottom of the window provides a status line and a color coded status symbol. A green status symbol indicates the connections have been loaded into the tool and have not been modified. A red status symbol indicates the connection table has been modified and needs to be verified/saved.
Connections defined by the user can be saved to a file. The file location is the application data path for the current user. This directory, under a normal installation, is secure and readable only by the user. If not, the user should secure the directory to make certain the file is only readable by the user. The contents of the file consists of the defined connections in XML format. The XML format was chosen to allow the contents of the file to be viewable. The password for the user of each connection is stored encrypted. Edits to the password field render the file unusable. If the password field is set to zero length or deleted, the file can be loaded but no password will be available.
How Is NetConnect Used?
<?xml version="1.0"?>
<!--NetConnect network connection defintiions-->
<!--Created: 1/19/2009 10:04 PM-->
<ConnectionSet>
<connection>
<active>True</active>
<path>\\bandura\disk1</path>
<target>S:</target>
<username>ericm</username>
<password>iZ37nyO2g6lOIO/FiLxOizaLnbiysl89rfFc5b/kPLc=</password>
<comment>Bandura file server mount</comment>
</connection>
<connection>
<active>True</active>
<path>\\bandura\disk2</path>
<target>T:</target>
<username>ericm</username>
<password>lAoPOPKlk3wVQ31Cjinu59hxYJ28OwbAjwLrXXvwLcg=</password>
<comment>Bandura scratch/video space</comment>
</connection>
</ConnectionSet>
NetConnect is used in one of two different ways. The first method is to create or define one or more network connections. The defined network connections can be executed by the user interface. If the connections are going to be needed again, they can be stored to the users connection file.
The second method is the automatic restore method. In the automatic restore mode NetConnecti will load the users default connection definition file and attempt to restore/establish the defined connection. Automatic restored mode is enabled using the following command line invocation:
netconnect /execute
Subscribe to:
Posts (Atom)



