Forums

screen

Hello,

Any chance we could get the Unix 'screen' utility installed?

Many thanks Robert

Certainly would probably be useful, and I guess the ability to run expensive background applications (the only abuse of which I can think) isn't really much worse than a scheduled task which forks into the background.

Of course, the occasional resets might cause problems if you're relying on the screen session staying up, but I suspect there isn't much to be done about that.

It's not so much a case of relying on the background task being up, it's more a case of being able to jump between editor and Python console by the simple use of Ctrl-A, Ctrl-N...

Bah. My cunning reply was truncated due to excessive use of Unicode. It appears that Markdown is less than 1337.

In summary, yes, fair enough, that's an eminently useful case. Just thought the persistence issue was worth raising in case that's what you had in mind instead.

Now I'm curious what got truncated...☺

Also: it's nice being able to jump between ssh and web access, and have everything just how it was left...

The reason we haven't added screen yet (or tmux) is because we'd probably want to restrict it to paying users -- since it essentially gives you infinite consoles. So we'd need to build an infrastructure for restricting some binaries to paying users only, which we don't have yet...

Still, I'll add a couple of +1s to the ticket...

Just add it, but don't tell anyone who doesn't have a paid account...☺

Is there a reason why you can't use standard Unix permissions? So have the relevant binaries owned by a multi-terminal group or similar, chmod 0750 them and put paid users into that group. Other users would be able to see the binaries but not execute or copy them.

I guess you'd want to integrate it into the existing user privilege system you have, though, so the /etc/group files were automatically generated based on the class of user account, and that's probably more fiddly.

Also, I suppose the whole "restricted binary" thing plays into making compilers available as well, because as soon as you can compile stuff yourself then you can always work around any binary restrictions, so a compiler would itself need to be a restricted binary. In the specific case of screen and tmux, I wonder if there are also other ways to block them, but changing permissions of tty files or similar.

There's also the issue of uploaded binaries, which could be addressed by setting all files non-executable by default and making chmod a restricted binary as well - not sure what to do about os.chmod(), mind you. That's going to be a bit of a pain for people running their Python scripts, although there's always python script.py - this may be a measure best saved until a demonstrated need arises, therefore.

In the extreme case it wouldn't be too hard to set up an automated monitoring system which slowly trawls through everyone's files in the background running strings on anything with the executable bit set and checking whether it matches any known signatures of things like screen, tmux, nmap, or any other tools which may be open to abuse. Of course, this is getting increasingly into the realm of theory, I very much doubt whether a significant number of users would be interested in abusing the system in this sort of way. No harm in having a game plan just in case, however - PA is too useful a service to be hampered by a minority of abusive users.

Nice point about groups; we do already split people into "paying" and "non-paying" groups -- that's how the iptables rules that manage the internet access stuff work. So if we just set the perms correctly on the screen binary then it might just work. That definitely makes this seem more doable. I'll bump it on the to-do list.

Just signed up for a paid account, noticed tmux isn't available, and found this old thread. Looks like it made it onto the to-do list a year ago but is still to-do. Just thought I'd register another vote for tmux and ask if subscribing to this thread would be the best way to get notified when it's available. Thanks.

I've added you to the list of people interested in the ticket, so we'll drop you an email when it's done.

Thanks Glenn, much appreciated.

Just came across linuxbrew and tried it out. So far so good: Installing it and then running brew install tmux worked like a charm. Christmas came early!

Just to update the folks who haven't read the blog, in 2015 they hired a new dev and did get tmux as part of the image. Now if only they'll get tmate.io for tmux session sharing (though the web link sharing is pretty awesome).

tmate.io looks really interesting. Thanks for the pointer. We'll look at the uses we can put it to.

I also added some steps in the 'mosh' thread that seemed to get Linuxbrew working for me which allowed me to install the latest Tmux. https://www.pythonanywhere.com/forums/topic/1665/

I'm gonna just compile tmux/screen myself. deal with it.