Abstracting the Underlying Multiple Operating System Architecture for Comprehensive Command Line Graphical Interface.

Slides:



Advertisements
Similar presentations
By: Tony Andrews.  Linux directory ordering system  Navigating and creating directories ◦ Listing directories and files ◦ Creating directories ◦ Changing.
Advertisements

Linux, it's not Windows A short introduction to the sub-department's computer systems Gareth Thomas.
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
FILE TRANSFER PROTOCOL Short for File Transfer Protocol, the protocol for exchanging files over the Internet. FTP works in the same way as HTTP for transferring.
ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Jan. 27 th, 2009 Essential Unix Commands.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
Lesson 22 – Introduction to Linux Systems Administration.
1 Basics of Linux On linux machine: Login at your home directory Open a “shell” or “terminal” or “xterm” workspace (4) On windows machine Intall linux.
Lecture 01CS311 – Operating Systems 1 1 CS311 – Lecture 01 Outline Course introduction Setting up your system Logging onto the servers at OSU with ssh.
Very Quick & Basic Unix Steven Newhouse Unix is user-friendly. It's just very selective about who its friends are.
Virtual Machine and UNIX. What is a VM? VM stands for Virtual Machine. It is a software emulation of hardware. By using a VM, you can have the same hardware.
Quick Tour of the Web Technologies: The BIG picture LECTURE A bird’s eye view of the different web technologies that we shall explore and study.
Embedded Programming and Robotics Lesson 13 Basic Linux 1.
1 Some basic Unix commands u Understand the concept of loggin into and out of a Unix shell u Interact with the system in a basic way through keyboard and.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
Linux Shell. 2 Linux Command-Line Interface ■ Linux shells: A shell is a command interpreter that allows you to type commands from the keyboard to interact.
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Introduction to Linux Workshop February Introduction Rob Lane & The HPC Support Team Research Computing Services CUIT.
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
Unix Basics Chapter 4.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Carnegie Mellon Linux Boot Camp Jenna MacCarley, Peter Pearson, Shashank Goyal 9/19/2015.
PROGRAMMING PROJECT POLICIES AND UNIX INTRO Sal LaMarca CSCI 1302, Fall 2009.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Usage of Workstation Lecturer: Yu-Hao( 陳郁豪 ) Date:
Lesson 2-Touring Essential Programs. Overview Development of UNIX and Linux. Commands to execute utilities. Communicating instructions to the shell. Navigating.
Introduction to UNIX Road Map: 1. UNIX Structure 2. Components of UNIX 3. Process Structure 4. Shell & Utility Programs 5. Using Files & Directories 6.
November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions.
Tera Term Brian Smith Chris Vasse Zaheemat Adetoro William Newton Tom Presgraves.
Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason.
Introduction to Programming Using C An Introduction to Operating Systems.
CS252: Systems Programming Ninghui Li Slides by Prof. Gustavo Rodriguez-Rivera Topic 7: Unix Tools and Shell Scripts.
Linux Commands C151 Multi-User Operating Systems.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
Basic Unix Commands & GCC Saurav Karmakar Spring 2007.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Learning Unix/Linux Based on slides from: Eric Bishop.
Using UNIX Charles Duan FAS Computer Services June 12, 2016.
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Usage of Workstation Lecturer: Yu-Hao( 陳郁豪 ) Date:
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Tutorial Six Linux Basics CompSci Semester Two 2016.
Overview of Linux Fall 2016 Dr. Donghyun Kim
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Class Projects and Environment
SEEM3460 Tutorial Unix Introduction.
Getting started with CentOS Linux
Tutorial Six Recap & Linux Basics CompSci Semester Two 2016.
Andy Wang Object Oriented Programming in C++ COP 3330
FTP Lecture supp.
Some Linux Commands.
The Command Prompt Commands are the way to “do things” in Unix
Working with the Command-Line Interfaced
Web Programming Essentials:
Getting started with CentOS Linux
Andy Wang Object Oriented Programming in C++ COP 3330
UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill.
Video Notes.
Presentation transcript:

Abstracting the Underlying Multiple Operating System Architecture for Comprehensive Command Line Graphical Interface

Objectives  Bridge the gap for new users  Create a more user friendly environment with the Command Line feel  Dynamic program that fits the user’s needs

Design

GUI Interface

Data Storage Data about functions are stored in an XML file. Additional functions can be added as they are needed. Follows a standard format so Linux & Windows commands can easily be swapped and the same parser can be used. XML allows for commands to easily be added and removed (not hardcoded).

Data Storage This is what our XML syntax is: view help pages This command is used to view help pages for... Common parameters for this command include... man [-acdfFhkKtwW] [--path] [-m system] [-p string]... man formats and displays the on-line manual pages. If... Specify the configuration file... Specify the list of directories to... displays the manpage for the ls command displays very short description of what...

Parser The parser is the part of the project that takes the data from the XML and makes it available to the calling class. It is agnostic to whether the XML is for Linux or Windows. It simply takes the file as a parameter and parses it. It provides the parsed data as a series of get() methods. There are no set() methods.

Parser The parser generates a DOM (Document-Object Model) tree from the XML document. This tree is then parsed and the data from the tree is placed into a hash-table The hash-table structure allows very quick O(1) access time for the data. All the work is done on instantiation.

Testing Testing was crucial to make sure that everything worked. Several interacting parts Run with or without SSH Run on Linux/Windows/Mac Proper Dropdowns Help text Parser XML Files

Research and Operating System Principles Process Builder allows for execution of system processes similar to concepts of Process Creation in Chapter 3 of our textbook ProcessBuilder.start()  fork ProcessBuilder.waitFor()  join

Research and Operating System Principles

Threads used to isolate the execution of the thread so the main GUI remained responsive (avoids complexity of thread synchronization) two ways to implement threads in Java implement the Runnable interface extend the Thread class Research and Operating System Principles

Threads override run() method with code wanted to be run separately as a thread start a thread by simply calling the Thread.start() method. Research and Operating System Principles

Networking Class Sends commands directly to a server bypassing third party programs such as Putty or Chameleon Application receives output sent from server and displays it in the command prompt window.

Networking Class

Modification of the open source terminal emulator JCTerm by Jcraft. Licensed under GNU LGPL License (allows use of library in proprietary programs, either open or closed source) JC Term is in turn based on the JSch SSH client, also by Jcraft Licensed under BSD License (same restrictions as LGPL, BSD code used in Mac OS X)

Networking Class Features of JCTerm Local/Remote Port Forwarding SFTP Support SSH2 Protocol Support Pack Compression Support Anti-Aliasing (set to disabled for Morph)

Interfacing with Command Line If not using the networking class, the command is executed using on the user’s local operating system using the ProcessBuilder class. Since different tasks are independent and isolated processes, an additional command will be needed to get the current working directory. Works on any operating systems, but the syntax is obviously different

Interfacing with Command Line Windows Commands must be preceded by “cmd /c” This especially calls the Windows command interpreter with the /c switch indicating to execute the command and then exit Example: “cmd /c dir”  command to list contents of current directory To get current directory, append command with “ & cd” (ex: “cmd /c cd.. & cd”)

Interfacing with Command Line Linux Commands must be preceded by “/bin/bash -c” This especially passes the Linux command to the bash shell which then executes the command Example: “/bin/bash -c ls”  command to list contents of current directory To get current directory, append command with “;pwd” (ex: “/bin/bash cd..;pwd”)

Commands Linux Windows clear cp ls mv mkdir rm ps top kill cd Compilation commands (javac, g++, gcc) Execute commands (java, gdb, a.out) man grep locate lpr exit ping ifconfig vi cls copy xcopy dir move mkdir rmdir del tasklist taskkill cd javac java help find findstr print exit ping ipconfig rename

References Alexander, A. (2010, February 4). Java exec - execute system processes with Java ProcessBuilder and Process (part 2). devdaily. Retrieved December 2, 2010, from Class ProcessBuilder. (2010).Java API. Retrieved December 2, 2010, from ml Class System. (2010). Java API. Retrieved December 2, 2010, from Display ToolTip in JComboBox. (n.d.). Happy Codings - Java Programming. Retrieved December 2, 2010, from Drake, Donald. G. (1996, April 1). Introduction to Java threads.JavaWorld. Retrieved December 3, 2010, from /jw-04-threads.html Freitag, P. (2005, September 27). Parsing, Modifying, and outputting XML Documents with Java. Retrieved December 2, 2010, from

References From Runtime.exec() to ProcessBuilder. (2008). Java Tips. Retrieved December 2, 2010, from runtime.exec-to-processbuilder.html How to read XML file in Java. (n.d.). Java Tips - Home. Retrieved December 2, 2010, from read-xml-file-in-java.html Img source: JCTerm - SSH2 Terminal Emulator in Pure Java. (2010). JCraft. Retrieved December 2, 2010, from Jericho HTML Parser. (n.d.).Jericho HTML Parser. Retrieved December 2, 2010, from JSch - Java Secure Channel. (n.d.). JCraft. Retrieved December 2, 2010, from Tutorial: XML generation with Java. (2002, July 5).JavaZOOM. Retrieved December 2, 2010, from XML Tutorial. (2010). W3Schools Online Web Tutorials. Retrieved December 2, 2010, from