terminal acting weird

New to Debian (Or Linux in general)? Ask your questions here!

terminal acting weird

Postby PsySc0rpi0n » 2020-08-06 17:34

Hello.

For some time now that my terminal acts weird after I start any app using 'screen' like this:

Code: Select all
screen -S irssi -fa -D -m irssi &


I'm already using the '&' at the end of the command or I won't get the prompt back. The cursor simply keeps blinking without never returning the prompt to the user again.

And while the '&' workaround works, if I try to attatch/detatch any of the apps I launched with screen and try to do anything with them, type any char, hit enter, scroll mouse, you name it, screen simply terminates and terminal comes back to prompt but then I get this:

Image

Anything I can do?
Last edited by PsySc0rpi0n on 2020-08-08 12:24, edited 1 time in total.
User avatar
PsySc0rpi0n
 
Posts: 215
Joined: 2012-10-24 13:54
Location: Portugal

Re: terminal acting weird

Postby LE_746F6D617A7A69 » 2020-08-06 20:01

... and what's wrong with calling irssi directly? - it works just perfectly for me - I mean, why do You need the 'screen' at all?
Do You realize that the 'screen' program was never intended to be used in terminal emulators?

What has it to do with ksnapshot?
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 414
Joined: 2020-05-03 14:16

terminal acting weird

Postby PsySc0rpi0n » 2020-08-07 06:45

LE_746F6D617A7A69 wrote:... and what's wrong with calling irssi directly? - it works just perfectly for me - I mean, why do You need the 'screen' at all?
Do You realize that the 'screen' program was never intended to be used in terminal emulators?

What has it to do with ksnapshot?
What about my question?
You're kind of creating problems where there are any and not helping in any way.

I would appreciate help in the specific question I posted here.

Please try to focus on the thread initial question and not deviate it to other directions, otherwise I won't get any help whatsoever.

Thank you


Sent from my SM-G935F using Tapatalk
User avatar
PsySc0rpi0n
 
Posts: 215
Joined: 2012-10-24 13:54
Location: Portugal

Re: terminal acting weird

Postby LE_746F6D617A7A69 » 2020-08-07 08:25

Obviously, using a full-screen Window Manager within a Terminal Emulator is not an intended use, and it's not guaranteed to work accordingly to Your expectations. It's possible that some update/security fix has changed the behavior of the TE or some of its components - but it's hard to tell because You didn't bothered to mention what OS/DE/TE You're using.

You started talking about the 'screen' Window Manager, but then You have posted a screenshot showing an information that ksnapshot has been deprecated in favor of spectacle -> and besides that, the terminal output looks completely normal (at least I can't see anything weird)

Are You trying to tell that the 'screen' command invokes ksnapshot, which has been deprecated 5 years ago? How did You get it?
Did You bind ksnapshot to some key combination in the 'screen' config?

PsySc0rpi0n wrote:I'm already using the '&' at the end of the command or I won't get the prompt back. The cursor simply keeps blinking without never returning the prompt to the user again.
Read the manual:
man 1 screen wrote:-D -m This also starts screen in "detached" mode, but doesn't fork a new process. The command exits if the session terminates.
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 414
Joined: 2020-05-03 14:16

terminal acting weird

Postby PsySc0rpi0n » 2020-08-07 11:28

LE_746F6D617A7A69 wrote:Obviously, using a full-screen Window Manager within a Terminal Emulator is not an intended use, and it's not guaranteed to work accordingly to Your expectations. It's possible that some update/security fix has changed the behavior of the TE or some of its components - but it's hard to tell because You didn't bothered to mention what OS/DE/TE You're using.

You started talking about the 'screen' Window Manager, but then You have posted a screenshot showing an information that ksnapshot has been deprecated in favor of spectacle -> and besides that, the terminal output looks completely normal (at least I can't see anything weird)

Are You trying to tell that the 'screen' command invokes ksnapshot, which has been deprecated 5 years ago? How did You get it?
Did You bind ksnapshot to some key combination in the 'screen' config?

PsySc0rpi0n wrote:I'm already using the '&' at the end of the command or I won't get the prompt back. The cursor simply keeps blinking without never returning the prompt to the user again.
Read the manual:
man 1 screen wrote:-D -m This also starts screen in "detached" mode, but doesn't fork a new process. The command exits if the session terminates.
Indeed, my mistake not providing more information.

I'm running Debian Buster.
The ksnapshot screenshot is not the problem. Nevermind about ksnapshot.
My goal was to show the way terminal looks like after running a command. Notice the prompt is not aligned to the left as it was supposed to be when you hit enter after typing a command. The prompt keeps kind of sliding to the right until the end of the screen. That is the ptoblem. Also, when I type a command, I don't see the chars showing up in terminal. It's like I'm typing commands blindly.

Only way is to terminate that session by closing that tab and starting new terminal session.

About the '&', I didn't need it before. I only use it in order to get the prompt back. Before I moved to Debian Buster, I used screen the same way and I got the prompt back. And could keep using that same terminal.
Last edited by PsySc0rpi0n on 2020-08-08 11:09, edited 1 time in total.
User avatar
PsySc0rpi0n
 
Posts: 215
Joined: 2012-10-24 13:54
Location: Portugal

Re: terminal acting weird

Postby cuckooflew » 2020-08-07 14:12

PsySc0rpi0n wrote:
LE_746F6D617A7A69 wrote:... and what's wrong with calling irssi directly? - it works just perfectly for me - I mean, why do You need the 'screen' at all?
Do You realize that the 'screen' program was never intended to be used in terminal emulators?

What has it to do with ksnapshot?
PsySc0rpi0n>>What about my question?
You're kind of creating problems where there are any and not helping in any way.

I would appreciate help in the specific question I posted here.

Please try to focus on the thread initial question and not deviate it to other directions, otherwise I won't get any help whatsoever.

Thank you


Sent from my SM-G935F using Tapatalk

Hope I don't get the same type of response, as LE_746F6D617A7A69 , but I agree, and do want to try to not deviate it:
Please try to focus on the thread initial question and not deviate it to other directions

With that said, it may be necessary to deviate to some extent, because there are various factors, some of which are still unknown. EG: What DE, or WM are you using ? Also what terminal ? I can not duplicate this behaviour using Xterm, with Fluxbox,
Have you tried using a different terminal, ? Maybe consider trying a different one, just to help narrow it down, if a different terminal works ok, we know it probably is the terminal, if we know what terminal you are using, we can check some bug reports, or you can.
Before I moved to Debian Buster, I used screen the same way and I got the prompt back. And could keep using that same terminal.

Ok, well that might be significant that something changed in the upgrade, check the errata, changes that were made in the upgrade. We know you "moved to" Buster, was this a dist-upgrade, ? From ??? Stretch, probably ?, you can check / search "what is new in Debian Buster",...
LE_746F6D617A7A69 wrote:... and what's wrong with calling irssi directly? - it works just perfectly for me - I mean, why do You need the 'screen' at all?
Do You realize that the 'screen' program was never intended to be used in terminal emulators?---snipped ----ksnapshot(irrelevant)---
[/quote]
I was wondering the same, If there is a reason you need to start irssi like that ? please do tell us why. (Besides just, "That is what I did before") a real reason. If not ,
try starting irrsi , normal with the options you want, just calling it in the terminal, leave out the 'screen part' .
========== apology===off topic====
Sorry to deviate more, but please consider resizing the screen shot and using a thumb nail, more details on that here : Please learn to thumbnail images
and
Attachments, How to post a screen shot and use code boxes
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: terminal acting weird

Postby LE_746F6D617A7A69 » 2020-08-07 14:19

PsySc0rpi0n wrote:The prompt keeps kind of sliding to the left until the end of the screen. That is the ptoblem. Also, when I type a command, I don't see the chars showing up in terminal. It's like I'm typing commands blindly.

Still You didn't told what TE You're using, but apparently this doesn't matter since I've just tested the 'screen' WM on XFCE Terminal and when it stays in the backgroud, the key bindings and the keymap is changed, making the terminal unusable - and this looks very similar to Your results.

You can verify this by issuing killall screen -> this restores the terminal settings, at least on XFCE

Anyway, it only confirms what I said earlier: screen is not supposed to be used in terminal emulators, and even the program description contains a very clear statement on this:
GNU Screen is a terminal multiplexer that runs several separate "screens" on
a single physical character-based terminal. Each virtual terminal emulates a
DEC VT100 plus several ANSI X3.64 and ISO 2022 functions.

However, it works correctly as a foreground job, without detaching and with many virtual screens - at least in XFCE TE.

So I think a solution to Your problem could be to run the screen as a foreground job and for other tasks You can use another terminal instance.
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 414
Joined: 2020-05-03 14:16

Re: terminal acting weird

Postby PsySc0rpi0n » 2020-08-08 12:32

cuckooflew wrote:With that said, it may be necessary to deviate to some extent, because there are various factors, some of which are still unknown. EG: What DE, or WM are you using ? Also what terminal ? I can not duplicate this behaviour using Xterm, with Fluxbox,
Have you tried using a different terminal, ? Maybe consider trying a different one, just to help narrow it down, if a different terminal works ok, we know it probably is the terminal, if we know what terminal you are using, we can check some bug reports, or you can.


I'm using Plasma Desktop and konsole. As for WM, I don't know what is stands for.

cuckooflew wrote:We know you "moved to" Buster, was this a dist-upgrade, ? From ??? Stretch, probably ?

Yes, exactly. And when I did the upgrade, I remember to have to follow some extra steps mentioned in the upgrade guide of Debian. I don't remember now exactly the steps, but everything went smooth.

cuckooflew wrote:I was wondering the same, If there is a reason you need to start irssi like that ? please do tell us why. (Besides just, "That is what I did before") a real reason. If not ,
try starting irrsi , normal with the options you want, just calling it in the terminal, leave out the 'screen part' .


Well, reason is to be able to save some terminal session tabs open, be able to use the same terminal session without having to shutdown other apps I have running. I actually run a few within screen. rtorrent, mcabber, irssi, bitcoin core.

cuckooflew wrote:Sorry to deviate more, but please consider resizing the screen shot and using a thumb nail


Taken care. thanks for suggesting. It was annoying myself too.



LE_746F6D617A7A69 wrote:
PsySc0rpi0n wrote:The prompt keeps kind of sliding to the left until the end of the screen. That is the ptoblem. Also, when I type a command, I don't see the chars showing up in terminal. It's like I'm typing commands blindly.

Still You didn't told what TE You're using, but apparently this doesn't matter since I've just tested the 'screen' WM on XFCE Terminal and when it stays in the backgroud, the key bindings and the keymap is changed, making the terminal unusable - and this looks very similar to Your results.

You can verify this by issuing killall screen -> this restores the terminal settings, at least on XFCE


Won't that also kill (in a no graceful way) all apps I have running within screen?

LE_746F6D617A7A69 wrote:Anyway, it only confirms what I said earlier: screen is not supposed to be used in terminal emulators, and even the program description contains a very clear statement on this:
GNU Screen is a terminal multiplexer that runs several separate "screens" on
a single physical character-based terminal. Each virtual terminal emulates a
DEC VT100 plus several ANSI X3.64 and ISO 2022 functions.

However, it works correctly as a foreground job, without detaching and with many virtual screens - at least in XFCE TE.

So I think a solution to Your problem could be to run the screen as a foreground job and for other tasks You can use another terminal instance.


Or mayabe to start using tmux. I've been suggested tmux several times. But I've been using screen for over 10 years that this is the only drawback I found since the upgrade, around 1 year ago maybe.
User avatar
PsySc0rpi0n
 
Posts: 215
Joined: 2012-10-24 13:54
Location: Portugal

Re: terminal acting weird

Postby cuckooflew » 2020-08-09 08:21

Thank you for resizing the screenshot, and
by PsySc0rpi0n » 2020-08-08 12:32 : As for WM, I don't
know what is stands for.

WM is Window Manager,
Thanks for the explanation for your reason for using 'screen' as well.
Konsole is ok as a terminal, but if it was me that would be next, I would try with a different terminal emulator (TE),...How ever :
LE_746F6D617A7A69 wrote: Still You didn't told what TE You're using, but apparently this doesn't matter since I've just tested the 'screen' WM on XFCE Terminal and when it stays in the backgroud, the key bindings and the keymap is changed, making the terminal unusable -
and this looks very similar to Your results.

Maybe that covers that, I am going to install konsole, and see what happens as well, for now that is about it, off hand I don't have any other suggestions or ideas, but with more info now, someone else might,.. and I am very sleepy.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: terminal acting weird

Postby LE_746F6D617A7A69 » 2020-08-09 12:35

PsySc0rpi0n wrote:Won't that also kill (in a no graceful way) all apps I have running within screen?
I meant, that You can use killall for testing only - obviously it will terminate all the sessions. Whether it will it a gracefull termination or not depends on the programs running in the backgroud - especially if they can handle the SIGTERM correctly (which is the default signal for killall, if it's not specified)

PsySc0rpi0n wrote:Well, reason is to be able to save some terminal session tabs open, be able to use the same terminal session without having to shutdown other apps I have running. I actually run a few within screen. rtorrent, mcabber, irssi, bitcoin core.
The "tabs" in Terminal Emulator have exactly the same functionality as the sessions within the screen program. The screen simply does exactly the same thing as TE, but it was designed to run on physical TTY - i.e. without having to install the Desktop Environment.
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 414
Joined: 2020-05-03 14:16

Re: terminal acting weird

Postby cuckooflew » 2020-08-09 14:16

Interesting about the 'screen' program, I had never use it before my self,
Just now tried it, but it is not installed yet on Debian,..LE_746F6D617A7A69 is right though, using it as a command in a terminal emulator is not the correct way to be using it, I got the same behaviour when I installed it, but on OpenBsd, my main system, but that is another topic.
Since it did not seem correct to me, a quick look at the manual:
SCREEN(1) General Commands Manual SCREEN(1)

NAME
screen - screen manager with VT100/ANSI terminal emulation

SYNOPSIS
screen [ -options ] [ cmd [ args ] ]
screen -r [[pid.]tty[.host]]
screen -r sessionowner/[[pid.]tty[.host]]

DESCRIPTION
Screen is a full-screen window manager that multiplexes a physical
terminal between several processes (typically interactive shells).
Each virtual terminal provides the functions of a DEC VT100 terminal
and, in addition, several control functions from the ISO 6429 (ECMA 48,
ANSI X3.64) and ISO 2022 standards (e.g. insert/delete line and support
for multiple character sets). There is a scrollback history buffer for
each virtual terminal and a copy-and-paste mechanism that allows moving
text regions between windows.

When screen is called, it creates a single window with a shell in it
(or the specified command) and then gets out of your way so that you
can use the program as you normally would. Then, at any time, you can

DESCRIPTION
Screen is a full-screen window manager that multiplexes a physical
terminal between several processes (typically interactive shells).

If the OP likes this, then they probably will like using a Window Manager (WM) instead of DE, or as a supplement to a DE,.. I got interrupted, and will get back to this later, using the & , and not using the screen command,like this is a better option:
PsySc0rpi0n wrote:
I'm already using the '&' at the end of the command or I won't get the prompt back.

You should also be able to just open another terminal, I often work with several terminals open, you really don't need to be using the screen command/program this way. (even if that is what you have been doing for years, ) any way, will be back later
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: terminal acting weird

Postby PsySc0rpi0n » 2020-08-09 21:14

I understand what you all are trying to say. I accept it. This said, what other options do I have to avoid having multiple terminal tabs opened in a single terminal window, wasting RAM and processor power that can be used for other tasks? Also, another reason to use screen is that if I have these 4 or 5 tabs open for the apps I always run, plus 3 or 4 more when I and "having fun" programming (3 or 4 tabs for this, is not that much), I easily get lost in which tab is what... I know you can use vim to manage multiple open files and etc, but is way more convenient to have this constant 4 or 5 apps within screen an then, have the other 3 or 4 tabs for programming (an other tasks) out of screen, right there at end. So, at the end of the day, I think is a matter of commodity, being used to that and maybe just may way of keeping things organized.

What I can do is to test if with screen I waste more or less RAM than having the needed tabs open individually on a single terminal window.
User avatar
PsySc0rpi0n
 
Posts: 215
Joined: 2012-10-24 13:54
Location: Portugal

Re: terminal acting weird

Postby LE_746F6D617A7A69 » 2020-08-09 21:55

I have 4-5 sessions opened in in Code::Blocks - and this is a *normal* situation for me ... :D

I must admit, that I haven't measured the resource consumption difference betweet TE tabs and the "screen" - but I don't think it will be significant ...

You can check this on Your own - and I'm really curious what the result would be ... ;)
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 414
Joined: 2020-05-03 14:16

Re: terminal acting weird

Postby cuckooflew » 2020-08-10 00:07

What I can do is to test if with screen I waste more or less RAM than having the needed tabs open individually on a single terminal window.

You can use 'top' to monitor that, also 'conky', if you install it. There may be some other ways, I have some chores, and don't have time at the moment, it will take some screen shots to explain. In the offtopic forum there is a thread /topic of screen shots, http://forums.debian.net/viewtopic.php?f=3&t=9196
===========
http://forums.debian.net/viewtopic.php?f=3&t=59034
Maybe browse those, and get some ideas, ..
So, at the end of the day, I think is a matter of commodity, being used to that and maybe just may way of keeping things organized.

Yes, on that you will just need to explore the many ways to do this, and at first , anything new will seem strange, it takes time to get used to something new.
to avoid having multiple terminal tabs opened in a single terminal window,

All though, also I am not sure I understand what you mean here, in all the years I have been using Unix, BSD's and Linux, I have never felt a need for using the screen program, and never knew it existed until now. I am exploring it just now, but don't see the advantage of using it.
When I first switched from using a DE to WM (window manager), at first it was difficult, but quickly I started liking it better and after a while stopped even installing a DE, except if and when I need one to see if I can duplicate a problem someone has, then obviously I need to have a working copy.
There is a window manager that is default for KDE, plasma: https://userbase.kde.org/KWin I will post some screen shots later, I have 5 terminals running now, and 4 tabs open in the browser, but can not really explain in words.
==edit===
Here is one screenshot: http://forums.debian.net/viewtopic.php?f=3&t=59034&p=725597#p725597
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: terminal acting weird

Postby PsySc0rpi0n » 2020-08-10 19:22

Well, that is what I want to avoid. Many open windows. Or many tabs that you easily get lost. Or at least me. So, instead of having 7 or 8 tabs open in a terminal window, I can save, at least, 4 or 5 tabs with scree, because all those 4 or 5 apps are running within screen, so no tabs needed.

I can try to test the resources used in both situations maybe next Friday or Saturday.
User avatar
PsySc0rpi0n
 
Posts: 215
Joined: 2012-10-24 13:54
Location: Portugal

Next

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable