Not getting SU authentication dialog via VNC

Asked by Lee Westlake on 2019-10-10

I currently have Xubuntu 18.04 installed on a small server box and appear to be experiencing a strange problem whilst attempting to access it via VNC: whenever I run a package which requires "pkexec" escalation such as the synaptic package manager or "users-admin", the authentication dialog is sent to display ":0" and not the VNC display ":1".

The issue appears to occur whether I use vnc4server or tightvnc.

My xstartup is as follows:

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xrdb $HOME/.Xresources
/usr/bin/startxfce4 &

Any advice or suggestions regarding this issue would be greatly appreciated.

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Last query:
Last reply:

Why are you using a graphical package manager. Just use SSH (install openssh-server on the other side then connect and run:

sudo apt-get update
sudo apt-get upgrade

Are you seriously using VNC so you can run updates???

Lee Westlake (lwestlake) said : #2

Thanks for the response, it's very much appreciated.

I use public key SSH logins for the usual admin tasks (i.e. adding users, update, etc), but was wondering why VNC has started to behave this way - all pkexec requests were correctly routed in previous versions of unbuntu.

If it's a security concern then no dialog should be issued, yet it is still being issued to display :0 - this looks more like a polkit/vnc config issue than a security feature to me (I could of course be wrong).

Irrespective of whether it's a good idea or not, I was hoping someone would know why this is happening and perhaps suggest a solution for users who wish to pkexec apps via VNC.

Again, thanks for the input - all comments and/or information will be greatly received.

What are you using the VNC connection to achieve? What do you do on the remote system when you connect?

Lee Westlake (lwestlake) said : #4

I'm currently setting up a media box for a colleague of mine and as usual have chosen Xubuntu as my go to distro for this kind of thing. As the box will be sitting behind a TV and thus not connected to a monitor/keyboard/mouse, it is necessary to provide some kind of remote GUI access in order to allow file copying and simple admin tasks. As the user is familiar with the xfce interface and utilities, it would be nice if the remote connection behaved exactly as a standard first-seat (display :0) session. Of course, X11VNC is always an option, but this should be doable via a standard virtual VNC server such as vnc4server or tightvnc. Also, as Xubuntu is a pet favourite of mine, as is vnc4server/tightvnc, I'm somewhat uncomfortable that I'm unable to understand/solve the underlying issue.

If you want to move files around then you can connect an Ubuntu client PC or Windows to SFTP and move things about using the file manager on the client as if it was local data. You can even move files using the SSH terminal as well.

I'm not sure about VNC but we. We can certainly work around the issue until someone else chimes on to work around it's short comings.

Lee Westlake (lwestlake) said : #6

Yeah, it's certainly not a show stopper and Xubuntu has too many advantages (for me and the intended user) to move to another xfce distro. It's a little annoying that I have come across something which exceeds my knowledge/capabilities, but I'm sure there's someone out there who can shed a little light on the issue. Thanks for taking the time to respond - shall keep an eye on this post in order to see if we can get to the crux of this issue.

Lee Westlake (lwestlake) said : #7

Would very much appreciate any further information if possible.

If you have nautilus on another system, you can connect to SSHFS using that PC and move files around from there. The username and password are the same as the ones you use when you connect using SSH. No need for VNC then

If you are using VLC then it has a web UI that can be controlled from an Android phone. XBMC also has a remote control feature.

Launchpad Janitor (janitor) said : #10

This question was expired because it remained in the 'Open' state without activity for the last 15 days.