gnucash and X window forwarding problem

John Ralls jralls at ceridwen.us
Sat May 24 09:58:02 EDT 2014


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




More information about the gnucash-user mailing list