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

Trigger folverview plasmoid refresh (F5) from command line?

Tags: None
(comma "," separated)
CyberAngel
Registered Member
Posts
49
Karma
0
I have a folderview plasmoid on my desktop, pointing in a local folder which is empty.
Then I use sshfs to mount a remote folder, but the contents of the remote folder do not show in the folderview plasmoid until I press F5 to refresh its view.
When I unmount the folder, similarly, the contents do not disappear until I press F5.

Does anybody know if it is possible to force refresh the folderview plasmoid somehow from the command line (maybe by using a qdbus command)?

I tried to use Plasma Desktop Scripting to change and reload the configuration of the plasmoid, but it has no effect.

I know that I could point the folderview plasmoid on the remote folder directly by using fish:// or sftp:// KIO slaves, but the problem is that non KDE applications cannot access KIO slaves, that's why I prefer a fuse mount.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I'm afraid i'm not aware of any console level commands which could be used to cause a Folder View applet to act in a certain way. However it is most certainly a bug that it does not update when the contents of the folder change - as it should do.

Is inotifywait (http://linux.die.net/man/1/inotifywait) triggered when you mount/unmount the sshfs file system?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
CyberAngel
Registered Member
Posts
49
Karma
0
bcooksley wrote:I'm afraid i'm not aware of any console level commands which could be used to cause a Folder View applet to act in a certain way. However it is most certainly a bug that it does not update when the contents of the folder change - as it should do.

Is inotifywait (http://linux.die.net/man/1/inotifywait) triggered when you mount/unmount the sshfs file system?


I am not sure that inotifywait is triggered when sshfs is mounted... but most likely not.

I have a directory 'mount' dir and when I mount the sshfs mount I get the following output from inotifywait:
Code: Select all
$ inotifywait -m mount/
Setting up watches.
Watches established.
mount/ OPEN,ISDIR
mount/ CLOSE_NOWRITE,CLOSE,ISDIR
mount/ OPEN,ISDIR
mount/ CLOSE_NOWRITE,CLOSE,ISDIR

When I unmount the 'mount' dir, nothing is shown in the output of inotifywait (so definitely when the fusermount -u is running, there is no event triggered).
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay, this explains why the Folder View is unable to notice the difference. I'm afraid there isn't much that can be done - although you could look into xte to give focus to Plasma Desktop and trigger the F5 key as a ugly workaround.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
CyberAngel
Registered Member
Posts
49
Karma
0
bcooksley wrote:Okay, this explains why the Folder View is unable to notice the difference. I'm afraid there isn't much that can be done - although you could look into xte to give focus to Plasma Desktop and trigger the F5 key as a ugly workaround.


That's what I already ended up doing with xdotool while I was hopeful for a solution that I am not aware of :)

Anyway, I think it would be nice if the plasmoid was refreshing itself, at least, after a config reload.I will file a wishlist/bug for it.

Thanks for the support :)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay. Please note that Folder View will normally refresh itself - as it relies upon watching the directory it is supposed to be monitoring to tell if it needs to refresh or not.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
CyberAngel
Registered Member
Posts
49
Karma
0
bcooksley wrote:Okay. Please note that Folder View will normally refresh itself - as it relies upon watching the directory it is supposed to be monitoring to tell if it needs to refresh or not.


Yes, but how refreshing by F5 is different then? So when the configuration is reloaded, it should perform a complete "F5" refresh.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The problem in this case is that the mount/unmount process does not trigger a folder change for reasons unknown. In addition, remote file systems cannot trigger file change events (even with native Unix methods such as NFS - unless you use systems such as FAM).

Performing a full reload when the configuration is altered is a possibility - although please note that up to this point at least, Plasma Desktop has not supported changes to it's configuration file while it is running.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar