You are not logged in.
I am using Openbox/fbpanel, and I have a very irritating problem.
Fbpanel uses the desktop files in /usr/share/applications to create its launcher menu. I have edited several of these to my own requirements (hiding some applications, changing the names of some. etc). This all works fine until I carry out an update, when new versions of packages overwrite these modified files. I then have to do the modifications all over again. Very time-consuming and VERY annoying.
Does anyone have any ideas on how I can prevent this from happening?
Last edited by myrlin (2012-02-11 10:34:39)
Offline
Copy the files you've changed into ~/.local/share/applications
Offline
Thank you so much for your fast reply, Gusar.
So, does fpanel look in ~/.local/share/applications first, then ignore any duplicates found in /usr/share/applications?
Offline
That's how this stuff is supposed to work, if a file with the same name is present in both /usr/share/applications and ~/.local/share/applicantions, the the file in ~/.local will be used. Works with lxpanel, no idea about fbpanel.
Offline
Hmm...seems not!
I've just done some experiments, and I just get two entries in the menu. Looks like an fbpanel issue then?
Thanks again for your help, Gusar.
Offline
For some paranoia reasons, I prefer /usr/local/* over of ~/.local/*. Pure preferencial aestetics, of course.
Offline
Same result - duplicate entires.
I guess a workaround would be to transfer EVERYTHING from /usr/share/applications into a local file, delete everything from /usr/sahre/applications, then keep it empty. Seems a bit of a dirty hack, so I would be interested in anyone's views.
Thanks again to everyone for their help.
Offline
On ext filesystems, you can use "chattr +i filename" to stop the file from being modified.
Offline
I doubt fbpanel can edit the files in /usr/share/applications without requesting root permissions?
In any case, you could just use NoUpgrade on each file in pacman.conf
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Preventing installation scripts from writing files seems a bit scary, I mean, it might error out? So I made this little script;
EDIT: removed my stupid script! Much better to backup your .desktop files
and then restore them, as suggested in this thread.
Sometimes my scripting curiousity overshadows my logic.I think you can restart fbpanel with; killall -USR1 fbpanel. I made it since I seem to have the same problem with .local/share/applications and /usr/share/applications, or sometimes some apps don't look in .local/share/ ... , like obmenugen.
Last edited by swanson (2012-02-13 08:31:21)
Offline
I am using Openbox/fbpanel, and I have a very irritating problem.
Fbpanel uses the desktop files in /usr/share/applications to create its launcher menu. I have edited several of these to my own requirements (hiding some applications, changing the names of some. etc). This all works fine until I carry out an update, when new versions of packages overwrite these modified files. I then have to do the modifications all over again. Very time-consuming and VERY annoying.
Does anyone have any ideas on how I can prevent this from happening?
I don't know how to prevent this from happening, but how to prevent you from having to do all the modifications all over again: It's actually that simple, I can't believe nobody suggested it, yet^^
Backup the modified .desktops in .backup or whereever you want them and after an upgrade, simply
cp .backup/*.desktop /usr/share/applicationsOffline
Very many thanks to everyone for all your advice.
@lucke: This looks like a great solution. I tried it on a single package, and, although I got some warnings from pacman, it didn't error out, so maybe it will be OK. I'll try it with a "pacman -Syu". If it works, it will mean that the upgrade process continues to be automatic, without need for further manual intervention, which is my aim
@swanson: Thank you for this script, and your help.
@desm0tes: This is so elegant:) Many thanks.
One (or several) of the suggestions you have all so kindly provided will deal with the problem, so I will mark this thread as "Solved".
Once again, thank you to everyone.
Offline
How about an incron job, writing back your backups, whenever the files change?
Offline
I use that chattr trick for chromium.desktop - there should be no problems, only warnings when updating.
Offline