sudo 4.6.4 Aborted
Dirk Hohndel
dirk at hohndel.org
Sun May 14 21:52:56 PDT 2017
On Sun, May 14, 2017 at 09:43:49PM -0700, Dirk Hohndel wrote:
> On Sun, May 14, 2017 at 09:32:45PM -0700, Thiago Macieira wrote:
> > On domingo, 14 de maio de 2017 21:20:01 PDT Martin Měřinský wrote:
> > > sudo subsurface divelog.xml
> > > [sudo] password for mermar:
> > > QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-
> > > root'
> > > No protocol specified
> > > QXcbConnection: Could not connect to display :0
> > > Aborted (core dumped)
> >
> > Your X server refused the connection.
> >
> > Best solution: don't use sudo. In fact, don't run Subsurface as root.
> >
> > Why were you trying this?
>
> Good question.
>
> But I'd like to point out that Subsurface shouldn't crash when it can't
> open the display. I'll fix that part :-)
Ah, apparently this is a Qt bug that was declared not a bug at some point
(you can find quite a few threads about this), and the way to work around
it is to implement your own Logger class and exit() instead of abort()
when you get a "Could not connect to display error".
Not one of the more useful aspects of Qt, I'd like to add...
/D
More information about the subsurface
mailing list