Just to keep you informed. Firefox 70 session manager remembers the
window position for multiple desktops correctly (note: no multi monitor
setup), but it mixes the content (tabs from one window appear in
another), hence I'm back to be afraid of reboots. Here's my current
procedure.

Prepare for reboot: save current session
$ ff-backup-session-recovery.sh

Reboot
# session is fscked up again, kill firefox

Restore session from backup
$ ff-backup-session-recovery.sh list
[...]
-rw------- 1 hp lisa 1156380 29. Okt 12:08 recovery.jsonlz4.20191029-120926
[...]
$ ff-backup-session-recovery.sh restore recovery.jsonlz4.20191029-120926

Start Firefox 70 from first desktop
Distribute all FF windows to the desktop, they belong to.
Work.

The script is executed via crontab every night as well.

The FF gods seem to try everything to get rid of me as a user!

ff-backup-session-recovery.sh:
```
#!/bin/bash
  
#ssb=$(ls -d ~/.mozilla/firefox/*.default-esr68/sessionstore-backups)
ssb=$(find ~/.mozilla/firefox -regex '.*.default-[0-9]+')/sessionstore-backups

err() {
    echo $* >&2
    exit 2
}

usage() {
    cat >&2 <<EOF
Store/list/restore firefox session backups

Usage: $0 [-hv] [-s ssb] [store]|restore ts|list
       -h       this message
       -v       verbose operation
       -s ssb   sessionstore-backups folder

Without arguments, default action is store.

Specify restore ts to restore the session backup, e.g.:

        $0 restore 20190823-044501

Given, recovery.jsonlz4.20190823-044501 exists, and is readable.

Usually, the sessionstore-backups folder is detected automatically.
EOF
    echo 1
}

while getopts hvs: par ; do
    case $par in
    h) usage;;
    v) set -o xtrace;;
    s) ssb="$OPTARG";;
    esac
done
shift $(($OPTIND - 1))

# check ssb validity
[ $(echo "$ssb" | wc -w) -eq 1 -a -d "$ssb" ] || err "$ssb: invalid 
sessionstore-backups folder"

action=store
[ -n "$1" ] && { action=$1; shift; }
case $action in
    store)
        ssr=$ssb/recovery.jsonlz4
        ts=$(date +%Y%m%d-%H%M%S)
        [ -f "$ssr" ] && cp -a "$ssr" "$ssr.$ts" || err "$ssr not found"
        ;;
    list)
        pushd $ssb &>/dev/null
        ls -ltr recovery.jsonlz4*
        popd &>/dev/null
        ;;
    restore)
        ssr=$ssb/recovery.jsonlz4
        # remove recovery.jsonlz4. from ts argument
        ts=${1##recovery.jsonlz4.}
        [ -n "$ts" ] || err "no timestamp specified, check with list"
        [ -f "$ssr~" ] && mv "$ssr~" "$ssr~~"
        [ -f "$ssr" ] && mv "$ssr" "$ssr~"
        [ -f "$ssr.$ts" ] && cp -a "$ssr.$ts" "$ssr" || err "$ssr.$ts not found"
        ;;
    *)
        err "unknown command: $action"
        ;;
esac

exit 0
```

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to firefox in Ubuntu.
https://bugs.launchpad.net/bugs/684982

Title:
  Firefox windows don't restore on correct workspaces

Status in Mozilla Firefox:
  Confirmed
Status in firefox package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: firefox

  Create two workspaces
  Open one firefox window on the first workspace, second on the second one.
  Quit (or crash) firefox, specifying "Yes, remember my windows"

  Expected behavior: second window shows up on second workspace
  Actual behavior: Both windows appear on the current workspace

To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/684982/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to