Bug 292580 - Wish: CLP to forget folders on start
Summary: Wish: CLP to forget folders on start
Status: RESOLVED DUPLICATE of bug 272361
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 4.10.1
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 12:48 UTC by Jonathan Farley
Modified: 2018-04-09 19:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Farley 2012-01-27 12:48:05 UTC
Version:           2.6
OS:                Linux

When I start a new session, Gwenview attempts to locate network folders if I have been viewing them in a previous session. This sometimes causes problems on my network, especially if the folder is no longer available. 



Reproducible: Didn't try



Expected Results:  
It would be helpful to have a command parameter which will forget folders on startup. It would be even better to be able to start up with the option to forget network folders only or forger all folders. 

eg. 

Gwenview -forget-all
Gwenview -forget-net
Comment 1 Benni Hill 2013-04-12 12:33:33 UTC
What do you mean by "causes problems"? Can you test if gwenview 4.10 has improved this situation for you?
Comment 2 Jonathan Farley 2013-04-13 19:09:34 UTC
I am at present using Version 4.10.1

What I am asking for is a CLP parameter to help me resolve an issue which is not Gwenview's fault, but is initiated by Gwenview.

On startup Gwenview attempts to locate any network folders that I looked at in a previous session. These are ftp folders on an NAS. It appears that Gwenview initiates multiple ftp sessions to obtain thumbnails, whether from a single folder or a number of folders. When this happens, the NAS issues a "Too Many Connections" Error. At this point, Gwenview puts its unobtainable icon on the start page, however the NAS holds the ftp connections open for Gwenview and refuses further ftp connections. This inhibits other  computers on the network from performing their periodic  backups. I have monitored the NAS and found that it holds the ftp connections to Gwenview open for up to an hour before dropping them.

Even though this problem is really due to the small nature of the NAS, If I could have a "forget network folders on startup" option in Gwenview, it would stop the problem from happening.
Comment 3 Jonathan Farley 2013-04-13 19:13:41 UTC
I should have said, that the "Too Many Connections" error seems only to happen when a folder on the NAS that it is trying to access, has been deleted or moved.
Comment 4 Benni Hill 2013-04-13 21:22:03 UTC
That's strange. Gwenview shouldn't connect to a remote host on startup (since 4.10). At least when it's through a kio-slave (addresses starting with ftp://, sftp://,...). Or do you have your ftp directory mounted?
Comment 5 Jonathan Farley 2013-04-14 10:32:49 UTC
I have a script that ftps the NAS on startup from each PC in order to restore/backup their synchronised directories but that session is closed down on completion and is through a single location access ftp account on the nas: 

ftp://rsync@190.167.1.11/NetBackup/

The only thing which should remain accessible to Gwenview after this process is Kwallet for password access.

The general user access is through:  {user name}@190.167.1.11 and provides the following access on the NAS:

ftp://{user name}@190.167.1.11/{user name}/
ftp://{user name}@190.167.1.11/music/
ftp://{user name}@190.167.1.11/photos/

only the latter of these is really relevant to Gwenview. 

Also, the photos directory is an external usb hard disc (300gb) mounted to the NAS at: /mnt/usb1.

If there is an icon on the Gwenview start page which points to a subfolder in 
ftp://{user name}@190.167.1.11/photos/  which has since been deleted or renamed, this issue happens. It also happens if a Gwenview icon points to ftp://{user name}@190.167.1.11/photos/ and the usb drive is turned off.

The issue stops if I uncheck the "remember folders and urls" in the advanced settings, but then I lose all of the local history as well, which I would rather continue to access.

As I said before, this is really an NAS issue and is not a Gwenview bug. My NAS is an old Synology 	DS-101j, which I plan to replace soon. But it would be helpful for Gwenview to be able to forget net access history only and show no icons for net locations on the start page.
Comment 6 Benni Hill 2013-04-15 21:17:38 UTC
This is really strange. Gwenview already shouldn't try to connect to a remote folder in the recent folders view. (We implemented this to get rid of password dialogs that might pop up.) Instead of showing 4 thumbnails it shows the "folder-remote" icon for remote folders now:

https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Oxygen480-places-folder-remote.svg/128px-Oxygen480-places-folder-remote.svg.png

Could you try to remove the contents of ~/.kde/share/apps/gwenview/recentfolders and try again?
Comment 7 Jonathan Farley 2013-04-27 13:25:02 UTC
OK, I have managed to stop it happening but not sure exactly what happened...

Before deleting the contents of recent folders, I checked all of the entries. none were pointing to an ftp address. Deleted them all and also checked in case there were any hidden files, but there weren't.

Tried again and the same behaviour. So I checked the permissions of the new entries, all seemed OK so I checked the permissions of: ~/.kde/share/apps/gwenview/recentfolders  and they appeared not to be correct:

[jsf@desktop gwenview]$ ls -l
total 12
-rw-r--r-- 1 jsf jsf 3011 Jan 15 10:36 gwenviewui.rc
drwx------ 2 jsf jsf 4096 Apr 27 12:12 recentfolders/
drwxr-xr-x 2 jsf jsf 4096 Feb 12  2011 recenturls/
[jsf@desktop gwenview]$ 
 
I changed the permissions so that recentfolders and recenturls matched:

[jsf@desktop gwenview]$ ls -l
total 12
-rw-r--r-- 1 jsf jsf 3011 Jan 15 10:36 gwenviewui.rc
drwxr-xr-x 2 jsf jsf 4096 Apr 27 12:12 recentfolders/
drwxr-xr-x 2 jsf jsf 4096 Feb 12  2011 recenturls/
[jsf@desktop gwenview]$

cleared the contents of recentfolders again and fired up Gwenview. It is no longer trying to connect to the ftp.
Puzzling!
Comment 8 Benni Hill 2013-05-05 17:52:49 UTC
Thanks for your efforts but I'm also completely clueless. I'll leave this bug open just in case anybody else is affected by it.
Comment 9 Nate Graham 2017-09-10 03:38:40 UTC
Same issue or root cause as https://bugs.kde.org/show_bug.cgi?id=354750

*** This bug has been marked as a duplicate of bug 354750 ***
Comment 10 Nate Graham 2018-04-09 19:56:40 UTC

*** This bug has been marked as a duplicate of bug 272361 ***