Results 1 to 9 of 9

Thread: Command line GUI - university project

  1. #1
    Join Date
    Jul 2010
    Beans
    13
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question Command line GUI - university project

    Ciao!

    This semester, for a software engineering class, I have a term project that involves using several software engineering tools, extensive documentation, and a functional end-product. From the available projects (supplied by the professor), I have chosen a "GUI to command line translator for Unix shell."

    My plan is to create a .htm page with an image. This image will have an image map implemented so that when the user clicks on a part of the image (ex. "Change Directory") it will push the command out to a terminal.

    That said, I am turning to Ubuntu community with a few questions:

    • I have seen on several example pages that such a program is feasible and has been done before. However, most of them are designed so that the web page is loaded from a server and then pushed out to the computer. I just want to run mine locally. In HTML, would my command look like this?:

    Code:
    <a href="COMMAND" target="where?"> <!--code for image map, etc ---> </a>
    • Does anybody have suggestions on what functions I should use? Common ones or useful ones? I was thinking that I would do mainly information-based commands, such as printing Operating System details, memory usage, etc etc.

    Thanks in advance to any and all replies!

  2. #2
    pricetech is offline Iced Blended Vanilla Crème Ubuntu
    Join Date
    Apr 2008
    Beans
    1,651

    Re: Command line GUI - university project

    Plenty of HTML tutorials on the web. That's where I'd start.

  3. #3
    Join Date
    May 2007
    Location
    East Yorkshire, England
    Beans
    Hidden!

    Re: Command line GUI - university project

    You'd have to set up a web server locally and probably use a server-side scripting language (such as PHP) for this. It would be much simpler to write your project in, say, Python using PyGTK or PyQT.
    Website | Blog | The Arch Hurd Project

    If you want to ask about something I posted, send a PM, as I don't watch many threads

  4. #4
    Join Date
    Mar 2008
    Location
    Earth
    Beans
    189

    Re: Command line GUI - university project

    Using HTML for the GUI is a bad idea; I would agree with the previous poster's suggestion to use Python.

  5. #5
    Join Date
    Sep 2007
    Location
    Christchurch, New Zealand
    Beans
    1,328
    Distro
    Ubuntu

    Re: Command line GUI - university project

    Due to security reasons you cannot issue system commands from html documents, not even with Javascript. It is howevere possible to do it with Java (e.g. see here for details) Your Java can be embedded in your html, but I suspect you will still have a battle with security constraints.

  6. #6
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: Command line GUI - university project

    Or PHP. Horde has a shell thing in its admin interface.
    「明後日の夕方には帰ってるからね。」


  7. #7
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Command line GUI - university project

    Quote Originally Posted by worksofcraft View Post
    Due to security reasons you cannot issue system commands from html documents, not even with Javascript.
    That's not strictly true, but you'd need to make Apache run as the root user rather than as the Ubuntu default "www-user". Webmin, for instance, is a full-featured administrative console for Linux with a self-contained web server that is written in perl and runs with root privileges.

    OP, I'd suggest you take a look at Webmin just to get some ideas.

    Webmin is not in the repositories for reasons given here. There are a number of articles out there on how to install it from the tarball available at webmin.com.

  8. #8
    Join Date
    Sep 2007
    Location
    Christchurch, New Zealand
    Beans
    1,328
    Distro
    Ubuntu

    Re: Command line GUI - university project

    Quote Originally Posted by SeijiSensei View Post
    That's not strictly true, but you'd need to make Apache run as the root user rather than as the Ubuntu default "www-user"...
    Oh... yes I hadn't thought of that. I was thinking sw0rn wanted to use it as a client-side html page on computers that might not even have Apache installed.

  9. #9
    Join Date
    Jul 2010
    Beans
    13
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Command line GUI - university project

    Thanks, everyone. With this in mind, I will venture forward and see what I can come up with.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •