Quote:
Originally Posted by
bigearsbilly
you won't be able to do this reliably with sed.
it's non trivial I'd say to get it right.
it's an xml file you're better off using a proper XML processor.
how about this?
GNOME_Tips#Menu_Editing
I use alacarte for single user, but unfortunately, it only adds things for the user, not for the system (running as root doesn't work either, of course).
I have seen websites like above (the Gnome one is the best giving examples to hand-edit files and create system-wide meus and can be found at
Editing System Menus), but I'm more interested in automation. I manage many computers and I would like to write a script to add these to the system menus, but there may be some user customizing, too, so I can't just make one global menu system and deploy it (also some are using Linux Mint and Ubuntu so different menus are necessary).
I'm not sure how alacarte and the one that comes with gnome works.
This is what I hate about many things going to an XML format. Makes command line manipulation difficult. I'm sure there is some module to import for python (which I am in the process of learning), perl, c, etc, but right now, that is a little beyond my scope. But I'm getting pretty good with shell programming.
Thank you for confirming what I was fearing about not being able to use sed for this.
Anyone know of a good python module for me to look into to edit XML files?
With thanks,
Narnie