This forum has been archived. All content is frozen. Please use KDE Discuss instead.

"Save as" dialog on start-up

Tags: None
(comma "," separated)
User avatar
JesusM
Registered Member
Posts
212
Karma
0
OS

"Save as" dialog on start-up

Sat Aug 12, 2017 9:01 am
Hello,

I am running Skrooge in a Linux server (Slackware 14.2) from a Windows 10 laptop running Xming X Server.

The point is that when I manually open a terminal session to the server and from it run Skrooge (export DISPLAY=a.b.c.d:0 & skrooge) everything work fine, but if I try to run it using PLINK cli I always get first a "save as" dialog, trying to save the unused new file, and after closing it the my correct file is opened and Skrroge works fine.

The command I use is:
Code: Select all
plink -ssh -2 -X -pw <pass> <user>@<host> "/usr/bin/skrooge <skrooge-file> &>/dev/null"

I have also tried assigning a TTY:
Code: Select all
plink -t -ssh -2 -X -pw <pass> <user>@<host> "/usr/bin/skrooge <skrooge-file> &>/dev/null"


Any Idea on how to avoid that annoting "save as" dialog? Am I doing anything wrong?

Thanks!
JM
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS

Re: "Save as" dialog on start-up

Sat Aug 12, 2017 9:14 am
Hi JesusM,

Could you generate a trace file of Skrooge?
To do that you just have to do "export SKGTRACE=10" before runing Skrooge.
This is just to understand why the "Save As" panel is called.


Skrooge, a personal finances manager powered by KDE
Image - PayPal
User avatar
JesusM
Registered Member
Posts
212
Karma
0
OS

Re: "Save as" dialog on start-up

Sat Aug 12, 2017 9:29 am
smankowski wrote:Hi JesusM,

Could you generate a trace file of Skrooge?
To do that you just have to do "export SKGTRACE=10" before runing Skrooge.
This is just to understand why the "Save As" panel is called.


I run:
Code: Select all
plink -ssh -2 -X -pw **** jesusm@192.168.1.43 "(export SKGTRACE=10 & /usr/bin/skrooge)"


The console output was:
Code: Select all
##WARNING: failed to get the current screen resources
##WARNING: QXcbConnection: XCB error: 170 (Unknown), sequence: 170, resource id: 90, major code: 146 (Unknown), minor code: 20
##WARNING: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-jesusm'
(First two lines are also shwon when running from a shell session)

Where is supposed to be created the trace file?

Thanks!
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS

Re: "Save as" dialog on start-up

Sat Aug 12, 2017 9:53 am
Traces must be in the std output. Try this:
export SKGTRACE=10 && /usr/bin/skrooge > /tmp/skrooge_traces.txt
instead of
export SKGTRACE=10 & /usr/bin/skrooge

You should have a file named /tmp/skrooge_traces.txt containing the traces.


Skrooge, a personal finances manager powered by KDE
Image - PayPal
User avatar
JesusM
Registered Member
Posts
212
Karma
0
OS

Re: "Save as" dialog on start-up

Sat Aug 12, 2017 1:10 pm
I have sent you a link to the file by PM.

Thanks!
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS
Hi,

In you traces, I can see that:
1- An initial empty document is created (this is normal)
2- The load of /home/Cuentas/Cuentas.skg is triggered (this is normal)
2.a- The closure of the document created in (1) is done (this is normal)
2.b- The document created in (1) state is "Modified" (this is not normal), so the save panel is displayed

I don't understand why the initial document is considered as "modified". This should not be the case.

During the analysis, I decided to optimise performances by avoiding the creation of the empty document when a file name is passed as argument.
I committed this optimisation but this could help you (not document initialised, not document modified).

Are you able to build the trunk to test it?

Regards.


Skrooge, a personal finances manager powered by KDE
Image - PayPal
User avatar
JesusM
Registered Member
Posts
212
Karma
0
OS

Re: "Save as" dialog on start-up

Sun Aug 13, 2017 6:33 pm
Ok, I have updated Skrooge with your modification, and my views:

1. When I run Skrooge from a terminal, it works fine both passing a file as argument and without arguments (but this already worked fine before)

2. When running Skrooge using plink, it now work fine in both cases too.

Thanks!!
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS

Re: "Save as" dialog on start-up

Sun Aug 13, 2017 7:07 pm
To be honest, I don't understand why it did work before.
Anyway, this topic is closed.


Skrooge, a personal finances manager powered by KDE
Image - PayPal


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]