gnome-terminator / terminator

multiple GNOME terminals in one window
https://gnome-terminator.org
GNU General Public License v2.0
2.14k stars 259 forks source link

Seems to be ignoring some settings, including layout-based custom commands #643

Open ghost opened 2 years ago

ghost commented 2 years ago

Before opening an issue, please try starting terminator with an empty config file, by issuing terminator -u -g /dev/null and see if it starts normally.

Terminator opens OK, but creating a new config file changes nothing. I mv'd the terminator folder in ~/.config to ~/.config/terminator.old and relaunched terminator. I set several options, including enabling the fullscreen window and it is not being loaded - although these settings persist, they have no effect.

If it does, and you still want to open the bug, then please attach the config file, usually found at $HOME/.config/terminator/config to the issue

Configuration below excluding unsaved/missing settings:

  [[default]]
    [[[child0]]]
      type = Window
      parent = ""
      order = 0
      position = 0:0
      maximised = True
      fullscreen = True
      size = 1920, 1080
      title = ********@********: ~
      last_active_term = dff84c18-1832-49e7-b2b8-7ab6d3332c02
      last_active_window = True
    [[[child1]]]
      type = VPaned
      parent = child0
      order = 0
      position = 276
      ratio = 0.2567441860465116
    [[[child2]]]
      type = HPaned
      parent = child1
      order = 0
      position = 960
      ratio = 0.5013054830287206
    [[[terminal3]]]
      type = Terminal
      parent = child2
      order = 0
      group = glances
      profile = Sml Shell
      uuid = d65fd9f8-07c7-4877-a456-b851394c4de9
    [[[terminal4]]]
      type = Terminal
      parent = child2
      order = 1
      group = glances
      profile = Sml Shell
      uuid = ec8db417-585a-422a-b736-4933f7f9b040
    [[[child5]]]
      type = VPaned
      parent = child1
      order = 1
      position = 692
      ratio = 0.8671679197994987
    [[[child6]]]
      type = HPaned
      parent = child5
      order = 0
      position = 433
      ratio = 0.22610966057441254
    [[[child7]]]
      type = VPaned
      parent = child6
      order = 0
      position = 291
      ratio = 0.42358078602620086
    [[[terminal8]]]
      type = Terminal
      parent = child7
      order = 0
      group = iftop
      profile = Sml Shell
      uuid = 0c461ed5-a485-4f52-80f4-2186a8b4fefc
    [[[terminal9]]]
      type = Terminal
      parent = child7
      order = 1
      group = iftop
      profile = Sml Shell
      uuid = 0cefde0f-f40c-4fac-8ffd-e32cee03d37c
    [[[child10]]]
      type = VPaned
      parent = child6
      order = 1
      position = 291
      ratio = 0.42358078602620086
    [[[terminal11]]]
      type = Terminal
      parent = child10
      order = 0
      group = cmd
      profile = default
      uuid = dff84c18-1832-49e7-b2b8-7ab6d3332c02
    [[[terminal12]]]
      type = Terminal
      parent = child10
      order = 1
      group = cmd
      profile = default
      uuid = 829a2874-5d7c-4af5-9956-009c11d88487
    [[[terminal13]]]
      type = Terminal
      parent = child5
      order = 1
      group = log
      profile = Sml Shell
      uuid = 5f4e1d9e-a696-496a-a680-8ee52c97e5cb
[plugins]

Fill out as many of these fields as you can

Describe the bug A clear and concise description of what the bug is. Both Preferences > Layouts > default > Terminal(x) > Custom Command and Working Directory are not saving or persisting. The entered strings disappear when I save, select a different terminal then go back. Also not apparent in Terminator's config file any more. Happened after a reboot.

To Reproduce Steps to reproduce the behaviour:

  1. Open Terminator;
  2. Open Preferences;
  3. Go to 'Layouts';
  4. Select 'default' layout;
  5. Select Terminal11;
  6. Click in 'Custom Command';
  7. Enter script name;
  8. Enter working folder location;
  9. Click Save;
  10. Click on Terminal10;
  11. Click on Terminal11;
  12. Custom Command and Working Directory are now empty again;
  13. Examine config file and find settings missing.

Expected behaviour A clear and concise description of what you expected to happen.

  1. Open Terminator;
  2. Open Preferences;
  3. Go to 'Layouts';
  4. Select 'default' layout;
  5. Select Terminal11;
  6. Click in 'Custom Command';
  7. Enter script name;
  8. Enter working folder location;
  9. Click Save;
  10. Click on Terminal10;
  11. Click on Terminal11;
  12. Custom Command and Working Directory are set to previously entered values;
  13. Examine config file and find settings correctly written.

Screenshots If applicable, add screenshots to help explain your problem. Let me know if you want screenshots - A video would be better, maybe?

Desktop (please complete the following information):

Additional context Add any other context about the problem here. The version and configuration have been unchanged since I set it up several months ago. It was working fine until I rebooted, then it stopped loading/saving the custom commands.

inxi -F output:

System: Host: **** Kernel: 5.4.0-74-generic x86_64 bits: 64 Desktop: Xfce 4.16.0 Distro: Linux Mint 20.2 Uma Machine: Type: Desktop System: Tactus product: High End AMD Motherboard Bundle v: 1.0 serial: <superuser/root required> Mobo: Micro-Star model: H510M-A PRO (MS-7D22) v: 1.0 serial: <superuser/root required> UEFI: American Megatrends LLC. v: 3.80 date: 01/12/2022 CPU: Topology: Quad Core model: Intel Core i3-10100F bits: 64 type: MT MCP L2 cache: 6144 KiB Speed: 800 MHz min/max: 800/4300 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 799 5: 800 6: 800 7: 800 8: 800 Graphics: Device-1: NVIDIA TU117 [GeForce GTX 1650] driver: nvidia v: 510.85.02 Display: x11 server: X.Org 1.20.13 driver: nvidia unloaded: fbdev,modesetting,nouveau,vesa resolution: 1920x1080~60Hz OpenGL: renderer: NVIDIA GeForce GTX 1650/PCIe/SSE2 v: 4.6.0 NVIDIA 510.85.02 Audio: Device-1: Intel driver: snd_hda_intel Device-2: NVIDIA driver: snd_hda_intel Device-3: Creative Labs CA0110 [Sound Blaster X-Fi Xtreme Audio] driver: snd_hda_intel Sound Server: ALSA v: k5.4.0-74-generic Network: Device-1: Intel Ethernet I219-V driver: e1000e IF: eno1 state: up speed: 1000 Mbps duplex: full mac: d8:bb:c1:61:69:a3 Drives: Local Storage: total: 817.89 GiB used: 567.15 GiB (69.3%) ID-1: /dev/nvme0n1 vendor: Transcend model: TS128GMTE110S size: 119.24 GiB ID-2: /dev/sda vendor: Crucial model: CT250MX500SSD1 size: 232.89 GiB ID-3: /dev/sdb vendor: Seagate model: ST3500312CS size: 465.76 GiB Partition: ID-1: / size: 116.38 GiB used: 52.61 GiB (45.2%) fs: ext4 dev: /dev/nvme0n1p2 ID-2: /home size: 457.45 GiB used: 321.33 GiB (70.2%) fs: ext4 dev: /dev/sdb1 Sensors: System Temperatures: cpu: 32.0 C mobo: N/A gpu: nvidia temp: 57 C Fan Speeds (RPM): N/A gpu: nvidia fan: 0% Info: Processes: 297 Uptime: 18h 29m Memory: 15.54 GiB used: 4.98 GiB (32.0%) Shell: bash inxi: 3.0.38

ghost commented 2 years ago

It appears that my Terminator no longer pays attention to it's configuration. It ignores every setting I change.

Thank you for the help.

ghost commented 2 years ago

I purged terminator 1.9 and reinstalled to no avail. I have also recompiled and reinstalled terminator-2.1.0 to no avail. I was able to set up my profiles, again, but the command and directory associated with the terminals is not persisting or saving, as in original description.

Thank you for any help. If you need more info, please ask.

Are there any Python modules/etc I need to check for?

ghost commented 2 years ago

OK, I have manually entered the following into the config file for terminator for one of my terminals:

command = glances

It works initially, but they all just vanish when I go to layout preferences and click 'Save' from the GUI.

This isn't the behaviour I would expect. Is this a bug? Anyone else getting this?

vssdeo commented 2 years ago

Hi @stinnnnn thanks for reporting this and I would like to trouble you once again. Do you see the same behavior in the latest source tree from master. I know its quite a trouble to redo everything. But a try on latest master branch should help. I tired the steps but I am not exactly getting same results hence requesting.

ghost commented 2 years ago

Hi @stinnnnn thanks for reporting this and I would like to trouble you once again. Do you see the same behavior in the latest source tree from master. I know its quite a trouble to redo everything. But a try on latest master branch should help. I tired the steps but I am not exactly getting same results hence requesting.

Hi, @vssdeo and thank you for the reply - I'm not ignoring you, just having a rough week. I will grab the latest master, compile and have a go (dependencies willing) and report back to you.

I think there is a missing step in reproduction, which could be an environmental change on my PC which broke it, somehow.

Sometimes, I feel like the unwitting bull in a china shop, using Linux - You never know which setting is going to break something elsewhere lol

PS: Don't suppose there is a version with debug logging enabled? Maybe it could log what/how it loads and what/how it saves and I could attach the files?

Out of interest... I gather it is written in Python? Are there any Python settings/libraries/etc which can be changed/broken which may cause this behaviour? I am quite confused as to how something so mundane as writing out data could be affected.

The permissions on the file are fine, too.

vssdeo commented 2 years ago

Hi @stinnnnn

No worries, pls take you time, sometimes I reply quick to collect all details. It would anyways take some time for us to debug, so reply at your ease.

  1. Terminator has a -d, --debug Enable debugging information (twice for debug server)
  2. Sure whether environment setting or package mismatch or it could be anything.
  3. You won't require any compilation just see the INSTALL.md to see package dependency and if you can please try to replicate with the latest source https://github.com/gnome-terminator/terminator.git This would at least ensure a common starting point.

am quite confused as to how something so mundane as writing out data could be affected. Yes thats how software is :)

vgjenks commented 1 year ago

I'm using 2.1.1 and Terminator seems to be cosmically borked in the config dept. I lol'd a little when I read this explanation in the docs:

https://gnome-terminator.readthedocs.io/en/latest/layouts.html

image

It still doesn't work. Even if I first save my layout, close, return, open the layout (which works fine), the working directories are all blank again. I can enter them (without hitting Save again) and it appears to retain them, while the preferences window is open. If I hit save, they get wiped out. If I don't hit save, they get wiped out.

I'm a career dev...I understand software is hard...but this wipes out the utility of this app IMO. It's broken! I can't use it if I have to cd into every directory, across 20+ tiles, if I restart the app. I don't have the opportunity or time to learn Python/GTK to slide in here and help, or I would.

mattrose commented 1 year ago

This seems to be a bug in saving the layouts. I see this in the debug output when I try the change you make.

Traceback (most recent call last):
  File "/home/mattrose/Code/terminator/terminatorlib/prefseditor.py", line 1700, in on_layout_item_selection_changed
    self.layouteditor.on_layout_item_selection_changed(selection)
  File "/home/mattrose/Code/terminator/terminatorlib/prefseditor.py", line 1984, in on_layout_item_selection_changed
    self.set_layout_item(item)
  File "/home/mattrose/Code/terminator/terminatorlib/prefseditor.py", line 1989, in set_layout_item
    layout_item = layout[self.layout_item]
                  ~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'terminal2'
Traceback (most recent call last):
  File "/home/mattrose/Code/terminator/terminatorlib/prefseditor.py", line 1700, in on_layout_item_selection_changed
    self.layouteditor.on_layout_item_selection_changed(selection)
  File "/home/mattrose/Code/terminator/terminatorlib/prefseditor.py", line 1984, in on_layout_item_selection_changed
    self.set_layout_item(item)
  File "/home/mattrose/Code/terminator/terminatorlib/prefseditor.py", line 1989, in set_layout_item
    layout_item = layout[self.layout_item]
                  ~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'terminal2'
Traceback (most recent call last):
  File "/home/mattrose/Code/terminator/terminatorlib/prefseditor.py", line 1700, in on_layout_item_selection_changed
    self.layouteditor.on_layout_item_selection_changed(selection)
  File "/home/mattrose/Code/terminator/terminatorlib/prefseditor.py", line 1984, in on_layout_item_selection_changed
    self.set_layout_item(item)
  File "/home/mattrose/Code/terminator/terminatorlib/prefseditor.py", line 1989, in set_layout_item
    layout_item = layout[self.layout_item]
                  ~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'child1'
Traceback (most recent call last):
  File "/home/mattrose/Code/terminator/terminatorlib/prefseditor.py", line 1700, in on_layout_item_selection_changed
    self.layouteditor.on_layout_item_selection_changed(selection)
  File "/home/mattrose/Code/terminator/terminatorlib/prefseditor.py", line 1984, in on_layout_item_selection_changed
    self.set_layout_item(item)
  File "/home/mattrose/Code/terminator/terminatorlib/prefseditor.py", line 1989, in set_layout_item
    layout_item = layout[self.layout_item]
                  ~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'child1'

It appears to be a regression between 2.1.0 2.1.1 I'll take a look at it as soon as I can.

I'm also a career dev, but I'm doing this in my spare time, of which I struggle to dedicate an hour or two a week, thanks to my family and work commitments that actually pay my bills. In addition, most of that time these days is spent fighting with getting terminator running with GTK4.

mattrose commented 1 year ago

This is ... weird. For some reason it doesn't save, unless you select a different item in the treeview, as that is where the text gets written out.

I have no idea how this used to work, so I'm not sure how long it'll take me to fix

mattrose commented 1 year ago

Well, It's not a regression going back to any version since I took over. Honestly I don't think this has worked since we moved to GTK3. This is going to take some work

vgjenks commented 1 year ago

I'm also a career dev, but I'm doing this in my spare time, of which I struggle to dedicate an hour or two a week, thanks to my family and work commitments that actually pay my bills. In addition, most of that time these days is spent fighting with getting terminator running with GTK4.

Apologies, I sincerely wasn't trying to give you a hard time. Just shocked that other desktop platforms have more sophisticated terminal options, and was particularly shocked at how this bug was almost described as a feature, in the docs. :laughing:

I wish I had time to donate - if it was written in a language I had working experience in, I'd be able to do something at least. Happy to test and report once fixes are in! Thanks!

tonydattolo commented 1 year ago

going to jump in here. if anyone wants to collab on fixing this let me know.