Thunderbird starts with two window instances

2018-03-24 00:00:00 IN1 , 2023-04-10 14:16:29 IN1


German Version: /post/2018/03/24/thunderbird-startet-mit-zwei-fenster-instanzen/

Problem description: Thunderbird always starts with two window instances, no matter how Thunderbird is started: via QuickStarter, from the K-Menu, or via console. If one of the two windows is closed, both always close.

Solution: The Thunderbird file ~/.thunderbird/*.default/session.json contains two windows objects. Delete one of them.

Thunderbird's session.json

The content of the file can be displayed formatted on the console:

cat ~/.thunderbird/`awk -F "=" '/Path/ {print $2}' ~/.thunderbird/profiles.ini`"/session.json" | python -m json.tool

Example Output

{
    "rev": 0,
    "windows": [
        {
            "tabs": {
                "rev": 0,
                "selectedIndex": 0,
                "tabs": [
                    {
                        "ext": {
                            "quickFilter": {
                                "filterValues": {
                                    "text": {
                                        "states": {
                                            "body": false,
                                            "recipients": false,
                                            "sender": true,
                                            "subject": false
                                        },
                                        "text": null
                                    }
                                },
                                "visible": false
                            }
                        },
                        "mode": "folder",
                        "state": {
                            "firstTab": true,
                            "folderPaneVisible": true,
                            "folderURI": "xxx://xxx@example.com/INBOX",
                            "messagePaneVisible": true
                        }
                    }
                ]
            },
            "type": "3pane"
        },
        {
            "tabs": {
                "rev": 0,
                "selectedIndex": 0,
                "tabs": [
                    {
                        "ext": {
                            "quickFilter": {
                                "filterValues": {
                                    "text": {
                                        "states": {
                                            "recipients": true,
                                            "sender": true,
                                            "subject": true
                                        },
                                        "text": null
                                    }
                                },
                                "visible": true
                            }
                        },
                        "mode": "folder",
                        "state": {
                            "firstTab": true,
                            "folderPaneVisible": true,
                            "folderURI": "zzz://zzz@example.com/INBOX",
                            "messagePaneVisible": true
                        }
                    }
                ]
            },
            "type": "3pane"
        }
    ]
}

As you can see in the above example output, the windows array has more than one object. And exactly there is the problem: One Thunderbird window instance is created for each object.

Edit

The following small bash snippet first creates a copy (session.json.YYYYY-MM-DD) of the current file (session.json), formats (beautify | prettify) the JSON code so that it becomes more readable and finally opens the file in the editor Kate:

  1. finish Thunderbird
  2. open the file ~/.thunderbird/*.default/session.json for editing with Kate via console

    cd ~/.thunderbird/`awk -F "=" '/Path/ {print $2}' ~/.thunderbird/profiles.ini`;NOW=`date '+%Y-%m-%d_%H-%M-%S'`; cp session.json "session.json.$NOW"; cat session.json | python -m json.tool > /tmp/session.json; kate /tmp/session.json; cp /tmp/session.json session.json;
  3. remove the unwanted object in the JSON code
    (Have the edited code checked with a JSON parser such as http://json.parser.online.fr/; copy'n'paste)._
  4. save file in Kate [CTRL+S] End Kate [CTRL+Q]

Now Thunderbird can be started again. It starts with only one window instance


Links


Related

This website uses Cookies to provide you with the best possible service. Please see our Privacy Policy for more information. Click the check box below to accept cookies. Then confirm with a click on "Save".