I want to be able to start an admin-level Xsession over SSH if I need to VNC in. Running startx using sudo works as I want it to, but is an obvious no-no as it switches the ownership of the .Xauthority file in the user's home directory to root.
Running without sudo is denied.
There apparently used to be a way to change some settings in Xwrapper.config either directly or using dpkg, but that seems to be redundant - there are no equivalents in Xsession.options and trying to use dpkg to reconfigure x11-common results in this warning:
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
and nothing else.
Someone else asked the same question here a few months ago, and the only supplied answer suggested using dpkg, which won't work.
Everything else I've found is years old and very out of date. Surely it can't be that difficult?
Edit: Tried installing xserver-xorg-legacy and changing the settings in there with dpkg to allow anyone to start the X server. The settings do something - if I change it to 'console only' I'll get a warning trying to run xinit, but if I change it back to 'anybody' I get the usual Cannot open /dev/tty0 (Permission denied) error.
startxoversshshould not work to my knowledge. You should better go on with VNC, if you really need whole X session (why?). – Jakuje Dec 03 '16 at 18:26I want to be able to start an X session for a particular user from the terminal and then VNC in to that. Again, as I said, it's entirely possible already using sudo - this works exactly as I want it to except for the fact it changes my user account's .Xsession ownership to root so I need to change it back every time I log out of X. I could write a bash script to do it, but that seems like using a hammer to crack a nut - the capability apparently used to be there.
– Bathmat Dec 03 '16 at 19:02