Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: Lee on April 24, 2013, 11:05:46 PM
-
I'm trying for the first time to use the screen command - really just learning how to use it at this point, as it is something I've been eying up for years and never got around to learning.
I know some users swear by the screen command and use it for just about everything... and I can see why. But I'm having some difficulty with it.
In addition to any general usage tips about screen, do you always have to run it as root (with sudo)? If I try to use screen as user tc, I get a message indicating "No more PTYs". This seems to be the exact same issue that I had with the expect command a few months ago:
http://forum.tinycorelinux.net/index.php/topic,14493.msg82013.html#msg82013
and the solution, or workaround, is the same - just use sudo. But that still seems wrong - can you never use screen or expect as a regular user?
-
I prefer tmux.
-
To be honest, I never tested screen from the console, instead of through a terminal. I would expect a proper fix for expect would work for screen and vice versa. Until someone works out what that should be, take gerald_clark's advice, give tmux a spin.
Edit for clarification: I assume you're not running X, because I can only replicate the problem if I drop out of X and try and use screen from the console.
-
do you always have to run it as root (with sudo)?
Most definitely not as screen is very commonly used on unprivileged user accounts (though personally I have never had a reason to run screen on core itself).
If I try to use screen as user tc, I get a message indicating "No more PTYs". This seems to be the exact same issue that I had with the expect command a few months ago:
http://forum.tinycorelinux.net/index.php/topic,14493.msg82013.html#msg82013
It appears you might have some deeper laying issue which you eventually might want to look into.
Perhaps you could alternately boot with "norestore" and/or "base" to start eliminating possibilities.
-
http://dbadump.blogspot.no/2009/04/start-screen-after-sudo-su-to-another.html
-
Thanks, Tinypoodle.
I had found that screen seems to work (or at least comes closer to working - I still don't have a good handle on how to use it) after a base / norestore reboot, so I'd been trying to track down what from my restore or my extensions was breaking it. Maybe its not just that after all.
Lee
-
I prefer tmux.
Here the pair dtach+dvtm is suggested as an even less bloated alternative:
http://chithanh.blogspot.it/2010/07/three-way-mini-shootout-between-gnu.html
(http://chithanh.blogspot.it/2010/07/three-way-mini-shootout-between-gnu.html)
Never tried, anyway.
-
dtach is in the repo but I don't see dvtm.
Tried dtach by itself. Liked it. I still need to be root to run it. Looks like I really just need to get to the bottom of this...
I'll start with a base / norestore boot and install my extensions one at a time until something changes that looks suspicious.
But not today.
-
Since I was pointed to this post, I think I found a solution of a sorts.
I first found this (http://cygwin.com/ml/cygwin/2011-11/msg00356.html), but it didn't quite work. But I set the config so that screen wouldn't try to modify /dev/pts. That got me exactly nowhere.
After few hours of testing, I came to a solution that works, but many people won't like because of security problems. Now, if you are the only one using the pc, there are no worries, the way I see it.
The trick is to chmod 4755 screen-4.0.3 and leave it as root:root before squashing it or doing anything with it. You can then use it without sudo or anything, albeit this does something close to sudo-ing.
I hope this helps.
The extension from the 5.x x86 (I'm trying to compile for arm) repo doesn't need this, but I can't seem to grasp why. I've sent an email to althalus to see what he has to say on the matter.
Strange.