= RwdShell Program How to Use the Shell Program (rwdshell) == What is is rwdshell is a web brower interface to operating system shell commands download from http://rubyforge.org/frs/?group_id=444 run shell commands The GUI interface used is RubyWebDialogs Start the program by typing
ruby init.rb Then point your web browser to: http://localhost:7705/ == using shell commands 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 rwdshell scriptrunner 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 wser window, or in another browser tab. == Using over a Network To serve the application over your local LAN,change the last line in the init.rb file to something like: RwdTinker.file(RWDFile).serve(8080, "-r" ? ".rwduids" : nil) Then you should be able to login at: http://yourhostname:8080 You have to authorize yourself. The .rwuids example is a string with the name of the authorization file, relative to the home directory of the user that started the service. This file has to be in the form of: user1 = password user2 = pass phrase Thus the file .rwduids might contain: erik = secret == 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: unzip the file then cd to the directory unzip rwdashell-x.y.zip == 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.97 correct bug in shell command eval beginning to add context help updated for rwdtinker version 1.58 added rconftool use to update configuration files changed applets removal to not use external rm removed version number from directory name version 0.96 updated for rwdtinker 1.56 first debian version correct execute shell script to work with changed scripts directory version 0.95 added ruby script running add back window for more control tabs beginning of context sensitive help wider text boxes for configuration information updated for rwdtinker 1.51 - finds available port and remote control updated for rwdtinker 1.52 - can install applets from Gems version 0.94 updated for rwdtinker 1.44 - refactor gui directory structure version 0.93 updated for rwdtinker 1.42 - semi-live updating version 0.92 added script editing script deletion script renaming added English module to RubyEval added Env module to RubyEval combined scriptrunner HowTo into shell HowTo Changed order of tabs so script are first version 0.91 updated for rwdtinker version 1.3 Version 0.9 updated for rwdtinker version 1.23 Version 0.7 includes script playing and Ruby eval window. Version 0.6 added script runner list scripts create scripts Replaced Readme.txt with HowTo.html 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