Using the command line, how can I customise the list of default applets shown on the top panel?
I am setting up a box (14.04. I believe this also applies to 15.10, but I am yet to run 16.04) for Linux newbies and everyone initially complains that it isn’t obvious how to log out so I would like to automatically add the logout applet to the top panel when creating new user accounts.
I would like to script this to help me with new installs.
Hey devbie
So I've looked around and I haven't found a way to do what you want but I might have another lead for you to explore.
The mate-panel command has an option to set the default panel layout, and you can save a custom panel layout using the MATE Tweak tool.
Combining those two maybe you can script an automatic replace of the layout in the default files for news users? (Maybe /etc/skel/.bashrc or something)
Cheers
Edit: after a bit more research and deriving an answer posted on the MATE forums to a similar question I've managed to pop a logout button in my top panel at position 1400 (I have a large screen) using this code: Dirty mate-panel hack - Pastebin.com
It is my understanding that "toplevel-id" can vary. Mine was "top". Find yours using the command:
I am after a system-wide solution as I am setting up a system for Linux newbies (it’s a data acquisition system and the users aren’t necessarily computer savvy, nor interested in tinkering with Linux)
Thanks for looking into this. I don’t understand the fundamentals of MATE’s configuration, nor gsettings - can you suggest a good source of information? - and so I didn’t quite appreciate all of your proposed solution.
This is what I came up with:
I have found the default layout for Ubuntu Mate 14.04:
Once I have made a backup, I used MATE Tweak to load it, added the ‘log out’ applet to the top panel and locked it. I then saved the layout (from within MATE Tweak itself. You don’t get to choose the file name (odd!); it defaults to:
Ideally I would prefer to know how to set the default layout to $(whoami)-tweak.layout so that I wouldn’t have to change ubuntu-mate-indicators.layout
Any new user account is set to use the default layout, which has now been modified to suit my needs (no need to fiddle with /etc/skel). Job done!
I’m sure there is a more elegant/proper way to do this - ideally I would like to find a solution that I can squeeze into a script - and I would welcome any feedback to point me in the right direction.
I am new to containers (I’ve only just started playing with Docker) and your link will make for an interesting read. However, isn’t that overkill for adjusting the default desktop layout?