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

using screen as backend for konsole (optional)

95

Votes
96
1
Tags: konsole, console, x, session, session-resume konsole, console, x, session, session-resume konsole, console, x, session, session-resume
(comma "," separated)
jei
Registered Member
Posts
1
Karma
0
OS
logout or X crash destroy all jobs running in a console (as 'konsole' session with multiple tabs) unless you embed your command in a 'screen' session.

I'm refering to:
console tasks which DO NOT involve X in any way, just plain console applications as:
- mv a b
- mplayer (for music listening)
- rsync ...
- scp ...
- wget/curl ...
any X referencing program would of course fail when X is going down.

== what i want ==
konsole should be able to use screen in an transparent way, so once you open 4 tabs in 'konsole' you have also 4 screen sessions running. once X goes down kde is restarting konsole on relogin. now konsole looks for orphaned 'screens' and resumes them.

please read [1] for more details. i consider this use-case straight forward since the benefit is obvious to anyone who had a frequently crashing X with low bandwidth links for instance when downloading with wget instead of kget.

[1] http://invalidmagic.wordpress.com/2009/10/20/process-control-on-logout/
User avatar
TheBlackCat
Registered Member
Posts
2945
Karma
8
OS
This is also useful for some tasks that only work in a true terminal session and not a terminal emulator like console. Some lower-level x11 tasks require a real console. I am not sure, though, that is is actually possible.


Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965
Lachu
Registered Member
Posts
864
Karma
1
OS
Rename nohup into task. Task should't have terminal output. If thinks goes wrong, we will display notification with button links to task output. Also task is done message could appear.

task rm -r ./source_code


Add information about task to system help.

In future we can provide more flexible task, integrating it to at program or cron.


Lachu, proud to be a member of KDE forums since 2008-Nov.
Lachu
Registered Member
Posts
864
Karma
1
OS
Output of task should been redirected to file and we can use tail -f in konsole to show it.

Use cases:
Mathew wrote "task make" in some source directory. Terminal output is free and no rubbish are displayed. Mathew can click on special task manager button to display background task. He can show task by clicking on item represents Konsole Window. When task is finished notification will appear. Additionally we tries to guess task is exit normally or abnormally. Remember in many cases console programs will returns 0 if all right and other error code in different situation.


Lachu, proud to be a member of KDE forums since 2008-Nov.
fary
Registered Member
Posts
10
Karma
0
OS
Could be very useful because sometimes my KDE crashes during transcoding and that really is annoying.
But could it be that this solution takes a lot of performance?
User avatar
Timo
Registered Member
Posts
51
Karma
0
OS
I wonder if this goes along nicely with the - imho not-so-good - idea of making all konsole windows a single process.

Honestly, that almost drives me away from using konsole at all. Screen would be a fine backend for it though.
sahko
Registered Member
Posts
16
Karma
0
OS
Maybe it would be better to use tmux ( tmux.sf.net ).
It has much better code quality, its actively maintained and has more features.
GNU screen is ATM much more known and used but its in essence unmaintained and no developer has extended knowledge of its code.
User avatar
TheBlackCat
Registered Member
Posts
2945
Karma
8
OS


Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965
Lachu
Registered Member
Posts
864
Karma
1
OS
I have idea how to solve one problem. Instead of using screen as console backend, we can allow to run whole shell with nohup. Just add new checkbox to profile configuration dialog and add new profile to Konsole, witch has this checkbox set. We can call new profile as immutable session.


Lachu, proud to be a member of KDE forums since 2008-Nov.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]