After I’ve updated several machines to F42, my rc-local.service exits when running screens. It creates the first one, and then exists as buffer overflow.
If I run it manually it also reports buffer overflow. ie simple command uname -a
I have not seen screen started as a service like you are doing.
Something about doing that is leading to the issue, and as I assumes its rare to do that no one else sees the problem.
I’ve always used screen to protect from a connection breaking.
No I don’t start screen as a service. This log is from rc-local.service, where I execute few screen commands (create few screens and send some commands inside) so I can see status later when I login, and don’t need to create all screen everytime reboot happens.
Oh and I wonder if you can solve the problem of priming your terminal with info without using scereen.
Off the top of my head put the info into a file and on login cat that file.
You can do that with a couple of lines in .bash_profile, with a check to only do it if on a real tty.
I’m sorry but I don’t quite understand your questions. I do not know if rc-local.service has access to to tty device. But I have 40+ servers (approx half F40/41 half Ubuntu 24.4) and I run screen commands on all of them (with rc-local.service) and never had troubles until upgrade to F42.
The actual “buffer overflow” is shown if I isue command directly from the terminal as root user, whereas if I just run screen -S ScrName it works fine and I can add new screens within without problem. I also get buffer overflow when trying to send command to existing screen.
It is interesting that 1st screen gets created always after reboot.
I’m waiting to maybe new screen update, but nothing yet even after 3 kernel updates in F42.
but I remember now when updating a couple of laptops to F42 and I created screen locally, and then trying to enter it remotely from different computer and I couldn’t detach it. and vice versa, when I created screen remotely, then I couldn’t detach it on actual machine. So it may well be something connected to tty, though I know very little about ttys
I’ve ran tty on different machines and within screen, outside of screen, and via crontab script and I just get different number of pts
root@pzb:/etc# tty
/dev/pts/4
root@pzb:/etc#
whereas running from crontab I get
root@dg6:/etc# cat /tmp/tty.txt
not a tty
root@dg6:/etc#
and I get same result in F41, F40. So something else must have changed. Most obvious to me is new screen command which was upgraded to 5.0.0 and still no update.
But I get buffer overflow also when running screen command directly from terminal, so it’s not environmental variables I would presume
I expected that you should see no tty report in a systemd service.
As screen only works for a tty, I assume, that likely explains why this does not work.
Yes I have plenty F40, F41 running, but I can’t just restart them to check if rc.local is working.
I do still have some issues with running screen via rc.local, as not all variables are loaded in this screen, but more or less is OK for most of screens, but for the ones that I work in, I just do exit and CTRL-A C to create a new one and it works.
Well I’ve been using screen for 25+ years and serves me well, especially if I have some programs that run in podman due to incompatibilities with newer Fedora libs, virtualmachine…so I see some history when I log in. I do also have scripts that send emails on any changes that server do, so I know it’s possible to be without screen, but why if it’s working well. And it looks it’s being developed as F42 jumped to version 5.0.0.
normally i issue screen command like this
Different server has different things running, but each have min 5-6 screens initialized on boot, so I don’t need to recreate the every reboot.
Hope this explains a bit more why I use screen and I like to start it on reboot