WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: screen.tcz extension not working as expected - screen noob  (Read 3904 times)

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
screen.tcz extension not working as expected - screen noob
« 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?
32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: screen.tcz extension not working as expected - screen noob
« Reply #1 on: April 24, 2013, 11:10:56 PM »
I prefer tmux.

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: screen.tcz extension not working as expected - screen noob
« Reply #2 on: April 25, 2013, 12:15:03 AM »
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.
« Last Edit: April 25, 2013, 12:36:26 AM by althalus »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: screen.tcz extension not working as expected - screen noob
« Reply #3 on: April 25, 2013, 12:33:40 AM »
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).

Quote
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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
Re: screen.tcz extension not working as expected - screen noob
« Reply #5 on: April 30, 2013, 08:34:00 AM »
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
32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: screen.tcz extension not working as expected - screen noob
« Reply #6 on: April 30, 2013, 11:14:37 AM »
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


Never tried, anyway.

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
Re: screen.tcz extension not working as expected - screen noob
« Reply #7 on: April 30, 2013, 05:03:20 PM »
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.
32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar

Offline MapHtH

  • Newbie
  • *
  • Posts: 36
Re: screen.tcz extension not working as expected - screen noob
« Reply #8 on: December 15, 2013, 05:30:14 PM »
Since I was pointed to this post, I think I found a solution of a sorts.

I first found this, 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.