2

I found out I cannot update multiple packages any more. That was disappointing considering I chose the LTS version to avoid this issue.

The system in question is one that I only seldom use, and when I do I use remote desktop or SSH terminal. The problem is the recommended way to upgrade to Linux Mint 21 is to use a GUI tool called mintupgrade:

sudo apt install mintupgrade
sudo mintupgrade

This will throw an error when connected via remote desktop, presumably because it needs a real hardware screen:

No protocol specified
Unable to init server: Could not connect: Connection refused
No protocol specified
Unable to init server: Could not connect: Connection refused
No protocol specified
Unable to init server: Could not connect: Connection refused

(mintupgrade.py:4622): Gtk-WARNING **: 00:12:10.928: cannot open display: :10.0

Running it in an SSH session produces a similar error:

(mintupgrade.py:5106): Gtk-WARNING **: 00:20:59.670: cannot open display:

So, is there a way to do this via the command line, or do I have to move some monitor or a TV to the computer just to do the upgrade?

5
  • Can you run any other GUI programs via SSH? Commented Feb 26, 2023 at 0:15
  • Does running sudo mintupgrade check yield the same errors? Commented Feb 26, 2023 at 7:15
  • @MarcusMüller Yes, the same error. Commented Feb 26, 2023 at 10:52
  • @ajgringo619 Not via SSH, but I have been using the system via remote desktop and everything has worked just fine so far. Commented Feb 26, 2023 at 10:52
  • Does that include GUI programs that require root? Try running something like gparted - if that fails, then it's not a problem with mintupgrade. You can also try running xhost +, then mintupgrade, just to see if allowing all X access works. Commented Feb 26, 2023 at 16:34

1 Answer 1

1

I had exactly the same problem when I performed several consecutive upgrades from Mint 19.1 to 20.3 and then I got stuck on this step. And after some searching I found the solution that worked for me here.

Basically, the superuser doesn't have a configuration to access local X server, so the most simple solution is to copy this configuration from existing local user via sudo cp ~$USER/.Xauthority /root.

Please note that if you are running this command from a user which doesn't have a configured GUI entry (in my case, it was running from admin, which have elevated privileges, but without interactive login, while I was logged in interactively under another, restricted user) you need to substitute $USER variable with the name of the user which have this configuration.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.