Skip to content

[Feature request] Support no gui server? #80

@shenmishajing

Description

@shenmishajing

Now, we use PyQt to login, which requires the GUI interface. On a no GUI server, any command, not only the login command, will result in an error as follows since we try to import PySide6 at the top of olsync.py.

ImportError: /usr/lib/x86_64-linux-gnu/libwayland-server.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0

After reading the source code of ols, I find that the following information is enough for ols:

{
    "cookie": {
        "overleaf_session2": "xxx",
        "GCLB": "xxx"
    },
    "csrf": "xxx"
}

All those cookies and csrf can be found manually. So, we can ask the user to provide a json or a .oauth to login instead of requiring the pyqt package to open a browser.

A simple solution is as follows:

  1. move the import olbrowserlogin statement from the top of olsync.py to the function login_handler.
  2. use a json file as the .oauth instead of pickle file.

How do you think about this? Will we support this? I can create a PR for this if we want to add this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions