vorta icon indicating copy to clipboard operation
vorta copied to clipboard

KDE Plasma: main window opened on autolaunch although disabled

Open sysdbugfactory opened this issue 2 years ago • 9 comments

Steps going forward

  • [ ] Figure out how Vorta can add itself to the session restore ignore list in KDE Plasma.
  • [ ] Add code for Vorta to do ensure being on that list.

Description

Vorta opens the main window on autolaunch despite the settings to do so being disabled. This behavior happens on a debian machine, it was there on debian 11 bullseye and is still there on debian 12 bookworm. vorta is fully configured and has been doing automatic backups for months.

Each time a user opens a session on the computer she is welcomed by the vorta main window, which is a minor annoyance but is confusing

I tried all combinations of the two settings autolaunch/show main window on start and none achieve the desired behavior of vorta launching automatically minimized to tray.

Environment

  • OS: Debian Bookworm x64 12.1
  • Vorta version: Vorta 0.8.10
  • Installed from: debian stable repository
  • Borg version: borg 1.2.4

Logs

*paste logs here*

How can I achieve the desired behaviour ? Where should I look to investigate the issue further ?

sysdbugfactory avatar Jul 27 '23 16:07 sysdbugfactory

Do you use the KDE Plasme Desktop Environment? There is a known issue with KDE: Since Vorta is running (in the background) when you exit the Plasma session Plasma will restart Vorta when logging in. For Vorta this is no different to a user starting the app. If you have show main window on startup disabled, this will start Vorta minimized to the system tray icon. If you now open the Vorta application through its desktop entry the main window opens. This is intendend. However the same happens when autostart is enabled since that also starts another Vorta process. It behaves exactly the same. I personally have disabled autostart and open main window on startup which achieves the desired behaviour of starting Vorta on startup but minimized to the tray.

real-yfprojects avatar Aug 13 '23 14:08 real-yfprojects

Yes this computer is running kde plasma desktop.

So if I understand correctly the issue is caused by vorta being set to autostart and kde session restore launching vorta too which causes the expected behavior of showing the vorta window.

Only one of those has to be enable for vorta to start minimized.

In my experience after a crash sometimes kde fails to properly restore the session and fails to relaunch what was open before the crash, as I need vorta to autostart even when such a situation occurs, I cannot choose the same option you chose for your computer and usage. I'll have a look at the KDE session restore settings, IIRC there is an ignore list for applications that KDE should not restore.

sysdbugfactory avatar Aug 31 '23 23:08 sysdbugfactory

I'll have a look at the KDE session restore settings, IIRC there is an ignore list for applications that KDE should not restore.

When you find something please let me know here.

real-yfprojects avatar Sep 01 '23 10:09 real-yfprojects

Done. It works, now the window does not pop up when opening a desktop session.

Now I'll have to wait until a crash to see if how things go and confirm that vorta starts as expected, which might take a while. though I am fairly confident vorta's own autostart will work when KDE session restore does not.

Here is the step by step guide to prevent KDE session restore from launching vorta when it is set to reopen the software in use when closing the user session:

  1. Open system settings. either from the menu button, from the KDE launcher you call with Alt + F2, or from CLI with the command systemsettings.
  2. Open 'Startup and Shutdown'. it is located in the Workspace section.
  3. Go to the 'Desktop Session' tab.
  4. Check that the session restore feature is set to On last logout
  5. Add vorta to the ignore applications text box. If there are several application, use a comma or a colon as a separator between each application name
  6. Validate this change by clicking the 'apply' button.

Now close the session or shutdown your computer, and open a new session or restart the computer to make sure that vorta does launch as a tray icon without opening the window. If vorta does not auto launch, then open vorta's settings and enable auto start setting.

Hope this helps.

sysdbugfactory avatar Sep 02 '23 08:09 sysdbugfactory

here is a screenshot of what the KDE setting should look like:

vorta disable kde session restore

sysdbugfactory avatar Sep 02 '23 08:09 sysdbugfactory

Next step would be for vorta to detect when it is used in KDE with session restore on last logout enabled and add itself to the ignore list when vorta is set to auto start.

As a workaround alternative, vorta should mentions this in the info box for the auto start setting. a single line explanation directing user to the documentation for a detailed explanation would be sufficient IMHO.

sysdbugfactory avatar Sep 02 '23 08:09 sysdbugfactory

this feature works fine on mine though. I'm also using KDE Plasma (on Arch Linux tho)

SAMAD101 avatar Sep 06 '23 04:09 SAMAD101

That's odd. I also have access to a computer running Manjaro which is Arch based and the setting to launch vorta during the session opening happened to be disabled so the vorta window does not show on startup.

What could cause this discrepancy ? I doubt there are major difference between Arch and Manjaro explaining this difference.

For some reason vorta's UI is in French despite the rest of the system being in English.

sysdbugfactory avatar Sep 06 '23 10:09 sysdbugfactory

This might allow Vorta to prevent automatic restore: https://doc.qt.io/qt-6/qsessionmanager.html#RestartHint-enum

real-yfprojects avatar Sep 06 '23 10:09 real-yfprojects