Giter Club home page Giter Club logo

flootty's People

Contributors

btipling avatar cristiancantoro avatar ggreer avatar kans avatar maxim-filimonov avatar panozzaj avatar zoldar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flootty's Issues

flootty 3.0.0 fails with import error

I get following error with flootty 3.0.0

flootty 
Traceback (most recent call last):
  File "/usr/bin/flootty", line 9, in <module>
    load_entry_point('Flootty==3.0.0', 'console_scripts', 'flootty')()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 345, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2381, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2087, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.7/site-packages/flootty/flootty.py", line 82, in <module>
    from floo.common import api, cert, shared as G, migrations, utils
ImportError: No module named floo.common

Don't repeat error message a bunch of times

It looks like we're repeating an error message in our select loop or something. When I reconnect, I see this:

Error from server: Terminal 6 doesn't exist
Error from server: Terminal 6 doesn't exist
Error from server: Terminal 6 doesn't exist
Error from server: Terminal 6 doesn't exist
Error from server: Terminal 6 doesn't exist
Error from server: Terminal 6 doesn't exist
Error from server: Terminal 6 doesn't exist

SSL Certificate Failure

When I try connecting to a terminal in a workspace I see this:

➜  ft flootty --url https://floobits.com/[redacted/[redacted test_terminal
Terminal is safe. Other users will not be able to send [enter]
Connecting to https://floobits.com/[redacted]/[redacted]
Error connecting: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045).

^CTraceback (most recent call last):
  File "/usr/bin/flootty", line 11, in <module>
    load_entry_point('Flootty==3.2.1', 'console_scripts', 'flootty')()
  File "/usr/lib/python3.7/site-packages/flootty/flootty.py", line 366, in main
    f.select()
  File "/usr/lib/python3.7/site-packages/flootty/flootty.py", line 461, in select
    call_timeouts()
  File "/usr/lib/python3.7/site-packages/flootty/flootty.py", line 133, in call_timeouts
    timeout()
  File "/usr/lib/python3.7/site-packages/flootty/flootty.py", line 114, in timeout_func
    func(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/flootty/flootty.py", line 735, in connect_to_internet
    self.sock.connect((host, port))
  File "/usr/lib/python3.7/ssl.py", line 1141, in connect
    self._real_connect(addr, False)
  File "/usr/lib/python3.7/ssl.py", line 1132, in _real_connect
    self.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 1108, in do_handshake
    self._sslobj.do_handshake()
KeyboardInterrupt
ciao.
➜  ft

I'm on Arch linux if that matters.

[enhancement] execute flootty with a sub-command.

I have a terminal to act as a public python shell, but the problem is my launcher Exec string doesn't start python automatically in flootty.

gnome-terminal *other tabs hidden* --tab -e 'sh -c "cd *hidden*; flootty --url https://floobits.com/Tcll/*hidden* --create pyshell2x --unsafe;python"'

in the command above (untested) it's likely python would start after flootty finishes.
is it possible already to start python in flootty??

--version command line option

To check what version of flootty you have, it'd be convenient to have a command line option that just printed out the version of flootty.

Flootty allows remote users to send EOF

When viewing another user's terminal I am able to send EOF(ctrl-d) that causes the remote session to end. It also fails to exit flootty on my end and leave the terminal hanging.

Can't use RPROMPT in zsh

The RPROMPT flows over to the next line unfortunately. I've disabled it for now, but it'd be great if flootty could support this!

screen shot 2013-09-25 at 11 53 40 am

Thanks!

Never kill terminals, for example not even on errors or quit or colab restart.

Right now when you disconnect from sleep, terminals still work. Users may not be connected to floobits, but the terminal still works. When we restart colab that kills terminals, when bad things happen we kill terminals. How about we just never do that because that could be really bad for users if they're in the middle of something important. Why can't it just disconnect but keep the terminal working.

[enhancement] display terminal name in window title/tab

The last 2 tabs here are flootty terminals, but the problem is you can't tell which is which.
img
if you could modify PS1 to display the terminal name in the tab/title (I've done it, but there are too many characters to escape in a launcher-string), it would be really helpful. :)

here's the example I used which sets the tab/title to "newtitle":
PS1='\[\e]0;newtitle\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

SSL Certificate Failure

I'm having the same issue as #47

$ flootty --create --url=https://floobits.com/DrLazor/aioircd
Terminal is safe. Other users will not be able to send [enter]
Connecting to https://floobits.com/DrLazor/aioircd
Error connecting: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123).
^CTraceback (most recent call last):
  File "/usr/local/bin/flootty", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/flootty/flootty.py", line 366, in main
    f.select()
  File "/usr/local/lib/python3.8/dist-packages/flootty/flootty.py", line 467, in select
    _in, _out, _except = select.select(self.readers, self.writers, self.errers, SELECT_TIMEOUT)
KeyboardInterrupt
ciao.

Current version: 3.2.2, installed via pip

Garbage Output with Vim/Emacs

As reported by @btipling
it adds this garbage to the first line of every file that I have to remove: "+q436f+q6b75+q6b64+q6b72+q6b6c+q2332+q2334+q2569+q2a37+q6b31"
only the first time I opened it

... I have no idea what is causing this.

ImportError: cannot import name migrations

I get following error when I tried to share my terminal:

File "/usr/local/bin/flootty", line 9, in <module>
    load_entry_point('Flootty==3.1.5', 'console_scripts', 'flootty')()
  File "/home/moughamir/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/moughamir/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
    return ep.load()
  File "/home/moughamir/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/home/moughamir/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/moughamir/.local/lib/python2.7/site-packages/flootty/flootty.py", line 80, in <module>
    from floo.common import api, cert, shared as G, migrations, utils
ImportError: cannot import name migrations

Pressing Up key restriction

Connected user can navigate in history with pressing up key. So we should disable it with a CLI parameter.

OSError: [Errno 5] Input/output error on exit

Hi,

I just created my accout @Floobits and I was testing the terminal sharing.

Here's what I got (output from terminal was broken, I am pasting as it was):

cristian@cristian-F5N:~$ flootty --create --url="https://floobits.com/r/CristianCantoro/Osmose/"
Connecting to floobits.com:3448.
Connected!
Successfully joined https://floobits.com/r/CristianCantoro/Osmose/
PS1="\[\e[32m\]CristianCantoro::Osmose::_\[\033[0m\] $PS1"
cristian@cristian-F5N:~$ PS1="\[\e[32m\]CristianCantoro::Osmose::_\[\033[0m\] $PS1"
CristianCantoro::Osmose::_ cristian@cristian-F5N:~$ exit
logout
Traceback (most recent call last):
                                    File "/usr/local/bin/flootty", line 9, in <module>
                                                                                          load_entry_point('Flootty==0.22', 'console_scripts', 'flootty')()
                                                                                                                                                             File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 292, in main
                                                                                     f.select()
                                                                                                 File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 410, in select
                           handler(fd)
                                        File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 713, in stdout_write
                                                                                                                                       data = self.extra_data + os.read(fd, FD_READ_BYTES)
                           OSError: [Errno 5] Input/output error
                                                                ciao.
cristian@cristian-F5N:~$

I tried to test it with another Workspace (that I picked from Code Roulette), but I got the same issue.
File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 410, in select
handler(fd)
File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 713, in stdout_write
data = self.extra_data + os.read(fd, FD_READ_BYTES)
OSError: [Errno 5] Input/output error
ciao.

Finally I tried to create a clean virtualenv, with still no luck.

cristian@cristian-F5N:~$ mkvirtualenv floobits
New python executable in floobits/bin/python
Installing setuptools.............done.
Installing pip................done.
(floobits)cristian@cristian-F5N:~$ pip install flootty
Downloading/unpacking flootty
  Downloading Flootty-0.22.tar.gz
  Running setup.py egg_info for package flootty

Installing collected packages: flootty
  Running setup.py install for flootty

    Installing flootty script to /home/cristian/.virtualenvs/floobits/bin
Successfully installed flootty
Cleaning up...
(floobits)cristian@cristian-F5N:~$ flootty --create --url="https://floobits.com/r/CristianCantoro/Osmose/"
Connecting to floobits.com:3448.
Connected!
Successfully joined https://floobits.com/r/CristianCantoro/Osmose/
PS1="\[\e[32m\]CristianCantoro::Osmose::_\[\033[0m\] $PS1"
cristian@cristian-F5N:~$ PS1="\[\e[32m\]CristianCantoro::Osmose::_\[\033[0m\] $PS1"
CristianCantoro::Osmose::_ cristian@cristian-F5N:~$ exit
logout
Traceback (most recent call last):
                                    File "/home/cristian/.virtualenvs/floobits/bin/flootty", line 9, in <module>
                                                                                                                    load_entry_point('Flootty==0.22', 'console_scripts', 'flootty')()
                        File "/home/cristian/.virtualenvs/floobits/local/lib/python2.7/site-packages/flootty/flootty.py", line 292, in main
                                                                                                                                               f.select()
                                                                                                                                                           File "/home/cristian/.virtualenvs/floobits/local/lib/python2.7/site-packages/flootty/flootty.py", line 410, in select
                                                                                                                     handler(fd)
                                                                                                                                  File "/home/cristian/.virtualenvs/floobits/local/lib/python2.7/site-packages/flootty/flootty.py", line 713, in stdout_write
                                                                                                  data = self.extra_data + os.read(fd, FD_READ_BYTES)
                                                                                                                                                     OSError: [Errno 5] Input/output error
                           ciao.
(floobits)cristian@cristian-F5N:~$ 

My feeling is that it is trying to read from a file descriptor (the stdout attached to the child, if I am not wrong) while the child process is dead.

When I launch the program in fact I get
cristian@cristian-F5N:~/Scrivania/floobit-test/flootty$ ps aux
[...]
cristian 11824 2.6 0.2 64580 10356 pts/3 S+ 03:23 0:00 /home/cristian/.virtualenvs/flootty-dev/bin/python /home/cristian/.virtualenvs/flootty-dev/bin/flootty --create myterm --url=https://floobits.com/r/CristianCantoro/Osmose/
cristian 11825 3.1 0.2 32648 7912 pts/4 Ss+ 03:23 0:00 /bin/bash --login

Calling pdb with some try ... except placed around the os.read(...) call mentioned above, I get:

cristian@cristian-F5N:~/Scrivania/floobit-test/flootty$ ps aux
[...]
cristian 11824  1.3  0.2  71608 11156 pts/3    S+   03:23   0:00 /home/cristian/.virtualenvs/flootty-dev/bin/python /home/cristian/.virtualenvs/flootty-dev/bin/flootty --create myterm --url=https://floobits.com/r/CristianCantoro/Osmose/
cristian 11825  2.2  0.0      0     0 ?        Zs   03:23   0:00 [bash] <defunct>

so the child process is defunct.

Another test is to see if I can open the file from the file descriptor, again setting some flags and calling pdb:

(flootty-dev)cristian@cristian-F5N:~/Scrivania/floobit-test/flootty-cc$ flootty --create myterm --url="https://floobits.com/r/CristianCantoro/Osmose/"
Connecting to floobits.com:3448.
Connected!
Successfully joined https://floobits.com/r/CristianCantoro/Osmose/
> /home/cristian/.virtualenvs/flootty-dev/local/lib/python2.7/site-packages/Flootty-0.22-py2.7.egg/flootty/flootty.py(720)stdout_write()
    -> self.PDBFLAG = False
[the terminal output is broken so this was not really easy...]
(Pdb) fd
(Pdb) myfile = os.fdopen(fd)
(Pdb) <open file '<fdopen>', mode 'r' at 0x7f35ce4af9c0>
(Pdb) fcntl.fcntl(myfile,0)
(Pdb) 6

And after closing the file I get instead:

CristianCantoro::Osmose::myterm cristian@cristian-F5N:~/Scrivania/floobit-test/flootty-cc$ exit
logout
> /home/cristian/.virtualenvs/flootty-dev/local/lib/python2.7/site-packages/Flootty-0.22-py2.7.egg/flootty/flootty.py(728)stdout_write()    
    -> self.extra_data = b''
(Pdb) fd
(Pdb) 5
(Pdb) myfile = os.fdopen(fd)
(Pdb) *** OSError: [Errno 9] Bad file descriptor

I tried to fix this, I am creating a pull request.
(and here it is: #17)

p.s.: floobits is awesome ;-)

unable to hit <return> in remote flootty terminal

I'm unable to hit return to trigger a command in a remote flootty session that is hosted on @bo-peng's laptop. When I host the flootty session, she is unable to hit return too.

I'm not sure if this is related, but after exiting the flootty session, my prompt gets royally messed up:

screen shot 2014-05-07 at 10 43 37 am

source ~/.bashrc does not fix the problem and I end up just having to close that terminal window.

[request] PyCharm support

Out of all the python IDE's I've tried, I have to rate PyCharm the best replacement for Visual Sdtudio + Python Tools.
It doesn't have ALL the bells and whistles like Aptana and a few other IDEs...
But it's better than Eclipse + PyDev which it seems to be identical to in design, and has more features than most other python IDEs, and even runs and debugs windows python ran with wine.
And then of course, my personal favorite, which is the reason I rate it the best in comparison to Visual Studio + Python Tools, I have yet to see another IDE with INFORMATIVE code tracking and analysis tooltips.

If you would please add floobits support for this IDE, you will be much more than appreciated! =)

Line wrapping is overwriting previous lines

When typing in a long command, the line wrapping overwrites other lines, and does not write on a new line.

Long commands should write on a new line.

This could be related to issue #21, though here there are no font size differences.

Please see attached screenshot for clarification. Thanks!
screen shot 2014-05-06 at 10 48 10 am

Tmux and Vim issues

Running tmux or Vim in a flootty terminal can cause pain and suffering. We need to look into what's causing this.

Unable to exit flootty

Once someone closes their host terminal, my session doesn't work and I can't exit it. I get:

Error from server: Terminal 4 doesn't exist
Error from server: Terminal 4 doesn't exist
...

I'm using OS X with flootty 3.1.6

Error when sharing terminal on a Docker container

Hi,

I'm trying to share a terminal on a Docker container (hence the root), but no luck:

root@d2eecad4f364:/app# cat ~/.floorc.json
{
  "auth": {
    "floobits.com": {
      "username": "amitit",
      "api_key": "MY_API_KEY",
      "secret": "MY_SECRET"
    }
  }
}
root@d2eecad4f364:/app# flootty --url=https://floobits.com/amitit/myworkspace --unsafe
Terminal is unsafe. Other users will be able to send [enter]. Be wary!
Connecting to https://floobits.com/amitit/myworkspace
Connected!
There is no active terminal in this workspace. Do you want to share your terminal? (y/n)
y
Traceback (most recent call last):
  File "/usr/local/bin/flootty", line 9, in <module>
    load_entry_point('Flootty==3.1.7', 'console_scripts', 'flootty')()
  File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 357, in main
    f.select()
  File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 480, in select
    handler(fd)
  File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 496, in cloud_read
    self.handle(buf)
  File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 533, in handle
    self.handle_event(data)
  File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 543, in handle_event
    func(data)
  File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 622, in on_create_term
    self.create_term()
  File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 791, in create_term
    shell = os.environ['SHELL']
  File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'SHELL'
ciao.
root@d2eecad4f364:/app#

It seems like the credentials and workspace namings are in place. If I change them to something invalid, flootty warns properly about it.

Thanks

ASCII Character problem?

Hi there,

Trying out flootty to pair with some folks and received this error anytime I try to do anything. I'm sure it's because of the characters I have in my zsh prompt... but tons of people have similar customizations. Any way flootty could support them?

Thanks!

You have permission to write to this terminal. Remember: With great power comes great responsibility.
So yea
zsh: command not found: So
% Traceback (most recent call last):
File "/usr/local/bin/flootty", line 8, in <module>
load_entry_point('Flootty==0.21', 'console_scripts', 'flootty')()
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 290, in main f.select()
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 408, in select handler(fd)
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 424, in cloud_read self.handle(buf)
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 461, in handle self.handle_event(data)
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 472, in handle_event func(data)
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 559, in on_term_stdout self.handle_stdio(data['data'])
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 675, in stdout_write write(stdout, buf)
File "/Library/Python/2.7/site-packages/flootty/flootty.py", line 120, in write n = os.write(fd, b)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u21b5' in position 199: ordinal not in range(128) ciao.
% mini at Mini in ~/floobits/share/jondkinney/bolstr ○ ruby-2.0.0-p247

Line wrapping with different font sizes

I'm working someone who uses a larger font size in his terminal. He is hosting the terminal session. Rather than wrapping the text to the next line it wraps to the same line and overwrites the beginning of his prompt.
I see:

~/nextgear/activerecord-sqlserver-adapter [rails-4] $ cip
thirdshift::activerecord-sqlserver-adapter::_ 
verecord/test/cases/migration/columns_test.rbails-4] $ be rake test TEST_FILES=/Users/garretthart/nextgear/source/annarails/activ

but I would expect to see:

~/nextgear/activerecord-sqlserver-adapter [rails-4] $ cip
thirdshift::activerecord-sqlserver-adapter::_ 
~/nextgear/activerecord-sqlserver-adapter [rails-4]  $ be rake test TEST_FILES=/Users/garretthart/nextgear/source/annarails/activverecord/test/cases/migration/columns_test.rb

Here's a screenshot:
http://grab.by/tfVe

Setting prompt fails when using fish shell

~/D/r/rust-geojson (geojson-0.1|) $ flootty --url  https://floobits.com/frewsxcv/Testing --create my_terminal
Terminal is safe. Other users will not be able to send [enter]
Connecting to https://floobits.com/frewsxcv/Testing
Connected!
Successfully joined https://floobits.com/frewsxcv/Testing
PS1="\[\e[32m\]frewsxcv::Testing::\[\033[0m\]\[\e[32m\]my_terminal\[\033[0m\] $PS1"
~/D/r/rust-geojson (geojson-0.1|) $ PS1="\[\e[32m\]frewsxcv::Testing::\[\033[0m\]\[\e[32m\]my_terminal\[\033[0m\] $PS1"
fish: Unknown command 'PS1=\[\e[32m\]frewsxcv::Testing::\[\033[0m\]\[\e[32m\]my_terminal\[\033[0m\] PS1'. Did you mean 'set
PS1 \[\e[32m\]frewsxcv::Testing::\[\033[0m\]\[\e[32m\]my_terminal\[\033[0m\] PS1'? See the help section on the set command by
typing 'help 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.