"authentication was required" occurred when used gnome-software in ubuntu-mate-desktop based on ubuntu server 22.04 on 4B headless

When i try to use gnome-software to install something on ubuntu-mate-desktop , "authentication was required" occured.I used vncserver to to start mate-session, because my raspi 4b is headless(no displayer).

# environment : 
# host : raspi 4B
# OS : ubuntu server 22.04 for raspi
sudo apt update && sudo apt upgrade -y && sudo apt install ubuntu-mate-desktop tigervnc-standalone-server -y
sudo apt install gnome-software -y
vncserver :1

With these code, i can use vnc viewer to log in my desktop without any problem, but the default polkit not work well.

What's more: I like MATE, it is small , fast and low resource usage.So i want to use it on my raspi 4B.If i use the desktop OS directly, the uart not work with default , and it does not preinstall any sshd.So i choose to install MATE on server version.

1 Like

Welcome @0x00000000 to the community!

Thanks, even if this is an auto reply :laughing:

1 Like

Nope ... not an auto reply! :wave:

1 Like

Interesting.
Allow me to first start of with some stern questions.

First: Why on earth are you using a full blown Desktop on a headless server ?
Second: Why are you using a gaping securityhole like VNC ?
(both of these points are terribly ' bad practice™ ' )

To explain it a little bit: You are making it much too difficult and, with that wobbly GUI-stack also very errorprone and sluggish and very heavy on your Pi.
It kind of works, but you will run into a lot of small incompatibility issues very fast.

There are roughly two methods to get what you want in a more decent way:

First method, the oldschool way, light on resources:
If you install sshd (sudo apt install openssh-server) , you can have your desktop applications forwarded to your other linux computer over ssh (without any graphical frontend running on your Pi eating resources for breakfast)

  • Open a terminal and login remotely to your Pi:
    ssh -X -C user@raspberrypi
  • Start any graphical application from this terminal and it gets automatically and natively forwarded to your linux desktop as if it is local.

Second Method, modern, multi OS capable:
If you really want a full blown remote desktop (again, very unwise on a server), use this:
https://wiki.x2go.org/doku.php/doc:newtox2go

It gives you a hell of a lot better startingpoint.

2 Likes

Hi 0x00000000

Welcome and sorry for my somewhat brute way of entering the conversation in my previous post.
After reareding my post I suddenly feared that it would leave the wrong impression.
My sincere apologies if I did. :pensive:
I just got a bit carried away about one of my favourite topics.

Anyway, welcome, good to have you here.

1 Like

nvm.
I saw your nice reply.I'm trying them now.I think they are good methods , but i need time to try them.Thank you for reminding me of something .Now i am trying to configure cloud-init to install openssh-server automatically on ubuntu desktop.
I don't know X2go before your tell me, thanks a lot :+1:

about the first/second question:I use remote desktop on LAN only,and use ssh port forward.It should be safe i think.

2 Likes

Yes, as long as you have a decent firewall between your router/modem and the outside world you are good :slight_smile:

2 Likes

Errr, i have checked the syslog then i got a message "polkit error: Authorization required interaction". :thinking:
I tried to execute dbus-launch gnome-software,then it could invoke polkit-agent correctly.But if i use the desktop icon directly or run it directly , error occured.Then ,i changed the DBusActivatable from true to false , and set Exec to dbus-launch gnome-software on Desktop Entry, it work correctly again :thinking:
Something wrong was happened in the dbus i think.But i dont know how to fix them exactly. :expressionless:

2 Likes

I don't know either. There is so little I know about dbus and polkit.
It could be a bug in 'gnome-software'.
Better use 'synaptic' instead of 'gnome-software'.
In my experience , 'synaptic' is more reliable.

If all else fails, start a new topic with this question.
Somebody within the community must know something about it.

1 Like