Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 22700 ideas, 138270 comments, 2629576 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #27241: Save The Terminal Session

Written by TWCrap the 21 Feb 11 at 11:32. Category: Others. Related project: Nothing/Others. Status: New
Rationale
I work with an USB device with Ubuntu on it. At school i have to change a lot of classrooms, so i have to shut down Ubuntu and reboot later...

I work a lot with the terminal. But because of the reboot thing, doesn't work that fine.

So i went on the Internet looking for saving my terminal session so i can reboot and continue. But i haven't found 1 with is working.

Because the most work... but not after an shut down / reboot.

So my idea was to put something in the terminal that saves his current session (what it's doing and so on) and that you can select the file later (after an reboot) so you can continue where you where.

12
votes
up equal down
Solution #1: Save button with the status
Written by TWCrap the 21 Feb 11 at 11:32.
An save button inside the terminal with safe the current task of the terminal so it continue where it was when you open the file.
3
votes
up equal down
Solution #2: Add an option to automatically keep terminal session saved, even on crashes
Written by Felitaur the 19 Mar 11 at 21:03.
Make terminal sessions work like it is in Firefox, so when you reload terminal after reboot or even X crash, it should display all the previously saved outputs + different command histories for tabs + names of opened tabs, but is should not restart commands that was running on terminal closure (except maybe less or man sessions, which may be restored).

Also, make this optional and maybe disabled by default

Propose your solution

Attachments
No attachments.


Duplicates


Comments
Akerbos wrote on the 21 Feb 11 at 16:08
What exactly would you save? Command history should be stored, anyway. Running programs? Inadvisable in general.

agarner98 wrote on the 21 Feb 11 at 22:31
Agreed with Akerbos. Besides, it's better to set Ubuntu on a partition, anyway. So thataway, whilst going from class to class, you're asured of a saved terminal/ command line history.

Ssdg wrote on the 22 Feb 11 at 08:28
As akerbos said, one is already done, the other is not a good idea. (unless you freeze the whole system (aka, suspend to disk, already done too)

-1

Darwin Survivor (Brainstorm moderator) wrote on the 25 Feb 11 at 05:16
Why are you rebooting? Is it because suspend/hibernate do not work?

TWCrap wrote on the 25 Feb 11 at 13:03
1; The thing that i want is an button so you can save the status and when you browse with the terminal to that file and open it... It will continue with what is was doing.

2; I have Ubuntu on an partition on my USB (100 GB partition)

3; I have to shut down because i have to go to an another classroom... and as far as i know is it not possible to suspend and continue on an another PC.

4; And i know the security risk about it... But if you know what you are doing then nothing is happing (right?)

Darwin Survivor (Brainstorm moderator) wrote on the 26 Feb 11 at 00:43
Ok, booting ubuntu off a USB DOES present some new special issues that definitely require some attention.

Does anyone know if it is possible to use part of the USB drive (or even a second USB drive) for suspend-to-disk operations?

Depending on the cli stuff you are doing (irssi, etc), you could also set up a home server with ssh (public/private keys) and screen (VERY useful cli tool) and simply re-connect from your next lab computer. That way your processes won't even have to be paused when you move between labs. In fact, you could even put portablePutty on the sub drive and not even need to reboot the machine.

What kind of software are you running on the cli (irssi, gcc, ssh, telnet, links, etc) and is it imperative that those applications be "running" on your lab machine, as opposed to simply connecting to another linux machine that IS running them?

TWCrap wrote on the 26 Feb 11 at 13:24
I must say that the first thing Darwin should be wonderful if it is possible.

second.. Sorry if i where confusing you guys, but i do not use an server. Just an single PC.

I know about the abilities of screen when it's installed on an server... But that's not the case now...

So i can't give you advice of the cli :$

PaddyLandau wrote on the 2 Mar 11 at 13:02
You can't hibernate on one machine and resume on another, because there could be different hardware or other set-up differences.

But you can install Ubuntu on a USB and have a dedicated home partition. This means you will have saved history. I use that method myself. You can install your own programs, etc. Of course, you need to boot from the USB, not from the computer's hard drive.

Simply install Ubuntu using System > Administration > Startup Disk Creator. Set "Stored in reserved extra space". I recommend a USB of at least 4Gb, preferably more, for this.

TWCrap wrote on the 2 Mar 11 at 14:22

>>>PaddyLandau wrote on the 2 Mar 11 at 13:02 Report as spam / offensive
You can't hibernate on one machine and resume on another, because there could be different hardware or other set-up differences.

But you can install Ubuntu on a USB and have a dedicated home partition. This means you will have saved history. I use that method myself. You can install your own programs, etc. Of course, you need to boot from the USB, not from the computer's hard drive.

Simply install Ubuntu using System > Administration > Startup Disk Creator. Set "Stored in reserved extra space". I recommend a USB of at least 4Gb, preferably more, for this.



TWCrap wrote on the 2 Mar 11 at 14:25
oeps! that wen't wrong :S

But if i get it right...

When you enable that option you mented... al the file's that temporarily stored on the PC (or USB) will still exist even after an reboot???

Felitaur wrote on the 19 Mar 11 at 21:12
This is a good idea, however, terminal must not restart running programs, excluding maybe man or less, which are generally safe, but rather save all the outputs on all tabs automatically and load it, including different command history for different tabs and it names, also print a line like
-----------------restored--------------------
Also that thing must store commands which was typed, but was not executed yet.

I'm unhappy when my long command, I have worked on for a hour disappear when I was having to restart X forcefully

TWCrap wrote on the 22 Mar 11 at 07:46
But if you are doing an process that takes an long time, and the power shuts of or something like that... Than it's handfull if the terminal continue where it was...


Darwin Survivor (Brainstorm moderator) wrote on the 22 Mar 11 at 15:17
@TWCrap That would require that every application you run in terminal use the HDD (or flash drive, what-ever) as RAM. This would SEVERELY impact performance to the point where your 1/2hour command would take around 4-5 hours!

TWCrap wrote on the 22 Mar 11 at 20:39
Alright, I understand that. But isn't it possible to make some kind of an save button that makes an log file or whatefer with the current task and all that kind of stuff???

Darwin Survivor (Brainstorm moderator) wrote on the 23 Mar 11 at 09:14
Hmm, so sort of like hibernation for a single application... It's technically possible, though I've never seen it done (aside from an application being specifically designed for it), you'd just have to work around architecture issues (cpu being the big one).

Another way to do it would be to use a light bootable linux distro that has VirtualBox (or similar) and run your real linux distro inside that. Since VirtualBox can "pause" any guest OS and it provides a layer between the OS and the hardware, you wouln't have to worry about your guest OS being able to resume on the new hardware.

Per-process hybernation is possible, but would need some serious work, the VirtualBox thing is kind of a "it can be done now with minimal work" temporary fix.

TWCrap wrote on the 23 Mar 11 at 13:41
Okay, i get it :D it's hard to make it happen :P bad luck :S

I understand the possibilities of Virtual Box, but as you mention, it isn't the best selution (performance)

deebocean wrote on the 1 Jan 12 at 13:08
Good idea to start new window with predefined taps and titles from the last or saved session.
I am using the Dynamips for my Networking lab simulation, each time i have to re-open 8 tabs and re-set their titles and to start connecting to the telnet server for each tab, if their is any option to load all of this automatically would be great.


Post your comment