site  contact  subhomenews

Desktop drive icons displaced

May 29, 2017 — BarryK
There is a problem that comes up sometimes, afflicts most puppies. The desktop drive partition icons are on the screen just above the taskbar. However, at a later bootup, they are displaced, maybe slightly below the taskbar.

I had this happen to me a couple of times recently. The problem occurs when the monitor or TV is powered separately from the PC, so you have to turn it on separately. If you change the turn-on sequence, the problem can occur.

As I understand the situation, if Xorg cannot probe the monitor, due to it being a bit late turned on, Xorg may draw a different resolution to the screen.
In my situation, Xorg draws to the screen either at 1280x1024 or 1024x768.

Following through what happens in Puppy and Quirky:
At startup of Xorg, from /sbin/xwin, /root/.xinitrc is run. This in turn launches /usr/local/pup_event/pup_event_frontend-d, which in turn runs /usr/local/pup_event/frontend_startup.

It is the latter script that runs the utility 'xwininfo' to determine screen size, and then the drive icons are drawn.
At subsequent bootups, for efficiency, the drive icons positions are not recalculated, just redrawn at the same screen coordinates. Which is why the problem occurs.

So, trying an experiment. I have moved the 'xwininfo' code out of 'frontend_startup' to /root/.xinitirc, and it tests if the dimensions have changed since last bootup. If so, wipes the icons -- and they should get redrawn in the correct coordinates.

Note, the wiping of the icons is done by /sbin/clean_desk_icons, which is called from /root/.xinitrc.

This change will be in the next upload of Easy Linux, for testing.

Tags: linux