11 ms·
Butterfly: Your everyday terminal in your web browser
- chrisBob 13y agoThe security of this worries me. I would have to understand their code very well before I would be comfortable running a program that gives root access to anyone over a web browser.
- benaiah 13y ago> You can set the bind host with butterfly.server.py --host="0.0.0.0" which will allow other users to connect to your terminal. A password will be asked but IT IS NOT SECURE! So it's recommended as of know [sic] to run this only on local network for testing purposes.
- andreastt 13y agoThe easy solution is to set up an iptables route for disabling all non-loopback connections and traffic for port 57575.
- cjbprime 13y agoThat doesn't help if the vulnerability involves taking over your machine via JS on an untrusted page, causing your own browser to conduct the exploit against your terminal.
- jyz 13y agoThis is insanely cool, for mobile?
- drdaeman 13y agoI fail to see anything cool here. What's the point of using browser for UI layer if you need a backend app anyway? Or, if you intend to use that remotely - Atwood's law aside - what's the point of replacing already well-working client apps, usually, with old trusty OpenSSH client under the hood, with some browser-based kludges? (For example, you'll have to reinvent auth.)
- mediocregopher 13y agoThis is super-cool. Not sure it's recommendable to use it in place of ssh, but maybe with ssl+http-auth it could be workable? It definitely adds some convenience for when I'm away from one of my boxes and I don't want to deal with putty. As per all HN comments, one downside is that it kind of messes up with my vim colors, but that may be that my vim colors are messed up to begin with.
- hnriot 13y agowhat is there to deal with with putty? it's pretty simple. I run linux on my desktop and use a chrome extension called secure shell (http://goo.gl/TK7876 http://goo.gl/TK7876) I like this butterfly, but don't see how it's any different to using ssh which is already designed for this.
- jrkatz 13y agoIf you are concerned about the security and don't want to deal with putty (I can commiserate), there's always the secure shell chrome/chromium extension. If you haven't seen it already you might want to give it a look.
- fafhrdius 13y agoCan you point the advantages of this being "super-cool", i am afraid I'am bit puzzled :s
- riskable 13y agoWell right off the bat: You don't have to install anything. You also don't need to worry about updating a thousand clients if a security problem crops up--you just update the server and you're done. Also, in terms of "why" there's all sorts of neat things you can do with a web browser that aren't so easy with regular terminals. For example, displaying inline images (if you code it right). Gate One can display images, PDFs, and play back sound files right there in your terminal if you do something as simple as 'cat somefile.png' or 'cat somefile.ogg'. Source to Gate One (also has some screenshots of the aforementioned features): https://github.com/liftoff/GateOne https://github.com/liftoff/GateOne The other nice thing is that you can use it through basically any proxy server (provided it doesn't "speed bump" you--breaking WebSocket connections).
- bct 13y agoAt least one major security issue has already been discovered & fixed: http://www.reddit.com/r/linux/comments/1z6gif/butterfly_your_everyday_terminal_in_your_web/cfr1c7m http://www.reddit.com/r/linux/comments/1z6gif/butterfly_your...
- deleted 13y ago[deleted]
- mason240 13y agoThe browser is the OS.
- ngoldbaum 13y ago'sudo pip install', really?
- ihuman 13y agoWith some installations of python, you have to use sudo with pip in order for it to install anything system wide. (ex: OS X's preinstalled python).
- sitkack 13y agoEveryone should absolutely be running from a virtualenv. Never touch the system python. brew intall python /usr/local/bin/pip install --upgrade setuptools /usr/local/bin/pip install --upgrade pip /usr/local/bin/pip install --upgrade virtualenv /usr/local/bin/virtualenv --python=/usr/local/bin/python py.env And done. . ~/py.env/bin/activate pip install butterfly
- deleted 13y ago[deleted]
- derefr 13y agoAre virtualenvs (or Ruby bundles, or anything else equivalent) still relevant when using Docker containers? It seems to me that the proper thing to do, when you're making a container that runs a python app, is to install the app's dependencies to the container's global environment.
- sitkack 13y agoI keep all of my systems the same between dev,test,prod so I still deploy into a virtualenv inside of containers. No reason to ever run something as root.
- diminoten 13y agoI think homebrew handles this for you, which is great.
- peapicker 13y agoI think I'll stick with the Chrome ssh plugin.
- randallu 13y agohterm -- the terminal implementation that the Chrome ssh plugin and crosh is based on is pretty hackable, too.
- code_duck 13y agoI think I'll just stick with pressing alt-tab to Terminal.app.
- shirro 13y agoAnother vote for Chrome Secure Shell. Open source, well made and hterm supports copying to your clipboard when tmux or mosh doesn't eat the sequence. I have limited font choice on the Chromebook so I embed a powerline font in mine. Very cool. Hacking up some insecure DIY server backend is a bit silly when you can have libssh or mosh compiled into nacl.
- sebastianavina 13y agowhy would anyone use chrome ssh plugin instead of mate-terminal? I don't get it.
- jackmaney 13y agoIt's a shame that this doesn't work in Windows, where a real terminal is desperately needed.
- gamegoblin 13y agoHaving been forced to use powershell for a while (after being a bash lover), powershell isn't awful. No idea why it isn't default.
- scott_karana 13y agoPowershell is a great shell, but the terminal it's running in (cmd) is still pretty mediocre...
- Hello71 13y agoPowershell has nothing to do with Command Prompt. it runs on the Windows console subsystem.
- scott_karana 13y agoWhatever the case, it has all the limitations. Poor resize support, strange selection/paste support, and limited featureset. They must be forks of each other if they're actually not distinct: compare the option screens.
- BHSPitMonkey 13y agoWhat do you mean by "default"? They're both accessible from the Start Menu, and renaming PowerShell to cmd.exe would certainly cause some chaos.
- Shizka 13y agoI've been using cmder for a while, and it is awesome! Loads of cool features. It's worth checking out :) http://bliker.github.io/cmder/ http://bliker.github.io/cmder/
- Touche 13y agoLocks up the browser if you try to `exit`
- zeckalpha 13y agoToo bad AjaxTerm was abandoned: https://github.com/ingydotnet/ajaxterm https://github.com/ingydotnet/ajaxterm If it wasn't, it likely would be this today.
- riskable 13y agoYou want to know what AjaxTerm would be like today? Look at Gate One: https://github.com/liftoff/GateOne https://github.com/liftoff/GateOne When I wrote my first web-based terminal (Escape From The Web) it was based on AjaxTerm. It kinda sucked for more than one terminal at a time so I went back to the drawing board and wrote Gate One. It turned out great (if I do say so myself!) and soon it will support running X11 applications as well (see: http://youtu.be/6zJ8TNcWTyo http://youtu.be/6zJ8TNcWTyo)
- p4bl0 13y agoTo use this on a remote server without making it listen to the wild, keep it listening on localhost only and on your computer you could for instance launch this: ssh -Nf -L 9999:localhost:57575 remote-server and then you can go to http://localhost:9999/ http://localhost:9999/ with ssh taking care the encrypted connection between you and the remote-server.
- gingerlime 13y agonot being funny, but isn't the purpose of a web-based terminal to help give you access to a terminal-like environment when you don't have access to a standard terminal / ssh?
- bdunbar 13y agoA use case (warning I've not thought his out very deeply) Abe has shell access via 'ssh' to Server. He wishes Bob and Carol to have access to the server but for whatever reason they don't have SSH. Abe shells in, does the trick for Bob and Carol. Bob and Carol can use the web-based ssh and are happy campers. Or. Abe controls the server via Puppet [Chef, Ansible]. Something you can do with Puppet is disallow SSH access - one does this to remove the temptation to 'cheat' and hand-config the system. Abe has the ability with Puppet to exec this command to let Bob or Carol (or Abe) into the system 'in case of emergency'.
- creack 13y agodocker run -p 0.0.0.0:57575:57575 creack/butterfly
- chjj 13y agoJust a note to the author if they are reading: you might want to remove that OSC code for inline HTML. There are reasons dynamic codes like those don't exist. Good reasons. (In my own naivete, I once thought an OSC code to access scrollback would be a good idea. You can imagine how insecure that was). It's not a good idea to run any programs in this terminal until that OSC code is either removed or the HTML is somehow sanitized.
- panzi 13y agoWhat's OSC? Open Sound Control? Open Source Code? I'm not familiar with that acronym.
- chronomex 13y agoIt's a type of terminal escape code, designed to interact with the terminal emulator's environment. https://en.wikipedia.org/wiki/ANSI_escape_code#Non-CSI_codes https://en.wikipedia.org/wiki/ANSI_escape_code#Non-CSI_codes
- jahewson 13y ago"Operating System Command"
- bentcorner 13y agoI think the concern is around this bit: https://github.com/paradoxxxzero/butterfly/blob/4dc55630a3ab3d1162f5967e3f3f9ec95dc7f100/butterfly/static/coffees/term.coffee#L775 https://github.com/paradoxxxzero/butterfly/blob/4dc55630a3ab... Is the problem that there's a potential for a terminal app to inject non-sanitized HTML into a terminal that is using butterfly?
- cfontes 13y agoWould be awesome if you could make a pull or open an issue. https://github.com/paradoxxxzero/butterfly https://github.com/paradoxxxzero/butterfly Maybe the author ( as I ) is not sure about this or knows how to fix it. Cheers
- albertzeyer 13y ago
- softvar 13y agoReally Awesome! No more switching back and forth
- spektom 13y agoHow switching between browser tabs is different from switching between applications?
- cyberpanther 13y agoGreat job! I've been using tty.js for a while but it is a little unstable and I love Python so this is a perfect fit.
- deleted 13y ago[deleted]
- hiphopyo 13y agoReminds me of some ezine from the 90s.
- emddudley 13y agoI really love that ASCII butterfly... more console tools should have ASCII art.
- smprk 13y agoYour comments led me to discover Figlet (http://www.figlet.org http://www.figlet.org) and ASCII art generator (http://patorjk.com/software/taag http://patorjk.com/software/taag). Weekend customization times! :-)
- fsiefken 13y agoThis would be nice to get working in ChromeOS, would it be possible to start this at runtime? Which files should be edited? I've got a dual-boot Chromebook machine so I can mount the ChromeOS partitions with Linux.
- sdonnahue 13y agoCheck out http://terminal.com/ http://terminal.com/ You can instantly clone real machines there.
- deefour 13y agoDoes anything like the quick history select or the google-instant style auto-complete/suggestion exist for zsh?
- vdm 13y agohttps://github.com/zsh-users/zsh-history-substring-search https://github.com/zsh-users/zsh-history-substring-search
- jsmeaton 13y agoI really like the quick history selection feature, and now I want it in iterm2. Browser based terminal isn't something I'd be likely to use, but congrats on writing it.
- panzi 13y agoI don't quite understand the use of it. iPython Notebooks I get. They really give you something you don't get in a terminal widow, but I take my yakuake everyday before a web based terminal. It integrates better in the desktop environment, has global hotkeys, can be scripted via D-bus, doesn't need a server to run and has no potential security issues a web server based terminal has etc.
- kernel_panic 13y agoThis is really cool! Would be great to get this on places like http://www.runnable.com http://www.runnable.com
- fiatjaf 13y agoBeautiful, but if it isn't secure for managing servers and remote machines, what is the point of it?
- unclesaamm 13y agoTo make it start on boot in Ubuntu: Put this into /etc/init/butterfly.conf: http://pastie.org/8825201 http://pastie.org/8825201