In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to install butterfly in a Linux system. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Butterfly allows you to display daily terminals in your browser.
Install butterfly$ sudo pip install butterfly # install butterfly$ butterfly.server.py-- unsecure # start an insecure web server
Then all you have to do is open: localhost:57575
How to use it:
Server side
Use systemd to run at startup
Because it depends on the service running in the background, you can download the systemd file where butterfly.service is located, which is in / etc/systemd/system/ or equivalent, and:
$sudo systemctl enable butterfly$ sudo systemctl start butterfly
Now, the server will always be running.
Run as root and multiple users
Butterfly can be used as an end user and a root user. When running as the root user, privileges are granted to the user who initiated the connection, that is, the user who opened the web page. You can change the end user by going to localhost:57575/user/.
Access from a remote machine
You can use the butterfly.server.py-host= "0.0.0.0" setting to bind the host, which will allow other users to connect to your terminal. A password will be required, but the password is not secure! therefore, it is recommended that you run this program only on the local network for testing from now on.
Run a specific shell
Use the shell command line option:
Butterfly.server.py-shell=/bin/fish client
Butterfly works like any other terminal, but has some specific functions.
Enter browser shortcuts
When the terminal is in focus, all hotkeys are captured (except those that are blocked by the browser). If you want to use CTRL + L to access the address bar, it will not work properly. That's why the ALT + Z combination here tells Butterfly not to catch the next keystroke combination. In other words, you can access the address bar by pressing ALT + Z and then CTRL + L. If your browser supports the css3 filter, the screen will turn brown.
Quickly select history text
I've been hoping to find this feature in the terminal so that I can quickly select history. You can try to browse the selection by pressing CTRL + SHIFT + up, then using CTRL + SHIFT + up / Down and Arrow keys. After the correct setting, press enter, and Butterfly will enter the selection directly at the prompt:
Other functions
The visual style is done using CSS, so it can be edited completely.
You can easily extend the behavior of terminals in a browser by writing JavaScript (just like a quick select operation).
Thank you for reading! This is the end of the article on "how to install butterfly in the Linux system". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.