LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Turn off desktop grid snap
#1
Hello folks,

Sooooo....I have not found a solution to this anywhere. I need to be able to completely turn off the icon grid snap on the desktop. I am building some public library computers and the icons need to be placed in specific locations against a custom wallpaper on the desktop.  The icons are arranged under header on the wallpaper. This allows new user at the library to easily find the icons they need to use. The grid snap is not allowing me to position the icons anywhere close to where they need to go. Is there a way to remove the grid snap completely.....as I have not found one yet.

Thanks in advance.....

Ken
Reply
#2
G'day Ken,

I'm not sure the grid can be turned off with Xfce but it can be adjusted somewhat by editing a config file which might help.
I'm using LL-2.8 at the moment but I think it'll be the same for 3.0 & 3.2.

The file to edit is a hidden file in the home folder named .gtkrc-2.0.
Find it, right click on it & create a backup copy so you have an original to use if something goes wrong.
Then open the original with a text editor, replace anything in there with the following:

Code:
gtk-menu-popdown-delay = 0
gtk-menu-bar-popup-delay = 0
gtk-enable-animations = 0
gtk-timeout-expand = 0

style "xfdesktop-icon-view" {
    XfdesktopIconView::label-alpha = 0
    XfdesktopIconView::selected-label-alpha = 170
    XfdesktopIconView::ellipsize-icon-labels = 1

    XfdesktopIconView::shadow-x-offset = 0
    XfdesktopIconView::shadow-y-offset = 0
    XfdesktopIconView::shadow-color = "#000000"
    XfdesktopIconView::selected-shadow-x-offset = 0
    XfdesktopIconView::selected-shadow-y-offset = 0
    XfdesktopIconView::selected-shadow-color = "#ffffff"

    XfdesktopIconView::cell-spacing = 1
    XfdesktopIconView::cell-padding = 1
    XfdesktopIconView::cell-text-width-proportion = 2.0

    base[NORMAL] = "#004e00"
    base[SELECTED] = "#004e00"
    base[ACTIVE] = "#004e00"

    fg[NORMAL] = "#ffffff"
    fg[SELECTED] = "#ffffff"
    fg[ACTIVE] = "#ffffff"
}
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"

Save & close the file, logout & back in again & you should be able to align the icons pretty much to your liking.
The colour of the highlighted (selected) icons with this file is a green colour, to change that edit the colour codes between the quotes in the lines:

Code:
base[NORMAL] = "#004e00"
base[SELECTED] = "#004e00"
base[ACTIVE] = "#004e00"

For example "#0000FF" is blue.

8)



Reply
#3
I don't know how many icons you need to place, but rather than the desktop, you can enlarge the panel and add icons for applications to it easily, and select always visible, and the icons will never be hidden by opened windows. The panel can be at the top, bottom, or either side of the desktop. When I set up for public users I generally turn off desktop icons to avoid inadvertent desktop clutter and added unnecessary apps caused by inexperienced users. (add trash, web browser, and LOwriter to favorites in the start menu.) To make applications other than default LL applications available you first have to add them to the start menu >Menu>Settings>Main Menu then right click the item from the menu and add to panel.

TC
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
Reply
#4
Hi trinidad.....the library has quite a few icons on the desktop and they are grouped under headings built into the wallpaper.....ie Office Apps, Job Searching, Media, etc....the users have been using the computers this way for quite a while now, so they are used to it like this.

JmaCWQ.....that info was helpful thanks. I tried using your code in the .gtkrc-2.0 file and it did help, although I still could not get the icons placed any ol' place I wanted as they were still on a grid. However, I was able to adjust the wallpaper a bit and move the icons enough to fit well on the desktop.....so the results turned out fine, thanks again for the input.

Ken
Reply
#5
No probs Ken,
It doesn't turn off the grid as such, but allows adjustment of the spacing between icons on the grid.
To fine tune it a bit more you could possibly try changing the value of the line XfdesktopIconView::cell-text-width-proportion = 2.0 to 1.5 or perhaps even 1.0.
It controls how much space is used to display the text under each icon.
It works on multiples of the icon size in pixels, so if you have a 20 pixel icon & it's set at 2.0, Xfce will reserve 40 pixels for the text.
It centres each icon in it's display area so it'll reserve 10 pixels either side of the icon + the 20 pixels of the icon itself.
If you change that number to 1.0 it keeps the text at the same width as the icon allowing them to be put closer together if desired.
Logout & back in again anytime you edit that file.
Reply
#6
Thanks again.....I have made progress on my public library computer build....am finally happy with icon placement, etc. However, now I am having issues with the icons wanting to auto arrange at reboot time. So, a short explanation.....

The public computer profile is copied to a hidden folder....at each reboot, the main profile is erased and a fresh copy is copied from the hidden folder. The machine starts with a fresh profile each morning when it is turned on....and this provides a quick fix if a user messes up the machine somehow, a library worker can simply restart and it is ready to go again. However, each time I reboot the icon placement is destroyed and all the icons are stacked down the left side of the desktop. The hidden profile folder has the correct desktop layout, so this is happening at reboot. How can I turn off the auto-arrange so my desktop remains intact???
Reply
#7
Aah yes, the icons jumping left on a restart.
That is something that has annoyed me for quite some time & only seems to happen with the Xfce desktop environment.
I currently have installs of Linux Lite 2.8, Linux Lite 3.0, Debian Jessie and MX-15, all with Xfce & all have the same issue.
I've never been able to find a permanent cure for it but there is a way of locking the desktop icons in position so they don't all jump left upon a restart.

I'm not sure if this method will work with a hidden profile that's refreshed at every restart as I've never used or tried it like that, only one way to find out I guess...

Get the icons where you want them then open Terminal & enter the following command:

Code:
sudo chattr +i ~/.config/xfce4/desktop/icons*

That should lock the positions of the icons so they don't move around on a restart, it does that by locking the file the icon positions are read from so it can't be written to or changed.
They can still be moved around on the desktop by dragging but a restart or desktop refresh (F5) will realign them to the positions they were in when the lock command was run.

To unlock the icons again use this command:

Code:
sudo chattr -i ~/.config/xfce4/desktop/icons*

Even with the icons locked any new icons added to the desktop will be placed top left, they can be moved around & will usually hold position until a restart but for them to be permanently moved to a new location the unlock command has to be run, the new icon/s placed in the desired location, then the lock command run again.
If they're not locked & F5 is hit I find they all jump to the top left again, which is the hardcoded Xfce default.
They can be deleted while locked without any problems.

There's a couple of other threads here about the same jumping left issue and there are different solutions in those threads that have worked for other people, though locking the icon file as described above is the only way I have found to permanently keep them where I put them.


Reply
#8
Wow!!! Thanks JmaCWQ for the detailed info. I will give that a try. Honestly, the library computer builds I am presently working on are Linux Mint XFCE. However, my main desktop is LL 2.8 and I have numerous Linux Lite laptops as well. Linux Lite is my goto distro for everything. If the library was not already using Linux Mint, I would switch those too.....LOL.

But yes, I have seen the same problem on a lot of XFCE desktop systems regardless of distro. I even fought it a bit with my own. Sometimes it can be tolerated....but not in this case. I will give your solution a try and see how it goes....and let you know how it works from a refreshed profile as well.

Thanks again,
Ken
18
Reply
#9
You're welcome Ken, hope it works.
LOL, yeah I know what you mean by sometimes it can be tolerated, I used to pretend it didn't happen or I couldn't see it though eventually it would annoy me enough to do something about it so I'd run the lock command to anchor them where I put them.
Now if I install a system with Xfce running that lock is one of the things I do to set the system up before I start using it in general.
I spent a considerable amount of time researching and trying to sort this issue for myself & several other people I installed Linux Lite for, but so far nothing seems to hold permanently except locking the icon file with the above command.
I've only ever used Mint with the KDE desktop though I imagine the command is Xfce specific & should work ok on Mint Xfce.

With removable drives shown on the desktop and their icons are locked to a certain position, if the unlock is run with them not mounted they'll lose their positions & when mounted again they'll but put default top left.
Workaround for that is if I need to unlock to rearrange something, have them mounted when unlocking & relocking with their icons in the required positions.
Then if they're unmounted & unplugged the icon will vanish as normal but when plugged in & mounted again the icon will appear in the position it was when the lock was run.
Reply
#10
Hi again.....so I tried the icon lock last night on the system and it works perfectly!!!! It even works great with the profile restore from a hidden folder.......a HUGE thank you for that one! You have been a great help solving this one....so I will consider this solved. Thanks again.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)