= HowTo use the Shell Program How to Use the Shell Program (rwdshell) rwdshell is a web brower interface to operating system shell commands 1. run shell commands 2. run Ruby commands in the browser 3. use a calculator 4. Open brower windows with html documents The GUI interface used is RubyWebDialogs Start the program by typing ruby init.rb Then point your web browser to: http://localhost:7705/ == To use a shell command Enter the shell command you want to run for in the browser form and press execute. After a second the browser should fill with the results of the command. try ls, df, cat "filename", and other shell commands You should be able to run one command after another There are two ways to add scripts to rwdshell directory. == Creating a script 1. Use the "Create New Script" tab
The first field is the most important. It is the filename that will be created. myshellscript The following line for entry is a shell command. The last line is for comment to describe the script When you are finished press the CreateFile button 2. Manually add an entry for a script You can use a text editor to create a record put information on separate lines. You can have as many lines as you want name the file with caps and no spaces and end with .sh mynextscript.sh Save your file to the scripts/ subdirectory == Viewing a recorded script entry: * Go to "List Scripts" tab You can get a list of all scripts by clicking the listfiles button To see the text of a script Type in the name of the script you want. type it without the sh ending myscript Then click the "ViewScript" button If it finds the script it will open it. It displays the text the search box. == Ruby Commands At the Ruby tab here are some commands you might try print "hello" + "\n" bar=46; print "%s" % bar, "\n" "abc".each_byte{|c| printf "<%c>", c}; print "\n" "a\nb\nc\n".each_line{|l| print l} for l in "a\nb\nc\n" ; print l ; end print "%s" % "abcdef".length == Calculator add or multiply 2 numbers together == Documents when you click on a document name, the document should pop up in a browser window, or in another browser tab. To exit, press the x inside the browser window. Requirements: RubyWebDialogs - I am using 0.0.11 2004-3-9 This package you downloaded rwddemo should have a runtime version of the needed rubywebdialog files Ruby I am using version 1.8.2 I have tested this under Linux-Debian kernel 2.6.9 Operation: The code files reside in the code directory and are combined before the main Class is loaded The rwd files in gui are combined before the gui is activated Installing: untar the file tar zxvf rwdshell-x.y.tar.gz then cd to the directory cd rwdshell-x.y then start the init.rb program file ruby init.rb Trouble shooting: If the program is not working, try looking at the ev subdirectory. That is where the runtime of rubywebdialogs are. for long term installation, I would suggest putting most files in a lib directory like /usr/lib/rwdshell then make a writable directory the local directory for command files to be written like ~/rwdshell Closing the browser doesn't terminate the application. You have to use the application's close-button And terminating the application doesn't terminate the application when running in network mode. You just log out. Don't use the back-button of the browser! Strange and unpredictable things may and will happen! RubyWebDialogs is a platform independent graphical user interface for Ruby applications. It generates HTML and serves it with an internal HTTP server, so you can use your favorite web browser as the front end for your Ruby application. All this means, that it can be used on almost every platform, like Ruby itself. http://www.erikveen.dds.nl/rubywebdialogs/ For more information see: http://rwdapplications.rubyforge.org/wiki/wiki.pl For more information about RubyWebDialogs see: http://www.erikveen.dds.nl/rubywebdialogs/index.html Thanks, Steven Gibson == Changelog Version 0.3 Changed directory structure to work with rwdtinker 0.9 or greater. Improved the filename selection Changed the layout on the list screen