Creating a graphical interface on top of SSH. How?

J

John F.

I want to write a client app in Python using wxWindows that connects to
my FreeBSD server via SSH (using my machine account credentials) and
runs a python or shell script when requested (by clicking a button for
instance).

Can someone give me some advice on how to create a "graphical shell"
per se?
 
A

Alessandro Bottoni

John said:
I want to write a client app in Python using wxWindows that connects to
my FreeBSD server via SSH (using my machine account credentials) and
runs a python or shell script when requested (by clicking a button for
instance).

Can someone give me some advice on how to create a "graphical shell"
per se?

Well, a "graphical shell" is just a wxWidgets application that exposes a few
widgets (buttons, list, whatever). Each widget has a "event" associated to
it and this event can trigger whatever command, even a remote command on
your FreeBSD server (via ssh). As a consequence:
- create your user interface (I suggest you to use wxPython and wxGlade for
this)
- associate to each and every widget a "event handler"
- make your event handlers call your scripts on your FreeBSD machine via SSH
(use PySSH or Conch for this)

Python has a couple of good implementation of SSH:
http://pyssh.sourceforge.net/
http://twistedmatrix.com/projects/conch/
Both of them are well documented.

You can find a small example here:
http://www.palovick.com/code/python/python-ssh-client.php

Do not use wxWidgets directly. You would have to re-create a lot of
Python-wxWidgets integration that already exists. Use wxPython instead
(www.wxpython.org). There is a quite good GUI builder for wxPython that is
called wxGlade. It can generate XML files that are easier to maintain than
C o Python code.

CU
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top