LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 12-09-2005, 03:15 PM   #1
mac57
Member
 
Registered: Nov 2004
Location: Texas
Distribution: openSUSE 10.3, Yoper Linux 3.0 , Arch Linux 2007.08
Posts: 253

Rep: Reputation: 30
Question Cmd Line Command for KDE Refresh Desktop?


 
Old 12-09-2005, 03:16 PM   #2
mac57
Member
 
Registered: Nov 2004
Location: Texas
Distribution: openSUSE 10.3, Yoper Linux 3.0 , Arch Linux 2007.08
Posts: 253

Original Poster
Rep: Reputation: 30
One more time, this time with the body of the post included! Doh.....

Does anyone know if there is a command that could be included in a script that would cause KDE to refresh the desktop? I know that I can manually refresh the desktop by right clicking on it and selecting "Refresh Desktop", but I am wondering if there is a way to simply include a command in a larger script that will do this automatically. Thanks.
 
Old 12-10-2005, 09:47 AM   #3
crazibri
Member
 
Registered: Mar 2004
Location: Orange County, CA
Distribution: OS X, SuSE, RH, Debian, XP
Posts: 377

Rep: Reputation: 31
Well when I copy files with Konsole to the Desktop, its there practically instantly. Now is yours different?
Maybe you could shead some light on why you need this auto refresh and describe the problem you're having a bit more.

Thanks.
 
Old 12-10-2005, 12:44 PM   #4
mac57
Member
 
Registered: Nov 2004
Location: Texas
Distribution: openSUSE 10.3, Yoper Linux 3.0 , Arch Linux 2007.08
Posts: 253

Original Poster
Rep: Reputation: 30
Actually, I have managed to solve the problem at this point, but I would be happy to elaborate a bit and then describe the solution for other's benefit. The basic problem I am having is that KDE seems quite erratic at updating disk icons on the desktop to show when they are mounted vs. when they are not. In my case, this is worse because I have an encrypted volume file that I use to keep financial and other personal records quite protected. I think because this is not a "traditional" hard disk volume (even though it has an fstab entry, and does show up in mtab when mounted) KDE somehow fails to pop an icon onto the desktop when it is mounted. So, using the Desktop's right click context menu, I did a Create New -> Link to Device -> Hard Disk Device and specified the relevant fstab entry. With this done, I thought that KDE would notice mount state changes in it via mtab (I am guessing here) and update the icon to its mounted icon whenever I mounted the volume, like it does for the two other normal hard disk partitions I have icons for on my desktop (my Windows C and D drives).

No such luck. However, I noticed that if I forced a desktop refresh via the right click context menu, it immediately updated the encrypted volume's icon to the mounted/unmounted one as appropriate to the state the volume is in. So, I started looking for ways to force a desktop update as part of the script I use to mount/unmount the encrypted volume. That led to the thread we are looking at right now.

Since I have both SuSE and VectorLinux, I posted in both newsgroups, and a kind soul in the VectorLinux newsgroup provided a working answer. Here it is. KDE apparently monitors the ~/Desktop directory using FAM (File Access Monitor) and will receive a notification from the kernel if anything changes on the desktop. When it gets such a notification, it updates the desktop. Ah hah... the solution presents itself.

So, to force an update, I simply added the following to my encrypted volume mounting script.

touch ~/Desktop/u.txt; rm ~/Desktop/u.txt

This briefly places the empty file u.txt (any file name will do here) on the desktop, and then removes it. This causes FAM to give KDE a notification, and it updates the desktop. Not very obvious, but perfectly effective! By the way, this is for SuSE 9.3, with KDE 3.4. I can't guarantee that this will work on any other version of SuSE.

It still would be nice to be able to run some command that simply updated the desktop directly though!
 
Old 12-10-2005, 05:21 PM   #5
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
I have noticed that there are times when icon properties are not updated until you close the application that operating on the file the icon represents. At least that appears to be the case.
 
Old 01-03-2010, 12:09 AM   #6
mcurran
LQ Newbie
 
Registered: Jan 2010
Location: Massachusetts
Distribution: LMDE
Posts: 4

Rep: Reputation: 2
source/script/command for refresh-desktop (.kde3)

BUMP!

I have a similar issue with my top icons getting overlapped by a top panel I've added to my desktop, and a refresh desktop corrects the problem. I want to add a script to my ~/.kde3/Autostart folder and also think that a direct command rather than a file create and delete would be better...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fc1 kde desktop refresh too slow cucmi Linux - General 0 06-21-2004 09:36 PM
wrong refresh rate in command line mode? Meta42 Mandriva 2 03-19-2004 07:13 AM
Getting to the Desktop enviroment from the Command Line id10t Linux - Newbie 3 01-06-2004 05:48 PM
change desktop manager from command line pepino Linux - Newbie 7 10-24-2003 11:19 AM
How To Change Refresh Rates from Command Line? phate Linux - Hardware 1 05-06-2003 12:44 PM


All times are GMT -5. The time now is 08:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration