scottpeterman / UglyPTY

UglyPTY is much more than a PyQt6 SSH Terminal manager. It includes an extensible plugin tooling system. This includes NetBox integration, Built-in FTP,SFTP and TFTP servers for code upgrades, Data collectors and Automation tools and more.
4 stars 0 forks source link
automation automation-ui ftp-server muti-tab pyqt6-gui serial sftp-server snmpv2 snmpv3 ssh-client tftp-server topology-map

UglyPTY

UglyPTY is an extensible graphical terminal emulator built with Python and PyQt6. It provides a user-friendly interface for managing and establishing SSH connections, with some great productivity of features. This is the base product of many Network Engineering automation tools currently in development. A plugin based system for adding features to the application is included in this release, along with some basic plugin examples. The best network automation tools are in python ... UglyPTY now has many built in tools from Desktop TFTP & SFTP Servers built in for code upgrades, to highly concurrent data collection automation.

UglyPTY Dark

Why?

The whole point of the UglyPTY project is not to solve every problem, but to provide a platform based on the tool network engineers use most - an SSH Terminal. Developers like text editors with add-on capabilites, this is just the equivilent for CLI focused engineers. Nothing in these plugins is supper special, I just wanted to provide enough example plugins that others could create there own tools. Both the usable .whl files, as well as original source code are included in the repo. And hopefully you enjoy using the base SSH application if thats all you need. You don't have to load any plugins to use UglyPTY, but remember, these are all beta tools, be careful ;)

Python needed a native SSH GUI Terminal

This application does NOT wrap a backend web server like Webssh. It DOES use xterm.js for terminal emulation.

Note: This is a VERY beta release with a lot of functionality.
Latest Changes: I am still adding capabilities

FTP/SFTP
SNMP Utilization
SNMPv2/3

Features

Built-in Tools

UglyPTY Dark
UglyPTY Light Splash

Installation

  1. Tested with Python 3.9.13 for Windows in venv, and Ubuntu 22.04 with Python 3.10. Other versions might work.
  2. Use PyPi unless you want to contribute.
  3. Use pip with an activated venv:

    pip install uglypty

    Linux dependencies

    You may also need to install libxcb with the following sudo apt install libxcb-render0 libxcb-shape0 libxcb-xfixes0

To start the application, navigate to the activated virtual directory, local keys, your session database, and log files will be here:

python or pythonw -m uglypty
python -m uglypty  --plugins-enabled

UglyPTY Plugins

Some plugins have been moved to the main application under "Tools". To use a plugin, download its .whl file and save it in a ./wheels directory where your UglyPTY application is installed. You will have to create this folder. Here is a list of just some of the plugins:

1. Ace Code Editor:  uglyplugin_ace-0.1.0-py3-none-any.whl
2. Dynamic Front End for Click based scripts: uglyplugin_click-0.1.0-py3-none-any.whl
7. CMD, Powershell and WSL2 Tabbed terminals: uglyplugin_terminal-0.1.0-py3-none-any.whl

Download More Plugins

You can find more about UglyPTY's wheel based plugins from github. You can download more .whl plugins from wheels.

catalog.yaml Explained

Only 2 example plugins are pre-entered in the pluging catalog. The catalog.yaml file contains metadata for all available plugins. UglyPTY's Plugin Manager reads this file, so if you download additional plugins, you will have to edit this file to get them installed and registered with the application. Each plugin has its entry defined by the following keys:

Example entry:

- name: "Ugly Ace Editor"
  package_name: "ugly_ace_editor"
  description: "An Ace based editor with some unique features."
  import_name: "uglyplugin_ace.ugly_ace.QtAceWidget"
  version: "0.1.0"
  source_type: "wheel"
  wheel_url: "./wheels/uglyplugin_ace-0.1.0-py3-none-any.whl"

A Note about Xterm.js

Features

A special thanks to those whose efforts this tool is built on (shoulders of giants and all that)

Screenshots

Here are some snapshots of UglyPTY in action:

UglyPTY Dark
UglyPTY Light Splash
UglyPTY darklight
UglyPTY Lightdark

Here are some snapshots of UglyPTY-Plugins in action:

UglyPTY Console
UglyPTY CLI Collector
UglyPTY parsers
UglyPTY Serial
UglyPTY Map
UglyPTY Sample Map

# UglyPTY Application Launcher

This guide provides instructions on how to create a desktop shortcut for the UglyPTY application on Linux. This method allows you to launch UglyPTY without opening a terminal window.

## Creating a Desktop Shortcut in Linux

Follow these steps to create a desktop shortcut that launches UglyPTY directly from your desktop environment without displaying a terminal.

### Step 1: Create the `.desktop` File

Create a new file named `UglyPTY.desktop` on your Desktop or in `/usr/share/applications` for system-wide use.

```bash
nano ~/Desktop/UglyPTY.desktop

Copy and paste the following contents into the file:

[Desktop Entry]
Type=Application
Terminal=false
Name=UglyPTY
Icon=application-icon-path  # Replace this path with the actual path to your application icon
Exec=sh -c "cd /path/to/app-folder; /path/to/venv/bin/python3 -m uglypty"
Comment=Run UglyPTY without a terminal window
Categories=Utility;

Replace /path/to/app-folder and /path/to/venv/bin/python3 with the actual paths on your system.

Step 2: Make the .desktop File Executable

Change the permissions of the .desktop file to make it executable:

chmod +x ~/Desktop/UglyPTY.desktop

Step 3: Allow Launching

If your desktop environment requires it (common in GNOME), right-click on the desktop icon and select "Allow Launching".

Step 4: Test the Shortcut

Double-click the shortcut icon on your desktop to launch the UglyPTY application. Ensure that the application starts without displaying a terminal window.

Troubleshooting

If the shortcut does not work:

Updating Paths

Regularly update the paths in the .desktop file and any associated scripts, especially after changes to your environment or system updates that might affect the paths.

Thank you for using UglyPTY!



## Package Distribution

```python
# Create a source distribution and a wheel
python setup.py sdist bdist_wheel

# Set up a new virtual environment
python -m venv test_env

# Activate the virtual environment
source test_env/bin/activate  # On Linux/Mac
test_env\Scripts\activate     # On Windows

# Install the wheel
pip install dist/uglypty-0.1-py3-none-any.whl

# Test your script
python or pythonw -m uglypty

# Use `twine` to upload your package to PyPI: 
twine upload dist/*