ReCoN |
Reusable Computer Network (ReCoN)The Reusable Computer Network (ReCoN) builds networks of computers from mini-itx, USB ThumbDrives and older computers. ReCoN uses two Linux distributions to create a powerful network of computers that can be built for next to nothing. The concept is based on the fact that, most homes, schools and businesses now have at least one new computer at their location and they also have a number of older computers they just do not know what to do with. ReCoN provides a way to leverage the one powerful computer to be used effectively by the older computers, the mini-itx computes and ThumbDrives in a network that is easily configured. The goal of ReCoN is to create a network of computers using available resources.
The ReUsable Desktop is a project to create a specific Desktop using the JWM Window Manager running on DSL. JWM is very lightweight and so runs fast on any hardware and also provides a lot of options that are easy to configure for the specific Desktop. The project focuses on a Desktop designed for a high school science lab that uses web based learning as a major part of the class. The design and choice of programs available to students reflects the need to help students focus on a learning environment with a minimum of distractions. The Desktop will be a simple single click to access all of the programs the students will use. This application can be easily modified to fit the needs of any family or business that would like to create a network.
There are several significant advantages of mini-ITX. The first of course is size. This form factor will provide you with significant size reduction so that you can either consider taking the project as a mobile solution, or save big on desktop space. You could easily save 90% in space reduction vs. a desktop case. Noise is another advantage. Many of these from factors have no fan options. The other major value is power consumption. A typical desktop situation may be a 17” CRT monitor and a ATX format tower with a 350 watt power supply. The 17” monitor will often use 350-400 watts making a power trail of 700-800 watts for a nice desktop. Now this does not even touch on the aspect of heat. If you put this kind of setup into a room with 30 other such machines you will need to turn on air conditioning to maintain a livable temperature and you would need to increase the electrical circuits in that room with additional circuits because one circuit could not handle this type of load from 30 such computers. The advantage here is that you can move from looking at 700-800 watts to 95 watts if you also purchase a 17” flat screen. This is a huge savings on power and suddenly the heat issue is non-existent.
The concept builds upon the approach of developing a server that holds most of the necessary applications. The workstation or host needs to have a way to boot to a USB ThumbDrive. The flexibility comes with the fact that the operating system on the workstation does not need to be modified. The USB device can be used to create individual desktops for each user. That individual desktop can then roam with the user to another workstation on the network. The ReUsable concept develops from the fact that the USB Drive is able to be used on multiple hardware sources as well as multiple operating systems and still provide the user with the same Desktop and options as well as their specific files.
Almost everyone has an old computer that is not being used. Corporations are plagued with what they can do with old computer hardware. Schools and non-profit organizations can get as many old computers as they want. The ReCoN Project helps people reuse this old computer hardware and make it user friendly. This program is small enough to only require 128 MB of hard drive space and 48 MB of RAM. And yet when it runs it will run as fast as the fastest computer simply because it uses so little hardware resources. There is a hidden file that allows you to modify the desktop icons. You can modify the ones that are there and what they look like. To see the hidden file open Emelfm and in the upper left hand side of the window you will see an H. Click on this H that will allow you to view hidden files. You will see a lot of files. The one you are looking for is called .xtdesktop. Notice that in Linux hidden files are always indicated with a leading period. For each icon on the desktop in this file you will see two files.
The first file is a .ink which looks like this:
This file lists the command to start the program. In this example: /opt/audacity/start-audacity It lists the Caption: Audacity which you can change by altering the text. It also lists the Icon. The X: and Y: are coordinates on the desktop where the icon will always appear.
You can copy this file to create your own or modify the existing ones. The second file listed in .xtdesktop is the .png or .gif that is used as an image for the icon. In order to see any changes the Window Manager must restart. If you right click and choose Window Manager --> Restart you will see your changes. Basically, the user may create an icon for any drive, file, folder or program on the Desktop.
Configuring Desktop IconsThere may come a time when you need to configure your own icons on the desktop. The process is not that hard, but there are a few things that may help you in the process. Icon Placement on Desktop The X:Y coordinates are important to know unless you are really interested in a mess. Remember Geometry in High School, well that's not it. Each of the icons has a X and a Y coordinate. If you think in terms of a spreadsheet the Y is a row and the X is a column, easier than Geometry. In the example, the X and Y coordinates for 20 icons is listed. Note: this is for setting icons up in the upper left of the screen.
Nmapfe will be the example for how to create a program link on the desktop. Icon Creation A link to a program will need to be created, it is important to get an idea on how to create some kind of icon to represent that program. In the lower right hand corner of the icons listed is an icon for the the program nmapfe. Nmapfe is a network program that is a great tool for scanning your own network to search for vulnerabilities. The first step to making this program work is to download the Mydsl extension from a mirror. You will need to download the nmap.dsl and the nmapFE-0.2.54.dsl. Download both of these programs and save them in /home/dsl, or what works best for you. Next open emelFM, highlight nmap.dsl, and then click the myDSL button on emelFM. This will install the first program. Then repeat the process for nmapFE-0.2.54.dsl. Open the program once they are installed with the command nmapfe from a terminal. The program will open, now take a screen shot using Gimp or another program. Once you have taken a screen shot, select the scale tool. The Scale Tool, which is located in the Gimp Toolbox, allows users to scale images down, or blow up images larger than their original size. This information box displays the original height and width of the image, the current height and width of the image, and the Scale Ratio, which shows the X,Y coordinates. The size of this image in the example is measured in pixels. This can be changed to other units as well simply by clicking the drop down arrow on the right.
Finally, when the image size has been modified to exactly the desired size, click “Scale” to view the new image.
Scale the image form nmapFE to 50x50. Save the image with a descriptive name, like Nmap.png. The image, which is now scaled, should be saved as a .png and saved into the .xtdesktop/ directory. Note that the directory is a hidden directory in /home/dsl, notice the “.” before the name. Turn on the ability to view hidden files in emelFM by clicking the “H” in the upper left hand corner. Create Program Link Each of the icons is link to a command that executes the program when it is clicked. If you right click one of the icons and select properties you will see an example of how to setup an icon on the desktop. The example listed below shows the core information in a link.. The easiest method is to open one of these icons from the .xtdesktop directory by right clicking and choosing properties.
table Icon Type: Program Caption: NMap Command: nmapfe Icon: .xtdesktop/nm2.png X: 203 Y: 309 end
The icon and link start are enclosed in the “table icon” and the “end” . “Type “ signifies the kind of icon link that is created, “Program” for example. The “Caption:” is the text that is listed under the icon on the desktop. The “Command:” is critical because this is what will launch the program that is connected with the icon. In the example, nampfe is the command to launch nampFE. Two important issues are relevant to placing a command in the “Command:” line. First, where in the file system, is the command? For example, if you wanted to start a program like nmapfe, how do you know where it is? One way to find the location of a program is to use the “which” command. To find nmapfe just use this command:
which nampfe /usr/bin/nmapfe
This provides the exact location. This makes sense, except why is the command listed as nmapfe instead of /usr/bin/nmapfe? The answer is that as a user on the system, the path for each regular user allows automatically to look in two directories for commands:
/usr/bin and /bin
The second is issue is who you are when you click on the icon. Any commands in /bin or /usr/bin directories will be in any user's PATH so they will not need to enter the whole path for the command. /bin and /usr/bin contain commands that both root and users will use. For example: /bin/mount is a command that root will mount directories but users will use this command to list mounted directories.
The root user is intended to run many commands that are not available to other users of the operating system. Here are several directories that are intended only for the root user: /sbin - This directory contains commands for modifying disk partitions (fdisk), changing boot procedures (lilo), and changing system states (init). /usr/sbin - This directory has commands for managing user accounts (adduser), configuring the mouse(mouseconfig) or keyboard (kbdconfig). Most daemon processes are also in this directory. If you will be running a program as root, then you need to be root when you click on the link. If you will do a sudo su, which means that you may be a regular user and then become root, it is important to put the full path in the command. The “Icon:” line is the path to the icon that you would like to use. It makes sense to save your icon that you will use in the .xtdesktop directory, remember this is a hidden folder. The X and Y coordinates have been covered so you end up with a new icon on the desktop that is a quick link to a program that you may use all of the time.
Change BackgroundsChanging backgrounds is easy. Right click the desktop select Desktop and then Wallpapers. Wallpaper.lua now has a color chooser for background color.
For example this desktop was created for a science department.
Creating Links to Remote Programs
The key to the whole concept is creating links to desktop icons that provide access to programs that cannot be run normally on a ThumbDrive, use Windows or cannot be installed on DSL for some reason. Using SSH to connect to another computer or server that has the programs running provides huge options for the use of this concept. It works well with old computers that were going to be thrown away, old laptops, thumbdrives, compact flash drives, mini-itx machines just about anything! In order to set this up you will need a Linux computer that can act as a server to enable the running of programs that are too difficult to run on DSL. For the example a CentOS machine was used. Basically to setup a machine to connect the DSL computer to you need to load a graphical interface and have a network card with connection between the two computers. Setup User AccountsOn the server you will need to setup all of the users who will be on the DSL machine. These users will need to have a username and a password which they will use to connect to the server. The significance of setting up the users on the server is that each user's home directory will be on the server so that backups can be performed and so that a user can connect from any location and still have their files available. As the root user, select System Settings on the server and then choose Users and Groups. This will open an interface to add users and groups. Choose Add User.
When Add User is selected, this window will open. Remember, that usernames and passwords are case sensitive. Enter the username and password as you create each user. The Login Shell is by default the bash shell and should be left that way unless you have a good reason to change it. Notice that the home directory for tom is /home/tom. This allows you to backup the entire /home directory and have all of the files of those on the network saved at once. CentOS creates private groups for each user. What this means is that no one else on the network can read or view any files of any other user. This provides additional security and privacy. At times it may be important to create a group directory that could be used by all users as a way of sharing information. This could be in an office or a family sharing ideas. To create a group that could be used by a number of users choose Add Group, you will see this window open in which you may name your directory.
This example shows the Group name is family, make the directory that you will share descriptive. Once the Group is created you will see it listed. Note that each user has a private group.
To add users to the Group select the family, or group name, and then choose Properties.
Check all of the members that you would like to place in the group. The users that you check will then have access to the group directory.
Once you have checked each user to be placed in the group you will then see those users listed.
Setup the SSH ServerSetting up the SSH server basically means making sure SSHD starts each time the server starts. Select System Settings and Services as the root user. Be sure that you are editing runlevel 5 and then check sshd and save your settings.
The next setting that needs to be configured is the firewall. Select System Settings, Security Level and then make sure that SSH is selected. This example shows that the server is only allowing SSH connections to occur which is typically the only service you need to provide on the network.
Once the server is setup, you will be able to configure a script that will allow you to run any program on the server off your DSL machine, including OpenOffice, Wine, Movies, ect.
Create Desktop Icons The process on how to create and install desktop icons is listed above. See the icontool movies as well. However, configuring local connections is somewhat different than creating encrypted network connections. The place to start with the process is the text for the icon on the desktop.
table Icon Type: Program Caption: Writer Command: aterm -T -e /bin/bash /opt/scripts/writer.sh Icon: .xtdesktop/writer.png X: 8 Y: 157 end
Note the “Caption:” allows you to signify the caption for the icon. The command is going to a script that has been placed in the /opt/scripts directory. You will need to create this directory. The reason for the creation of the directory is to keep users aways form deleting the scripts. The directory should be readable and executable by dsl the standard user. You will need to change this if you are using a different user. It is important to get the terminal command “aterm -T -e /bin/bash” in this line so that the command will work correctly.
Configuring the Scripts Caution...these scripts are experimental in nature and damage incurred to the planet is going to be your responsibility... be sure to backup your stuff. Create your script and save it in the /opt/scripts directory. Be sure to run this command to make it executable:
chmod 755 /opt/scripts/writer.sh
The actual script is simple and provides for the user to enter a password to access the server that the program is running off, OpenOffice Writer for example The # represent comments in the script. The “ssh -X -f” provides a way to run graphical programs from a server remotely. Enter the user name of the person who will make the connection and then follow that with the IP Address of the server that they will connect to. On an internal network you will not be able to ascertain any speed difference from a local application vs. the application running off the server.. The username precedes IP Address of the server followed by a space and then the path to any application the user has rights to on the server. This information is then directed into a terminal session so the user can type a password for accessing the application. The sleep 2 command allows the terminal to close after 2 seconds and just cleans up the desktop
#!/bin/bash This script can then be duplicated with small modifications for any program you would like to run on the server. This also also allows the user to save on the server instead of the local device. This is an important feature in an organization that needs to have backups of important information.
|