Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible, using terminal in Ubuntu 12.04, to save the session, with all the tabs and everything opened in those tabs, and than reopen it at a later time?

My problem is that I have a few tabs open, with vim running in one tab with multiple buffers, and another tab with django server going, and its just a hassle to start all this up every time.

share|improve this question

3 Answers 3

Provided that you don't turn the computer off, you can use GNU screen to get something similar. It gives you the ability to detach and leave everything running in the background, and reattach at a later time.

share|improve this answer
    
Is there no way to save this, and turn the computer off? If not, how can I save the tabs and the directories they are open to,shut the computer off, than open the tabs? –  Errol Fitzgerald May 13 '12 at 21:11

Give tmuxinator a try. It allows you to store your desired windows/panes in a config file along with what commands should run in each on start-up.

Once you have your configuration file setup you just start up tmuxinator and tell it which config to use and it will open all of your windows/panes and run all the configured commands in the appropriate place automatically.

Can be a huge time saver if you take the time to learn and configure

share|improve this answer

With Vim, you can run :mksession to save your current session, i.e., mappings, options, variables, current directory, tabs, windows (and their layouts), etc. This saves all the session information into a file in the current directory called Session.vim (you can provide a filename to the :mksession command if you want to save different sessions in different files, e.g., :mksession django-files.vim). Since the information is stored in a file, it will persist after a restart of the computer.

To restore your session the next time you start Vim, simply run, :source Session.vim or :source django-files.vim

See Vim’s help session-file for full details.

To restore the terminal tab with the Django server, I’d simply write an alias, function or shell script to change into the relevant directory, start the server, etc.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.