Butterfly: your terminal in the web browser

What is Butterfly?

Butterfly is a simple terminal emulator written in Python that can be used from a web browser… and it comes with some very interesting tricks up its sleeve, which other terminals should copy.

terminal butterfly

How to test Butterfly?

Butterfly It is developed in Python, and it installs in a matter of minutes. You just have to run the command pip install butterfly as root (to use pip you need to have the package installed python pip First). Then, you have to start the server using the command butterfly.server.py, and finally you have to access the terminal by entering the address in the web browser http://127.0.0.1:57575. To log into the shell with a different user, add their name to the URL, like this: http://127.0.0.1:57575/user/root.

sudo pip install butterfly butterfly.server.py --unsecure

Some tricks about Butterfly

Accessing the terminal from the web browser is fashionable, there is no doubt. However, Butterfly does come with a few extra tricks that make it really useful.

Perhaps best of all is the quick selection from history. Through the shortcut Shift+Ctrl+Up arrow can be switched to selection mode and then using shortcuts Ctrl+Shift+Up arrow y Ctrl+Shift+Down arrow you can select the text of the history you want. Then you just have to press Enter to paste the selected text.

terminal butterfly

The visual style is based on CSS so it is fully editable. Also, it is possible to easily extend the behavior of the terminal via JavaScript (this is how the quick select function is developed, for example).

How to install Butterfly permanently

To run Butterfly from the system startup using systemd you have to download the file butterfly.service and put it in / etc / systemd / system / or equivalent. Then, you have to run:

sudo systemctl enable butterfly sudo systemctl start butterfly

Ready. Now Butterfly will always be available.

How to access Butterfly from a remote computer

Regarding remote access features, its creator emphasizes that at the moment it is not secure and recommends doing it only on a LAN for testing purposes.

The command to execute would be the following:

butterfly.server.py --host = "0.0.0.0"

How to run a specific shell

For example, to run fish, you have to use the following command:

butterfly.server.py --shell = / bin / fish

For more information, I recommend visiting the page Github of the project.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   toñolocotelan_te said

    It's cute.
    I had also seen it here https://plus.google.com/+CybercitiBiz/posts/NCnwp7VQ2dW

  2.   cheers said

    I just tried it.

    It's funny, but I wouldn't use a browser as a terminal.
    Not that I'm paranoid, but more or less ...

    In addition, I do not find the advantage or the reasoning that justifies it.
    Surely it is that I do not understand it.

    On the other hand, my terminal is prettier than that and much more tuned.

  3.   NotFromBrooklyn said

    😀 It seems that Pablo and I read the same blogs.

    1.    let's use linux said

      Actually, I saw it on G + and found it interesting. 🙂

  4.   Reuben Reynaldo said

    If you want to use it as a GTK3 app:

    from gi.repository import Gtk
    from gi.repository import Gdk
    from gi.repository import GObject
    from gi.repository import GLib
    from gi.repository import WebKit
    import threading
    import time

    # Use threads
    GLib.threads_init ()

    class App (object):
    def __init __ (self):
    window = Gtk.Window ()
    webView = WebKit.WebView ()
    window.add (webView)
    window.show_all ()

    self.window = window
    self.webView = webView

    def run (self):
    Gtk.main ()

    def show_html (self):
    GLib.idle_add (self.webView.load_uri, 'http://127.0.0.1:57575/')

    app = App ()

    thread = threading.Thread (target = app.show_html)
    thread.start ()

    app.run ()
    Gtk.main ()

  5.   LTV said

    Estimated
    Good tool in the butterfly.server.py section - unsecurez is unsecure and it works, please correct

    See you soon..

    1.    let's use linux said

      Thanks for the notice! Corrected. 🙂

  6.   Fico said

    Downloaded to my Favorites. Thanks, Let's UseLinux !!!

    1.    let's use linux said

      You're welcome! A hug! Paul.