Nitrokey app loads multitude of times with kde and opensuse rpms

The current nitrokey app has an odd behaviour when you start it with “application to launch at startup” in Plasma5. It will start several instances when you have to log out of that user and to log in again for whatever reason. You will have at first two then more and more apps running in the tray.
I tried to avoid that with dbus startup notification “one instance only” but that does not make any difference. The app should not start if a instance is already running in the tray. I do not know if this is only cosmetic or if multiple instance could also represent a security risk.

Hi @solucion,

thanks for mentioning that! I will try to reproduce. Can you tell me which version of plasma and NK app you are using. You may even provide information about your OS?

I will first try on OpenSuse with plasma as I have it at hand. I came back as soon as possible, but probably it will be not before next week, I am sorry.

Kind regards

PS: I do not see a security issue for now, but it sounds at least like very annoying behaviour.

EDIT: Nevermind me asking for your OS, I ignored the subject line, sorry!

I have tracked that down. it is a kind of regression (if it was ever addressed) and I had this with another software time ago in Plasma 5.
Leap 42.3 uses Plasma 5 with the following setup: restore the last session. This causes:
a) a multiplication every time you log out of one instance.
b) one instance is opened on every log in if you choose to start the app in automatic.
c) if you tell plasma to open a new, virgin session, it does not happen. However that takes away a lot of comfort when you use plasma with the intent to find the session as you have left it.
I noted one time up to 5 app instances open before I found out how to stop it.
With other applications and programs in the tray started in automatic or like yakuake, I do not find this behaviour. Hope that helps.

KDE 5.8.7
Frameworks 5.32.0
QT 5.6.2
fully patched.

Hi @solucion,

I am really sorry that it took so long for me!

I finally tested this behaviour myself. But I could not reproduce it, I am afraid :frowning:

Could you please tell me, which Nitrokey App version you use? I tried with 1.1 and all the KDE/QT versions you have and used the session restore function…

Do you have any idea what other installed program or behaviour could be responsible? Something seems to be different on your side … :thinking:

Kind regards

I tried with 1.1
well that could be an issue. Generally I stick to the opensuse version of nitrokey app and they have currently 0.6.3. Which is an astonishing difference. Maybe I should ask to update regularly the app when supplying it. But it is 0.6.3 - 2.2 which means it is a patched version. So I am not really able to tell you to what it corresponds :scream:. I am using kgpg and gpa for the key. Kleopatra is installed though and sees the card. It lingers there for when s/mime is triggered.
Maybe it is because of kmail? This is, with kleo the only app that in my view could be involved. :thinking:

Okay, I tested the 0.6.3 version from the repo and started KMail + Kleopatra. I still could not reproduce :thinking:

Can you please install the current version and see if it makes any difference? It works fine on openSUSE and will get overwritten as soon a newer version is in the repos, so no disadvantages by manually installing it…

Ok this is interesting. I did install the app. I logged out, I switched on “restore last session”. The app is now present two times. So I can reproduce this on a new install, with 42.3 Leap.
What else is different? I am using a tpm (lenovo X201) and so called “secure settings” of the system which is in opensuse a choice between more restrictive setting vs. somewhat more lax. But that should not lead to a duplication.
Did you try this virtualised with Leap 42.3 and secure settings?

Aaah. I found something.
I went in the tray. There I see what happens. In “voices” there are two(!) nitrokey apps present.
So try this setting: put nitrokey app in mode “always visible in tray” instead of automatic. Then do the restore session at start.
This setting may cause the issue. :bulb:

And still an issue that I found: try this on you system, with my it works.
When you open nitrokey app (settings as told above) and clicking on the menu of kicker (the launcher) calling it one more time, another session of the app opens. That is now I have 3 apps running. This can be done n-times without apparent limitation. In “voices” the nitrokey app appears first without name, then after a few seconds nitrokey app appears with the original setting “always visible in tray”.


well I was indeed able to double the icon in system tray by changing the behaviour to “always visible”. A look at ‘top’ told me that the app is still only started once though. So it seems to be only doubling the notification? After closing one of the shown apps i) the other one was still there and ii) after logging out and in again the second doesn’t came back.

I guess you already did try to plain and simple close the unneeded duplicates? :joy:

You said this did happen with other apps in the past? Do you remember which one? Maybe we can reconstruct, what they did?

Kind regards

Well, I did. I did verify that, when having three or more open, after shutdown and startup there are only two left. I will now try explicitly to do what you did (close one of two) and then see whether it works but :tongue: (you notice the Murphy like thing here) with the former app it did not work. So I would be surprised.
The app that presented the same behaviour was, - :brain: and I needed a lot of reflection here - was jitsi, java based as you may know. If I do well understand also the nitrokey app is java based? Would be a hint, that it is somehow related how plasma handles calls for javabased apps?


the Nitrokey App is not Java based. It is actually using Qt/C++ as basis, like Plasma/KDE :wink: I will do further research. But I think it will be difficult to find the cause of this issue. I try my best!

Kind regards