When loading a layout, terminal windows don't seem to navigate to layout configured working directories

Bug #1494008 reported by Aaron
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Terminator
Confirmed
Low
Unassigned

Bug Description

Per a brief conversation with Stephen Boddy on a blog post about the Terminator 0.98 update, I pulled down the nightly PPA for apt-get on my Ubuntu MATE 14.04 (x64) system and tried it out, taking note of the tantalizing new features - in particular the feature list included, that when you save a layout, it should remember each terminal's working directory!

I have noticed that the directory saving feature is not working -- I am performing the following steps:

- Open new terminator window
- Perform splits, move terminal extent separators to form the layout shape I want.
- Go to the GUI Preferences > Layouts
- Hit Add at the bottom to add a new layout > name it > hit Enter key > hit Save button at bottom
- Close terminator, then load terminator back up again with the -l option and give my layout name
- The layout does come up, but none of the working directories have saved
** I have also tried going in and manually configuring each Terminal in the Layout 'tree view' for certain working directories. I only had success by editing the .config/terminator/config file manually by adding the following to each terminal within the profile:

command = $SHELL
directory = /home/username/my_directory_i_want

So that is my current workaround for saving directories in layouts, but it would of course be nice one day if we can have things save within the layouts without such a manual configuration! I've also gotten the impression that we shouldn't have to change the custom command in each terminal to execute $SHELL -- which in my case SHELL=/bin/bash

Previous installation steps taken:
sudo add-apt-repository ppa:gnome-terminator/nightly
sudo apt-get update
sudo apt-get install terminator

Nightly version listed in apt package: 0.97+1641~ubuntu14.04.1

References:

Blog post about Terminator updates:
http://www.webupd8.org/2015/09/terminal-emulator-terminator-sees-new.html#comment-2244195537

PASTE DUMP OF .config/terminator/config (with my edits, incidentally) :

[global_config]
  enabled_plugins = LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
  suppress_multiple_term_dialog = True
  title_font = DejaVu Sans Mono 11
  title_transmit_bg_color = "#007156"
  title_use_system_font = False
  window_state = maximise
[keybindings]
[layouts]
  [[default]]
    [[[child0]]]
      fullscreen = False
      last_active_term = 8ffe5ba4-5cf0-4c37-98b1-156124505e85
      last_active_window = True
      maximised = True
      order = 0
      parent = ""
      position = 1920:0
      size = 1920, 1052
      title = adowdy@ad-work: ~
      type = Window
    [[[child1]]]
      order = 0
      parent = child0
      position = 957
      ratio = 0.5
      type = HPaned
    [[[child2]]]
      order = 0
      parent = child1
      position = 523
      ratio = 0.5
      type = VPaned
    [[[child3]]]
      order = 0
      parent = child2
      position = 258
      ratio = 0.499043977055
      type = VPaned
    [[[terminal4]]]
      order = 0
      parent = child3
      profile = default
      type = Terminal
      uuid = 6db37238-f482-4ddb-92a7-5ecd58ffff3d
    [[[terminal5]]]
      order = 1
      parent = child3
      profile = default
      type = Terminal
      uuid = b96429c7-553c-40f5-88e7-894d438b477f
    [[[terminal6]]]
      order = 1
      parent = child2
      profile = default
      type = Terminal
      uuid = 42cbc4f3-b8f3-498d-a1e0-38ea9d9a4d65
    [[[terminal7]]]
      command = ""
      directory = ""
      order = 1
      parent = child1
      profile = default
      type = Terminal
      uuid = 8ffe5ba4-5cf0-4c37-98b1-156124505e85
  [[max]]
    [[[child0]]]
      fullscreen = False
      last_active_term = 42cbc4f3-b8f3-498d-a1e0-38ea9d9a4d65
      last_active_window = True
      maximised = True
      order = 0
      parent = ""
      position = 1920:0
      size = 1920, 1052
      title = MAX_DEV_TERMINALS
      type = Window
    [[[child1]]]
      order = 0
      parent = child0
      position = 957
      ratio = 0.5
      type = HPaned
    [[[child2]]]
      order = 0
      parent = child1
      position = 483
      ratio = 0.461977186312
      type = VPaned
    [[[child3]]]
      order = 0
      parent = child2
      position = 304
      ratio = 0.635610766046
      type = VPaned
    [[[child4]]]
      order = 0
      parent = child3
      position = 143
      ratio = 0.480263157895
      type = VPaned
    [[[terminal5]]]
      command = $SHELL
      directory = /home/adowdy/tractorsim
      order = 0
      parent = child4
      profile = default
      title = TRACSIM
      type = Terminal
      uuid = 6db37238-f482-4ddb-92a7-5ecd58ffff3d
    [[[terminal6]]]
      command = $SHELL
      directory = /home/adowdy
      order = 1
      parent = child4
      profile = default
      title = SOCAT
      type = Terminal
      uuid = f8257fe4-211c-4751-b79f-90ca1518699e
    [[[terminal7]]]
      command = $SHELL
      directory = /home/adowdy/agj/s4trunk-installer/S4ApplicationProject/dependencies/bin
      order = 1
      parent = child3
      profile = default
      title = CAN
      type = Terminal
      uuid = b96429c7-553c-40f5-88e7-894d438b477f
    [[[terminal8]]]
      command = $SHELL
      directory = /home/adowdy/agj/s4trunk-installer/S4ApplicationProject/OutbackS4
      order = 1
      parent = child2
      profile = default
      title = MAX
      type = Terminal
      uuid = 42cbc4f3-b8f3-498d-a1e0-38ea9d9a4d65
    [[[terminal9]]]
      order = 1
      parent = child1
      profile = default
      type = Terminal
      uuid = 8ffe5ba4-5cf0-4c37-98b1-156124505e85
  [[test1]]
    [[[child0]]]
      fullscreen = False
      last_active_term = 8ffe5ba4-5cf0-4c37-98b1-156124505e85
      last_active_window = True
      maximised = True
      order = 0
      parent = ""
      position = 1920:0
      size = 1920, 1052
      title = adowdy@ad-work: ~
      type = Window
    [[[child1]]]
      order = 0
      parent = child0
      position = 957
      ratio = 0.5
      type = HPaned
    [[[child2]]]
      order = 0
      parent = child1
      position = 523
      ratio = 0.5
      type = VPaned
    [[[child3]]]
      order = 0
      parent = child2
      position = 257
      ratio = 0.497131931166
      type = VPaned
    [[[terminal4]]]
      order = 0
      parent = child3
      profile = default
      type = Terminal
      uuid = 6db37238-f482-4ddb-92a7-5ecd58ffff3d
    [[[terminal5]]]
      order = 1
      parent = child3
      profile = default
      type = Terminal
      uuid = b96429c7-553c-40f5-88e7-894d438b477f
    [[[terminal6]]]
      order = 1
      parent = child2
      profile = default
      type = Terminal
      uuid = 42cbc4f3-b8f3-498d-a1e0-38ea9d9a4d65
    [[[terminal7]]]
      order = 1
      parent = child1
      profile = default
      type = Terminal
      uuid = 8ffe5ba4-5cf0-4c37-98b1-156124505e85
[plugins]
[profiles]
  [[default]]
    background_image = None
    font = DejaVu Sans Mono 11
    scroll_on_output = False
    scrollback_lines = 50000
    use_system_font = False

Changed in terminator:
importance: Undecided → Low
Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

An excellent bug report with a very clear description, and as a result I can tell you what is going on straight away.

From the GUI it is likely confusing, but the save/new buttons do NOT store the values in the preferences widgets. They only store the windows/tabs/terms/groups that can be detected from the current session. The working dir is not (at least for now) one of these detectable parameters.

Have you discovered the manual yet? Press F1, or use the button in the About tab of Prefs. Select the "Layouts and the Layout Launcher" item, and midway down the page you will see a big orange Warning box that explains this exact issue.

Let me know if this works for you once you have followed this. If so I'll close this item as Invalid.

Revision history for this message
Aaron (nerael) wrote :

Stephen -

I'll admit I was totally unaware of the terminator documentation in HTML (F1 or About page Manual button)! I had read the man pages (man terminator, terminator_config), but this HTML doc has quite a lot more. I do apologize for my ignorance!

I went ahead and tested by just inputting the directories I wanted and then NOT hitting save (which was indeed apparently wiping out my directory configuration) - after this I was able to load the layout again and it retained the directory that I typed into the layout configuration GUI.

That all said, I do wish that the layout editor tool was a bit more intuitive on this (the SAVE button, etc) - but of course I'm sure you have bigger fish to fry!

I believe you are right about this being a low priority issue in any event.

Revision history for this message
Aaron (nerael) wrote :

One more note - perhaps it might be better to give the user the option to save the directories along with the windows/tabs/terms/groups? Like a checkbox or something by the SAVE button... not sure. Maybe if I get time I can formulate a patch that would serve this purpose -- though I'm not familiar with how likely it would be that it would get used :P

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Hi Aaron, ideally the cwd would be detected and saved directly. I *think* most of the code needed is already there. It just needs plumbing in. Each terminal stores the PID of the initial process, and using the PID the CWD of that process can be detected. Of course nested processes (shells/ssh) might make things a bit more confusing for those not fully understanding all this. Same goes for the command.

And don't worry about not having spotted the manual. It's a new creation, and perhaps not as well signposted as it should be :-)

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Hi Bug subscribers, this is the maintainer (Steve Boddy) of Terminator, who took over from Chris.

In case you were not aware there has been a new release 0.98 of Terminator in the last few days which has many changes, fixes and updates. We also have an ongoing GTK3 port which uses a much more up-to-date libvte.

Even with the ~50 issues closed by that release, and discounting the ~90 outstanding wishlist items, we still have an unwieldy 95 bugs. With the oldest approaching it's 6th birthday and some that haven't seen any updates in nearly 5, it is time for a purge.

My intention is to try and get this list down to a minimum, and for that I need your help.

First I'm going to work through, oldest to newest, setting bugs to Incomplete, pending confirmation that they are still an issue. If after a month there is no feedback, the issue will get closed as Invalid. Here's where you come in. I can't always reproduce, or setting up (i.e. other distros) to even test takes a long time, so I'm going to try crowdsourcing this.

1. Get the latest release. Is it still an issue? If yes, set the confirmed-0.98 tag. For bonus points follow the guide http://gnometerminator.blogspot.com/2015/09/so-you-want-to-try-terminator-gtk3.html and see if the GTK3 branch has same issue, and set the confirmed-gtk3 or notaffected-gtk3 tag.

2. Can you reproduce with an empty/default config file? You can pass "-g temp_config" to do this without affecting your existing config. If you already have Terminator running, you'll need to pass -u as well to disable the DBus.

3. If able to, can you reproduce with another user/guest account?

4. If the issue does not already have clear, precise instructions to reproduce with minimal setup/steps, add them.

5. Put as much info about what you are running.
   * Software/library versions (libvte, gtk, pango, cairo, distro, desktop environment, language)
   * Screens (single or multi)
   * Any unusual / custom packages or configs that might be interacting.

6. If possible attach the config file, unless the issue also happens with an empty one, but mention that.

7. Attach the "-d" debug output from 0.98.

Some common things that cause incidents.

* Strange sizing issues or rapidly shrinking windows - Try turning off Window geometry hints.
* Input (esp. broadcasting duplicate chars etc) problems - Try killing IBus.
* Hand editing of the config file can cause various issues - Due to misunderstanding, incorrect structure or typos.
* Some issues are actually in libvte - This is why testing GTK3 is so important.
* segfaults - Unfortunately these are dying inside the C libraries, and it is usually beyond me to fix those.

Many thanks for your assistance, and hopefully this will get us closer to a bug-free Terminator.

Changed in terminator:
status: New → Incomplete
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

> The working dir is not (at least for now) one of these detectable parameters.

The working directory _is_ detectable: see terminatorlib/terminal.py -> get_cwd().

It would indeed be nice to save/restore it.

Revision history for this message
Freak (rrtaft) wrote :

Having the button named "Save" is confusing and not intuitive, as it does not save the changes that you have made, but overwrites them. It should be named something else.

Revision history for this message
sam tygier (samtygier) wrote :

Still an issue in 1.91

The "Save" button could be renamed to "Capture Layout"

It could also pop a dialogue asking which properties to save. For example I might want to save the geometry of a layout, but not the working directories.

Changed in terminator:
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.