Author Topic: scattered widgets  (Read 1148 times)

Offline dougmack

  • Hero Member
  • *****
  • Posts: 981
scattered widgets
« on: August 25, 2012, 08:25:54 PM »
Trying again...  Some time ago I reported this problem, with no result. Trying again.  Under certain conditions--the one I can 100% repeat is Wine (Microsoft) Pinball--when I shut it down,
by any means (escape key is straight-forward) the desktop will come back up with the widgets scattered all over the place , most of them moved towards the top left of the display.
This happens inspite of the fact that the widgets were locked beforehand.
There may be no cure for this behavior, since there was no response the last time I asked, but maybe there is a work-around.  Particularly since there is now a program called
"Restore-KDE_Desktop."  If I knew how to "prime" that program--it looks for saved files of some kind, which I don't seem to have--then perhaps I could use that to get back
my desired desktop layout without having to move everything around again. Where and how do I save the files that Restore-KDE_Desktop looks for?

Thanx for looking, gurus--doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline sir_herrbatka

  • Full Member
  • ***
  • Posts: 238
Re: scattered widgets
« Reply #1 on: August 26, 2012, 03:49:46 AM »
Is that beacause of resolution change?

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6380
  • I'm going South
Re: scattered widgets
« Reply #2 on: August 26, 2012, 05:10:29 AM »
The script .RestoreMyKDEdesktop is a hidden file in your home directory. It simply moves ~/.kde4 to ~/.kde4-new and ~/.kde4.bak to ~/.kde4 (after checking that the files exist and removing a possible old copy of ~/.kde4-new).

This means that once you have run it ~/.kde4.bak doesn't exist anymore.

It would be easy to modify the script so that it simply copies a backup of ~/.kde4 over your existing folder instead of moving it. Is that what you want?
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline dougmack

  • Hero Member
  • *****
  • Posts: 981
Re: scattered widgets
« Reply #3 on: August 26, 2012, 11:50:02 AM »
I just searched for .kde4* and /.kde4* and there does not seem to be any such file on the machine, which is probably why "Restore-KDE_Desktop" doesn't work.
(I'm aware that the restore file works when you upgrade the kernel, and the whole desktop is blown away.) 
I guess what would be ideal would be if, when you tell the machine to lock widgets, that command would also create the .kde4 or .kde4new, or whatever is needed to
bring back the desktop that was in place when you locked the widgets.  That may be asking too much, I don't know.  If so, please suggest something simpler that would
have a similar effect. 
(Obviously, the ideal would be if the widgets didn't migrate all over; this is obviously some kind of bug. Where and how should it be reported?)
Thanx for your interest, Bald Brick.  --doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6380
  • I'm going South
Re: scattered widgets
« Reply #4 on: August 26, 2012, 01:48:26 PM »
I just searched for .kde4* and /.kde4* and there does not seem to be any such file on the machine, which is probably why "Restore-KDE_Desktop" doesn't work.

/home/<yourname>/.kde4 must exist if you are running KDE. It's not an ordinary file, it's a hidden folder, so you have to tick "Show Hidden Files" under "View" in Dolphin or Konqueror to see it. (Or press "ALT+.") The folder contains most of the settings for your KDE programs.

/home/<yourname>/.kde4.bak won't exist after you've run RestoreMyKDEdesktop.

Quote
(I'm aware that the restore file works when you upgrade the kernel, and the whole desktop is blown away.)  
I guess what would be ideal would be if, when you tell the machine to lock widgets, that command would also create the .kde4 or .kde4new, or whatever is needed to
bring back the desktop that was in place when you locked the widgets.  That may be asking too much, I don't know.  If so, please suggest something simpler that would
have a similar effect.  
(Obviously, the ideal would be if the widgets didn't migrate all over; this is obviously some kind of bug. Where and how should it be reported?)
Thanx for your interest, Bald Brick.  --doug
« Last Edit: August 27, 2012, 08:31:48 AM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline dougmack

  • Hero Member
  • *****
  • Posts: 981
Re: scattered widgets
« Reply #5 on: August 26, 2012, 02:41:49 PM »
OK, I've got .kde4 as well as .kde4-new and some others that I made along the way sometime. There is no .kde.bak.  Looking at the terminal listings, all of the versions
have a double-dot subdirectory dated Aug 25 23:54 --yesterday--when I last reassembled the widgets.  At least I think that's when, unless it's when the widgets got scrambled.
Obviously the times would be very close. 

I don't know how it could be done, but crude pseudo-code would run like this:

 detect "lockwidgets" command
 cp .kde4 .kde4.bak

Then when you had a deskfull of messed-up widgets, the Restore-kde_Desktop would put all the widtgets back in place.

(BTW: For Windows there is a freebie available called Desktop Restore, from JOConnell.  It modifies the performance when you right-click on a clear area of the screen to bring up
a box which includes the commands "Save Desktop..." and "Restore Desktop" .  Very handy, since Windows also has some modes that will mess up the icon arrangement.)

--doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline kalwisti

  • Sr. Member
  • ****
  • Posts: 276
Re: scattered widgets
« Reply #6 on: August 27, 2012, 07:35:46 AM »
Hi, dougmack,

I remembered a forum thread from many moons ago (because it's something my machine was doing at the time). I'm not sure if the behavior you're describing is similar to what is discussed below .... But you might take it look at it to see if it offers a possible workaround for you:

http://www.pclinuxos.com/forum/index.php/topic,89880.0.html
"[Solved] Wandering, Shape-shifting Quick Launch." 15 Apr. 2011.

HTH.
Registered Linux User # 442201

LinPC box:  AMD Athlon II X2 240 (Regor) 2.8 GHz, 4 GB RAM, Seagate Barracuda 320 GB HD, Nvidia GeForce 6150SE nForce 430 integrated GPU, Samsung SH-S222L DVD-RW

Offline dougmack

  • Hero Member
  • *****
  • Posts: 981
Re: scattered widgets
« Reply #7 on: August 27, 2012, 11:15:37 AM »
I am already running Desktop View, which is why I have widgets and not icons. (Discovered just a week or two ago.)  Before, when I had Folder, the icons would wander, so it
doesn't make any difference.  I don't know what Quick Launcher is, but I think it has something to do with keeping your program icons (widgets) on the panel.  The only program
icons or widgets I have on the panel are the default ones plus a terminal and KSnapshot. And I don't want anything else there.  The files I use frequently are widgets on
the desktop, just like Windows. Why mess with something that works?  I also don't use more than one desktop. I see no reason to.  I just want the layout to stay put! If I
were familiar with the programming behind the system, I would write a file like the Windows one, to brute-force the solution, but unfortunately I'm not. 
Thanx for the input--doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Online Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10667
  • MLUs Forever!
Re: scattered widgets
« Reply #8 on: August 28, 2012, 01:56:48 AM »
In the first place I would be looking to the Wine devs to see if there are other reports or solutions to this problem.


Regarding the idea of restoring the desktop ........  this might work ........

when Wine is called make a backup of .kde4 .......  when Wine is closed restore the original .......  do this whether it screws things up or not.
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6380
  • I'm going South
Re: scattered widgets
« Reply #9 on: August 28, 2012, 09:47:35 AM »
(BTW: For Windows there is a freebie available called Desktop Restore, from JOConnell.  It modifies the performance when you right-click on a clear area of the screen to bring up
a box which includes the commands "Save Desktop..." and "Restore Desktop" .  Very handy, since Windows also has some modes that will mess up the icon arrangement.)

A script that would give you those choices wouldn't have to be much longer than:

Code: [Select]
#!/bin/sh
export DISPLAY=:0.0
choice=`kdialog --combobox "Backup or Restore" "backup" "restore"`
if [ "$choice" == "backup" ]; then
   rm -rf ~/.kde4.backup
   cp -ar ~/.kde4 ~/.kde4.backup
elif [ "$choice" == "restore" ]; then
   if [ ! -d ~/.kde4.backup ]; then
      kdialog --msgbox "The backup folder (~/.kde4.backup) doesn't exist. Good bye ..."
      exit 0
   fi
   rm -rf ~/.kde4
   cp -ar ~/.kde4.backup ~/.kde4
   kdialog --msgbox "Log out now!"
fi

I'm not a programmer and I haven't tested it, but you get the general idea. To me using rsync would be preferable to using cp, but everybody doesn't have rsync installed. There's also one great drawback with copying files and directories instead of renaming ("moving") them: a mv operation is almost instantaneous; copying may take some time.

In your place I'd simply do what Just18 suggested.




« Last Edit: August 29, 2012, 10:06:07 PM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3996
Re: scattered widgets
« Reply #10 on: August 29, 2012, 05:28:19 AM »
Wouldn't it make more sense to stop wine changing the desktop resolution? All this saving and copying of files is just asking to mess something up or lose interim changes. It might mean the game would play in a window rather than full screen, but that wouldn't produce any loss of detail, just a smaller picture.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline dougmack

  • Hero Member
  • *****
  • Posts: 981
Re: scattered widgets
« Reply #11 on: August 29, 2012, 04:29:36 PM »
It would not be at all desirable to run pinball at anything less than full screen. It is necessary to coordinate the flippers with the postion of the ball.  Either of the solutions mentioned,
or a copy of the Windows routine,  would seem to be OK, but the actual implementation has not been presented.  (I'd actually prefer a copy of the Windows routine, even tho it
would not be automatic, since I have seen widget scrambling in a couple of instances that did not include Pinball.)  But I don't know how to do any of them.  I should think the
Windows scenario would be easiest:  all one would have to do is detect the right-click on the desktop, and add an option to the command list.  But as I said, I don't know how. 

I think I sent this Q to the Wine list sometime back--I'm not sure, I've been living with this for a while--but if so, there was no answer.  I'll try again and see what happens.  (I don't like to
cross-post, but since it's been suggested. . . .)

Thanx for the inputs, gang--doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3996
Re: scattered widgets
« Reply #12 on: August 29, 2012, 05:32:11 PM »
In that case, have you considered installing a different desktop or using a different user to play in? That way you wouldn't have to change the resolution of your normal desktop.

KDE doesn't like having its resolution changed, as you've seen. For that reason, if I have to remote desktop into my main machine from my laptop, which has a smaller screen, I use LXDE to do it, specifically to avoid upsetting my KDE.

It would mean you'd have to log out and in again to play, but that's probably no more hassle than trying to save and restore configurations.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline dougmack

  • Hero Member
  • *****
  • Posts: 981
Re: scattered widgets
« Reply #13 on: August 29, 2012, 06:05:20 PM »
I don't know anything about LXDE.  Is it just a desktop, or is there more to it?  Where can I find a comparison between KDE and LXDE?  How would I invoke it, if I should want to?
Or, what would I lose if I just converted to LXDE altogether?  I may put the thing on my sandbox machine and play with it, if I get some q&d instructions.  --doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline smileeb

  • Hero Member
  • *****
  • Posts: 2236
    • smileesplace
Re: scattered widgets
« Reply #14 on: August 29, 2012, 09:59:22 PM »
Run a live CD of LXDE and see how it works and you like it.
The live CD will give you an idea of what it will look like on you computer.
If I'm not mistaken it will be a smaller foot print and a little faster on your computer.