Results 1 to 7 of 7

Thread: Storing terminal sessions

  1. #1
    Join Date
    Sep 2009
    Beans
    158
    Distro
    Ubuntu 12.04 Precise Pangolin

    Storing terminal sessions

    I usually work on one project at a time, and in that project I like to have certain terminal tans (for example, when working on django projects, I like to have one to run the server, one for apps, one for static files, one for templates, etc) and I like to name them. Is there any easy way to run a set of commands when a terminal starts up (basically, just cd to certain directories and name the terminal tabs for each seperate tab), or if not, is there a command for making a new tab in terminal?
    The box said 'Windows 7 or better' .... so I installed Linux.
    I5 2500K @ 4.6 GHZ, 5770 stockOC, 902 case, OCZvertexII, 2 1TB seagate RAID0, 16GB @ 1600 MHz

  2. #2
    Join Date
    Feb 2008
    Location
    Pelican Bay Correctional
    Beans
    Hidden!

    Re: Storing terminal sessions

    Not sure about "terminal tans". Perhaps that is "terminal trans(parent)?"

    any way, this may help
    If you want things you've never had, you have to do things you've never done.

  3. #3
    Join Date
    Nov 2010
    Location
    India
    Beans
    Hidden!
    Distro
    Ubuntu 15.10 Wily Werewolf

    Re: Storing terminal sessions

    To open a TAB in terminal , you have
    Code:
    SHIFT+CTRL+T
    . I am suggesting you to use something like alias . when you type that single command all the code attached to that will executes .
    Dont miss anything even it is small. one small pin is enough to bring down a man.


  4. #4
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Storing terminal sessions

    You can set up your terminal with all of the required tabs configured and then issue a command to save the state of the terminal:
    Code:
    gnome-terminal --save-config=.terminalstate
    This will save the state as a file called .terminalstate. If you want to have this file used whenever you start a terminal you can edit the /usr/share/applications/gnome-terminal.desktop file and edit the line that begins Exec= so that it reads:
    Code:
    Exec=gnome-terminal --load-config=.terminalstate
    If you want to see exactly what is happening the terminal state file is pretty self-explanatory, you can open it in a text editor and make manual changes to it if you want.
    Last edited by Cheesemill; November 12th, 2012 at 03:19 PM.
    Cheesemill

  5. #5
    Join Date
    Sep 2009
    Beans
    158
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Storing terminal sessions

    The save-config and load-config appears to be working great. I can even have a seperate terminal session for each project now

    Thanks a heap
    The box said 'Windows 7 or better' .... so I installed Linux.
    I5 2500K @ 4.6 GHZ, 5770 stockOC, 902 case, OCZvertexII, 2 1TB seagate RAID0, 16GB @ 1600 MHz

  6. #6
    Join Date
    Sep 2009
    Beans
    158
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Storing terminal sessions

    Actually, I've just realised that these --load-config options don't store the tab titles. Is there any way to get around that?
    The box said 'Windows 7 or better' .... so I installed Linux.
    I5 2500K @ 4.6 GHZ, 5770 stockOC, 902 case, OCZvertexII, 2 1TB seagate RAID0, 16GB @ 1600 MHz

  7. #7
    Join Date
    Sep 2009
    Beans
    158
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Storing terminal sessions

    Wait, I found it. Although the save-config doesn't save your terminal title, what you can do is to go into the config file it saved and add Title=<title> as a line to each tab (but you first need to change the profile to keep its old title when a terminal command wants to change it).

    Also, I strongly advise this in combination with xbindkeys, because these terminal commands can get quite tedious.
    The box said 'Windows 7 or better' .... so I installed Linux.
    I5 2500K @ 4.6 GHZ, 5770 stockOC, 902 case, OCZvertexII, 2 1TB seagate RAID0, 16GB @ 1600 MHz

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •