This forum has been archived. All content is frozen. Please use KDE Discuss instead.

konsoleprofile does not work in screen

Tags: None
(comma "," separated)
pansz
Registered Member
Posts
113
Karma
0
OS
Hello, in KDE4 we can use the command konsoleprofile to send command to konsole.

Such as:
Code: Select all
konsoleprofile CursorShape=1

changes the cursor shape

however, when I launched a screen session, the command does not work, i.e. konsole profile does nothing at all.

Is this the issue of screen or konsole? any hints?

I'm using GNU screen 4.0.3 and konsole 2.1

Last edited by pansz on Thu Mar 12, 2009 9:48 am, edited 1 time in total.
User avatar
Alec
Registered Member
Posts
565
Karma
1
OS
The thing about running in screen is that your session is independent of the terminal you're running in, so it can not know in what Konsole to change the cursor, or if you're running in Konsole at all! So if you want to change the cursor shape, you have to detach the screen (Ctrl+A D) run the konsoleprofile command, and then reattach to your session (screen -r).


Get problems solved faster - get reply notifications through Jabber!
pansz
Registered Member
Posts
113
Karma
0
OS
I don't quite catch that. I use vim and set it up to change cursor when enter/exit insert mode. vim can be used in screen and it sends the code as konsoleprofile send.

konsoleprofile simply sends some term code and if konsole receives the code it should change cursor shape.

what do you mean by "It can not know in what Konsole to change the cursor"?
Do you mean that the code send to screen are not sent to konsole at all?
User avatar
Alec
Registered Member
Posts
565
Karma
1
OS
The point is, screen itself is a terminal emulator. It's kind of like an xterm inside a konsole.

Try this:
Open Konsole and run "screen -S test".

Next, open xterm (for example) and attach to it using "screen -x ####.test" (replace #### with the number you get from "screen -ls")

Now if you type inside of Konsole, the same thing is typed in xterm, and if you type in xterm, it will be mirrored in Konsole. So now, if you run konsoleprofile, in either one it should change the cursor in the Konsole window according to you, right? The problem is that it does not know if it's inside Konsole, and really it is not - the session is now inside two terminals at the same time. Which one is it in? It's in neither - the terminal is screen, not xterm and not Konsole. Inside Konsole, press ^A D. This will detach the screen session, so you'll only have it running inside xterm and not Konsole.

So basically, screen is the terminal. This means anything inside knows only of screen and knows nothing about what screen is running inside of.

Code: Select all
$ echo $TERM
xterm
$ screen
$ echo $TERM
screen


Get problems solved faster - get reply notifications through Jabber!
pansz
Registered Member
Posts
113
Karma
0
OS
So here comes another question: is it possible to give konsole some functionality of gnu screen?

What I want is fairly simple: the term itself being a daemon, it will not quit when konsole quit or even if the X server crashes.
When I restart the X server and start konsole I can reconnect to the session.
When I connect from a remote ssh terminal I can still connect to the session.
User avatar
Alec
Registered Member
Posts
565
Karma
1
OS
Unfortunately, I've never heard of anything like that, and I would guess that would require a lot of reinventing the wheel...

However, I do think it would be neat if Konsole implemented support for this:
http://linuxgazette.net/137/anonymous.html
(Haven't seen any other X11 terms doing it, though)


Get problems solved faster - get reply notifications through Jabber!


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft