gnucash and X window forwarding problem

incoming-gnucash at sabot.com incoming-gnucash at sabot.com
Sat May 24 10:29:14 EDT 2014


   To: incoming-gnucash at sabot.com
   From: John Ralls <jralls at ceridwen.us>
   Date: Sat, 24 May 2014 06:58:02 -0700
   Subject: Re: gnucash and X window forwarding problem
   
   
   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.
   
   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
   
Thanks, that is very helpful.  FWIW, I turned off the prefs/general
option to show the splash screen, and also I changed my SX reminder so
I would not have any today so the Since Last Run window won't open for
me today.

I then retried my experiment, but I still have the same pattern of
connections even though there is just 1 visible window every created
by gnucash: starting gnucash adds 3 lines to the table shown by ~#.
Saving and exiting gnucash the usual way eliminates just 1 of those,
leaving me with the original plus the two extras.

So even without the splash and Since Last Run I still need ^C to exit
ssh, but now I know that is safe so it isn't a big deal (and possibly
this will go away when I update to Xubuntu Trusty Tahr).

--gary



   


More information about the gnucash-user mailing list