Bug 340411 - krfb does not save user settings
Summary: krfb does not save user settings
Status: RESOLVED FIXED
Alias: None
Product: krfb
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: George Goldberg
URL:
Keywords:
: 288481 341211 342377 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-10-27 21:35 UTC by Stéphane Tréboux
Modified: 2023-10-12 15:18 UTC (History)
19 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.08.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Tréboux 2014-10-27 21:35:23 UTC
Kubuntu 14.10 (utopic) ships with krfb (4:4.14.1-0ubuntu2).
krfb will not save settings like "Enable desktop sharing", "Enable Unattended Access" and "Password".
This especially a problem for unattended access as someone has to attend the machine to allow unattended access after each KDE login.

Reproducible: Always

Steps to Reproduce:
1. Get Kubuntu 14.10 (utopic) image at http://www.kubuntu.org/getkubuntu
2. Create an live USB stick and boot from USB
3. Install krfb from the console (sudo apt-get install krfb)
4. Start krfb and change settings like "Enable desktop sharing", "Enable Unattended Access", "Password"
5. Quit krfb
6. Start krfb again

Actual Results:  
User settings like password, "Enable desktop sharing" and "Enable Unattended Access" are gone.

Expected Results:  
User settings should be saved. Especially the setting for unattended access makes little sense if it cannot be saved.
Comment 1 mityi 2015-02-27 10:16:50 UTC
Confirmed in Kubuntu 14.10 (utopic) with krfb 4.14.2
Comment 2 Christoph Feck 2015-03-23 10:25:50 UTC
*** Bug 341211 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Feck 2015-03-23 10:26:37 UTC
*** Bug 342377 has been marked as a duplicate of this bug. ***
Comment 4 Mircea Kitsune 2015-03-23 15:55:36 UTC
Confirmed. This is problematic for me because I leave Krfb running in the background when I'm away from home, so I can access my PC from my laptop or smartphone. In case the power goes out, my system is configured to automatically log back in and Krfb is set to auto-start. But because of this issue it starts disabled, so I can no longer connect to my machine until I return home to fix it manually.
Comment 5 Romain Henriet 2015-08-21 09:36:15 UTC
I confirm this bug. Very annoying :-(
Comment 6 gromit4x4 2015-10-04 17:34:02 UTC
I can confirm the case also persists in Krfb 4.14.7.  After a system reboot the "Enable Desktop Sharing" box needs to be checked again before remote access is possible.  All other settings appear to remain across reboots.
Comment 7 oldtechaa 2015-10-12 16:02:11 UTC
Also confirmed on OpenSUSE 13.2 with KRFB & KDE 4.14.2.
Comment 8 kde-bugs 2015-10-22 16:10:19 UTC
Also confirmed on Kubuntu 15.04 with KDE 5.2.2
Comment 9 kde-bugs 2015-10-22 16:16:10 UTC
*** This bug has been confirmed by popular vote. ***
Comment 10 Stéphane Tréboux 2015-10-27 23:02:24 UTC
Also confirmed on Kubuntu 15.10 (krfb 4:15.08.2-0ubuntu1 under KDE 15.08.2 with KDE Frameworks 5.15.0).
Could the KDE team consider reverting to krfb version 4.13.3 with the next KDE Applications Release?
The current version allows only very restricted use cases since settings are never saved.
Comment 11 Markus 2016-02-22 00:55:41 UTC
Same problem occured under Debian 8.3 stable and KDE 4.14.2
Comment 12 Michael Earle 2017-08-20 03:35:30 UTC
This is still a bug on:
KDE Neon Latest
Plasma Version: 5.10.4
KDE Frameworks Version: 5.37.0
Kernel Version 4.10.0-32-generic
Comment 13 Alexey Min 2017-08-27 04:32:53 UTC
(In reply to Michael Earle from comment #12)
> This is still a bug on:
> KDE Neon Latest
> Plasma Version: 5.10.4
> KDE Frameworks Version: 5.37.0
> Kernel Version 4.10.0-32-generic

And krfb version is? Both from "About.." window and from package manager?
Comment 14 Stéphane Tréboux 2017-10-21 05:08:35 UTC
This seems to be solved in Kubuntu 17.10 (krfb 4:17.04.3-0ubuntu1 under KDE 17.04.3 with KDE Frameworks 5.38.0); now the check box "Enable Unattended Access" is saved.

It seems that this change fixed the issue:
https://cgit.kde.org/krfb.git/commit/?id=c83182f8d330dae70cd881a283a0fdbe24a029c5
This is why I added shadeslayer in the CC list, I think that he is the author of the commit.

I don't use krfb anymore, I use only one computer currently.
Can someone check if the issue is resolved in krfb 4:17.04.3-0ubuntu1?
Comment 15 Stéphane Tréboux 2017-11-29 23:30:33 UTC
The issue is solved and tested in Kubuntu 17.10 (artful) with krfb (4:17.04.3-0ubuntu1).

How to use unattended access:
- tick the option "Enable desktop sharing"
- set a password for desktop sharing
- tick the option "Enable Unattended Access"
- set the same password for unattended access

All settings will persist over KDE sessions; this way unattended access makes sense again.
In case the passwords cannot be changed in krfb change them in kwallet instead (happened to me).
Comment 16 jopsrkhrgvwnvnjruz 2020-03-31 09:54:40 UTC
This bug is back on KDE with Debian Buster. 
Clean install. 
I am not able to save the settings/password for "Unattended Access".
Putting "noWallet=true" in ~/.config/krfbrc does not help.  
After a reboot the setting is lost. 
This basically breaks a big portion of the functionality of this tool and either this should be fixed or krfb finally been removed after years of neglience.
Comment 17 Stéphane Tréboux 2020-04-28 14:15:10 UTC
I just updated my two PCs from Kubuntu 19.10 (eoan) to Kubuntu 20.04 (focal).
I tested krfb both before and after the update (4:19.04.3-0ubuntu2 and 4:19.12.3-1 respectively) and unattended access works as expected.

Regarding the previous comment: my test is not based on a clean install and buster uses an older version: 4:17.08.3-1. Version 4:17.08.3-1 is between two versions which are confirmed to work: 4:17.04.3-0ubuntu1 in Kubuntu 17.10 (artful) and 4:19.04.3-0ubuntu2 in Kubuntu 19.10 (eoan). So it is surprising to see a regression there. 

Is anyone else experiencing the same issue again in recent versions of krfb?
Comment 18 Konstantin Hristov 2020-04-29 19:39:52 UTC
I was also able to replicate this with Ubuntu 20.04 LTS. 

I notice that if i start the krfb from Applications -> Internet -> krfb and go to Settings -> Security  and set the checkmark on "Do not store passwords using KDE wallet" and then close the bought windows. Then i notice that those settings are note saved into the ~/.config/krfbrc . The i decided to delete the "~/.config/krfbrc" file and start all over again, however this time instead of clicking on close i did File -> Quite. And then i saw that the "~/.config/krfbrc"  had my changes.  That's how i manage to get  krfb do what i need i.e. the file now looks like this [MainWindow]
######################################################################
State=AAAA/wAAAAD9AAAAAAAAAoAAAAGrAAAABAAAAAQAAAAIAAAACPwAAAAA
ToolBarsMovable=Disabled

[Security]
allowUnattendedAccess=true
desktopPassword=ᄡᄚᄆᆲᆱᄒᄆᆱ
noWallet=true
unattendedPassword=ᄡᄚᄆᆲᆱᄒᄆᆱ
##############################################################################


I am curios what those saved passwords are in a blowfish format or something else? And if one can disable those since i am suing this anyway with ssh port forwarding and do not need passwords.  
Anyway  it seems that there is some discrepancy between the GUI events responsible for saving the file.  

After that i had to add the krfb to the autostart and it all worked.
Comment 19 Bronson 2020-08-26 02:45:46 UTC
This does not fix the issue for me... I keep getting this issue:
https://bugs.kde.org/show_bug.cgi?id=288481
Comment 20 Alexey Min 2020-08-26 12:54:09 UTC
(In reply to Konstantin Hristov from comment #18)
> I am curios what those saved passwords are in a blowfish format or something
> else? And if one can disable those since i am suing this anyway with ssh
> port forwarding and do not need passwords.

It is using KStringHandler::obscure() from KCoreAddons ( https://api.kde.org/frameworks/kcoreaddons/html/namespaceKStringHandler.html#afa464f27b952f544619fd2059eab80b0 ).

No, there is no option to disable this.

> Anyway  it seems that there is some discrepancy between the GUI events
> responsible for saving the file.

I have never seen this bug personally, but I have a suspicion how this can happen. You *may* be right...
Comment 21 Alexey Min 2020-08-26 13:04:21 UTC
Git commit bc755b81d849198b034b4cdeec27711cb7d576e9 by Alexey Min.
Committed on 26/08/2020 at 12:55.
Pushed by alexeymin into branch 'fix_storing_config'.

Make sure to save security settings each time they are modified

Settings that are modified using normal settings window, which is
invoked using menu "Configure Desktop Sharing..." are always saved
correctly.

However some settings that are present on Krfb main window
(normal password, unattended password, checkbox "enable unattended
access") are not handled by KConfigDialog and there is a chance that
settings might not be saved correctly (for example if application
was suddenly terminated).

This hopefully fixes some bugs which are present since year 2011-2014
and have 110 votes, like https://bugs.kde.org/show_bug.cgi?id=340411,
maybe something else.
Related: bug 288481
CHANGELOG: Make sure to save passwords each time they are modified

M  +46   -21   krfb/invitationsrfbserver.cpp
M  +1    -0    krfb/invitationsrfbserver.h

https://invent.kde.org/network/krfb/commit/bc755b81d849198b034b4cdeec27711cb7d576e9
Comment 22 Alexey Min 2020-08-26 13:07:48 UTC
(this is not merged yet!)
Comment 23 Alexey Min 2020-10-05 05:11:14 UTC
Git commit fd362fd642491ee9b4ad42346776b2d4ec089b22 by Alexey Min.
Committed on 05/10/2020 at 05:07.
Pushed by alexeymin into branch 'release/20.08'.

Make sure to save security settings each time they are modified

Settings that are modified using normal settings window, which is
invoked using menu "Configure Desktop Sharing..." are always saved
correctly.

However some settings that are present on Krfb main window
(normal password, unattended password, checkbox "enable unattended
access") are not handled by KConfigDialog and there is a chance that
settings might not be saved correctly (for example if application
was suddenly terminated).

This hopefully fixes some bugs which are present since year 2011-2014
and have 110 votes, like https://bugs.kde.org/show_bug.cgi?id=340411,
maybe something else.
FIXED-IN: 20.08.2
CHANGELOG: Make sure to save passwords each time they are modified

M  +46   -24   krfb/invitationsrfbserver.cpp
M  +1    -0    krfb/invitationsrfbserver.h

https://invent.kde.org/network/krfb/commit/fd362fd642491ee9b4ad42346776b2d4ec089b22
Comment 24 Alexey Min 2020-10-19 11:33:59 UTC
*** Bug 288481 has been marked as a duplicate of this bug. ***
Comment 25 Stéphane Tréboux 2023-10-12 15:07:05 UTC
When updating from Kubuntu 23.04 (lunar, 4:22.12.3-0ubuntu1) to Kubuntu 23.10 (mantic, 4:23.08.1-0ubuntu1) I observe a regression.
With each start krfb needs local interaction to grant access to the screen and input devices, even if "Enable Unattended Access" is ticked.
Another way to put it is that "Enable Unattended Access" stays ticked but does effectively nothing (it does not enable unattended access).
This is a problem for remote machines without physical access.
Comment 26 Nate Graham 2023-10-12 15:12:30 UTC
Please submit a new bug report to report a new problem. Thanks!