gnucash and X window forwarding problem

Robert Heller heller at deepsoft.com
Sat May 24 10:20:11 EDT 2014


At Sat, 24 May 2014 06:58:02 -0700 John Ralls <jralls at ceridwen.us> wrote:

> 
> 
> On 24 May 2014, at 06:23, incoming-gnucash at sabot.com wrote:
> 
> > 
> > I sometimes run gnucash (v2.6.3 from getdeb, running on Ubuntu
> > precise) remotely, by doing "ssh -X" to the machine where I run
> > gnucash.  Gnucash seems to open up some tunnels that it never closes.
> > As a result, after I exit gnucash, when I try to exit the ssh it hangs
> > and I have to ^C kill the ssh to wrap things up.
> > 
> > By typing "~#" at the ssh I can get some diagnostic info demonstrating
> > the issue.  In the fresh ssh, before launching gnucash, I see this:
> > 
> >    $ ~#
> >    The following connections are open:
> >      #4 client-session (t4 r0 i0/0 o0/0 fd 8/9 cc -1)
> > 
> > So just 1 connection, the session itself.  Then I start gnucash, and
> > it opens its window (and possibly the Since Last Run SX window), and
> > ssh now tells me about 3 other connections opened by gnucash (or
> > indirectly by some library it is using):
> > 
> >    ~#
> >    The following connections are open:
> >      #4 client-session (t4 r0 i0/0 o0/0 fd 8/9 cc -1)
> >      #5 x11 (t4 r4 i0/0 o0/0 fd 11/11 cc -1)
> >      #6 x11 (t4 r5 i0/0 o0/0 fd 12/12 cc -1)
> >      #7 x11 (t4 r6 i0/0 o0/0 fd 13/13 cc -1)
> > 
> > When I exit gnucash, it closes only 1 of those three new connections,
> > so I have this:
> > 
> >    $ ~#
> >    The following connections are open:
> >      #4 client-session (t4 r0 i0/0 o0/0 fd 8/9 cc -1)
> >      #6 x11 (t4 r5 i0/0 o0/0 fd 12/12 cc -1)
> >      #7 x11 (t4 r6 i0/0 o0/0 fd 13/13 cc -1)
> > 
> > Is this a known problem, or is it somehow specific to my setup?
> > Pending getting to the bottom of it, is it "safe" to run gnucash
> > remotely, or do I risk causing some file corruption when I ^C because
> > some remnant of gnucash is still alive and not done with its work?
> > 
> 
> First off, GnuCash doesn't know anything about the ssh tunnels. They're created entirely by ssh in response to connection requests from X11 via the special $DISPLAY value set by ssh.
> 
> The three X11 connections are likely the Splash Screen, the Since Last Run window, and the main window; GnuCash explicitly destroys only the main window, leaving the rest to Gtk's termination code to clean up. That's apparently not sufficient to signal ssh that it's done with those extra tunnels.

More likely it is gconfd, since the Splash Screen, the Since Last Run window 
would all be handled with the same X11 connection as the main display.  Unless 
the program is doing something really odd, any given X11 client only makes one 
connection to the X11 server, no matter how many windows (toplevel or 
otherwise) are created.  That is, there is only one (lowlevel) XOpenDisplay() 
call (somewhere in the depths of the Gtk library, probably somewere in 
gtk_init). 

> 
> In any case X11 only handles display and user interaction -- mouse and keyboard events -- and has nothing to do with the data. There's no risk of data corruption as long as GnuCash has completed the file save before shutting down, regardless of whether it's running locally or remotely.
> 
> Regards,
> John Ralls
> 
> 
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
> 
>                                                                               

-- 
Robert Heller             -- 978-544-6933 / heller at deepsoft.com
Deepwoods Software        -- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments


                                                                                         


More information about the gnucash-user mailing list