Setting Linux Mint configuration information using files

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
dnessett
Level 1
Level 1
Posts: 36
Joined: Fri Jan 20, 2023 1:47 am

Setting Linux Mint configuration information using files

Post by dnessett »

This post follows up on one I made earlier (viewtopic.php?f=208&t=389894). I am configuring a large number of laptops (up to 20) for use by Grade School children (grades 5-8) and would like to remove some options. Since going to the Desktop of each laptop and doing this by hand would be a lot of work, I am looking for a way to remove these options by changing some file values. I can do that for all laptops at once using a configuration management application such as Salt.

The information I wish to remove from the Desktops of these laptops include:

+ Remove the ability of the students from accessing the Update manager.
+ Turn off the feature where the laptops automatically adds printers it sees over WiFi.
+ Turn off Lock Screen for each laptop.
+ Turn off the ability of students to right click the Menu icon and click on "Configure Menu".
+ Remove some of the icons pinned by default (specifically, Firefox, since the students will use the Chrome browser). Also, change some file data so Chrome is pinned.
+ Turn off the ability of students to select wallpaper for the laptop (the laptops will be shared and it is preferable that they all show the same wallpaper).
+ Disable the menu editor for some users (there will be a root user on each laptop that should have the ability to use the Menu Editor, but not the normal student).
+ Remove the update and reports icons on the right hand lower side of the laptop).

If there is anywhere that explains how to configure the laptops as described above by modifing file data, just point me to it and I will follow the instructions given. Otherwise (and I know this is a big ask), if anyone or a number of experienced system admins know the answers, I would greatly appreciate it if they would share their knowledge.

Added later: I can configure one laptop using its Desktop with the features mentioned above. If I know the location of the files changed and I can move them in bulk to the other laptops that would work
Last edited by LockBot on Sat Jul 29, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
dnessett
Level 1
Level 1
Posts: 36
Joined: Fri Jan 20, 2023 1:47 am

Re: Setting Linux Mint configuration information using files

Post by dnessett »

Maybe I was asking for too much at once in this question.

Let's start with turning off the update manager. It is possible to turn off the GUI for the update manager on a per user basis. Under settings, select startup applications and there is a slider that turns it off. So far, so good. However, there is nothing in /home/<user>/.config/menu/cinnamon-applications.menu that changes when this slider is changed. This suggests that the startup apps are controlled somewhere else in the users environment. Does anyone know what file changes when startup applications are disabled?
dnessett
Level 1
Level 1
Posts: 36
Joined: Fri Jan 20, 2023 1:47 am

Re: Setting Linux Mint configuration information using files

Post by dnessett »

I should have done some investigation before posting my second question. It turns out there is a directory in ~/.config called autostart. When you disable the update manager a file is placed in this directory with the name "mintupdate.desktop". At the end of that file is an entry: X-GNOME-Autostart-enabled=<true of false), which if set to false disables the update manager GUI application for the user.
User avatar
zcot
Level 9
Level 9
Posts: 2798
Joined: Wed Oct 19, 2016 6:08 pm

Re: Setting Linux Mint configuration information using files

Post by zcot »

You could mention the system version and desktop.

What you are proposing is quite a bit at once in a lot of different directions.

You can use the "Guest session" login, and that will eliminate almost all of the issues you present. The system is not persistent and will revert to default upon the next login of the next Guest. In this way, a user can set a background, mangle the menu, the lock screen will have no password, none of it matters when you log out and back in. The user would rely on a usb stick or something as far as persistent files or documents. sudo is disabled in many areas, but open with some, but only in that it would still require a known password which we assume they will never know, so they not getting anywhere. The update manager and system reports icons are not present although you could try to start those programs but they will not get you anywhere because a password will be required at some point.

The /etc/skel/ scheme, this is used in regard of when creating new users, it should give a skeleton basis, could be used for something I would imagine, maybe you want to have a chrome shortcut on the desktop, or might be able to do a specific custom configuration file for example of the panel items.

Look into the guest session and see how that feels for you. Really the only drawback being that it will require a usb stick or other to save files, but on the other hand that's a huge plus for you in the end. They should be responsible for their own data, not you?

Otherwise it's a good few steps managing all the elements here, assuming each student will create their own user space and now each unit has a handful of users each and they can only use that system because the specific user space will be store physically in that place. If you decide to make a change then you are not only changing each machine but changing each user space within that machine. It looks like a management headache for me and possibly having to deal with a specific user's space because "whatever", whereas if you just keep it all generic then they are automatically locked out of anything too powerful, any changes are automatically reverted, I'm keying in on the "automatic" phrasing here, and most everything is automatic, even your management could come in a form of automation from the instructors desk and just log into each unit probably with a scripted loop for some automatic maintenance now and then.
Petermint
Level 9
Level 9
Posts: 2981
Joined: Tue Feb 16, 2016 3:12 am

Re: Setting Linux Mint configuration information using files

Post by Petermint »

An alternative to guest is a configuration script. That could include setting up a different user with limitations.

One thing you can do is compare two systems using Meld to see differences. I sometimes image a partially configured system, make a change, then image again. You can mount the images and use Meld directory compare to find changes then put the changes into a script.

Another option is to configure one then create an image and use the image to create the others. Their SSH keys and some other things would be identical.
mikeflan
Level 16
Level 16
Posts: 6985
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Setting Linux Mint configuration information using files

Post by mikeflan »

Disable the menu editor for some users
That is a reasonable request. I'm not sure how to get that done.
For one, you did not mention your desktop. And these links are kinda old:
For Mate:
viewtopic.php?p=578188#p578188

Old info:
https://www.linux.com/news/lock-down-gn ... -pessulus/
https://www.addictivetips.com/ubuntu-li ... -pessulus/
User avatar
AndyMH
Level 21
Level 21
Posts: 13585
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Setting Linux Mint configuration information using files

Post by AndyMH »

To turn off auto discovery of printers:
viewtopic.php?p=2086822#p2086822
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
User avatar
Pjotr
Level 23
Level 23
Posts: 19890
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Setting Linux Mint configuration information using files

Post by Pjotr »

Like zcot advised: use the Guest session. This is how to enable it, and also how to tweak it:
https://easylinuxtipsproject.blogspot.c ... t.html#ID1
(item 1)
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
dnessett
Level 1
Level 1
Posts: 36
Joined: Fri Jan 20, 2023 1:47 am

Re: Setting Linux Mint configuration information using files

Post by dnessett »

zcot wrote: Wed Feb 01, 2023 9:03 pm You could mention the system version and desktop.

What you are proposing is quite a bit at once in a lot of different directions.

You can use the "Guest session" login, and that will eliminate almost all of the issues you present. The system is not persistent and will revert to default upon the next login of the next Guest. In this way, a user can set a background, mangle the menu, the lock screen will have no password, none of it matters when you log out and back in. The user would rely on a usb stick or something as far as persistent files or documents. sudo is disabled in many areas, but open with some, but only in that it would still require a known password which we assume they will never know, so they not getting anywhere. The update manager and system reports icons are not present although you could try to start those programs but they will not get you anywhere because a password will be required at some point.

The /etc/skel/ scheme, this is used in regard of when creating new users, it should give a skeleton basis, could be used for something I would imagine, maybe you want to have a chrome shortcut on the desktop, or might be able to do a specific custom configuration file for example of the panel items.

Look into the guest session and see how that feels for you. Really the only drawback being that it will require a usb stick or other to save files, but on the other hand that's a huge plus for you in the end. They should be responsible for their own data, not you?

Otherwise it's a good few steps managing all the elements here, assuming each student will create their own user space and now each unit has a handful of users each and they can only use that system because the specific user space will be store physically in that place. If you decide to make a change then you are not only changing each machine but changing each user space within that machine. It looks like a management headache for me and possibly having to deal with a specific user's space because "whatever", whereas if you just keep it all generic then they are automatically locked out of anything too powerful, any changes are automatically reverted, I'm keying in on the "automatic" phrasing here, and most everything is automatic, even your management could come in a form of automation from the instructors desk and just log into each unit probably with a scripted loop for some automatic maintenance now and then.
Good point about the system version and desktop. System is 21.1 and the Desktop is Cinnamon.

We will allow students to store data on the laptop. But, home directories will be NFS mounted onto an NFS server. So, when they use a different laptop, they will see the same stuff they put in the home directory on any laptop. In terms of managing the laptops, I am using SALT, which allows configuration of a set of laptops to a common value.

Thanks for the suggestions.
dnessett
Level 1
Level 1
Posts: 36
Joined: Fri Jan 20, 2023 1:47 am

Re: Setting Linux Mint configuration information using files

Post by dnessett »

AndyMH wrote: Thu Feb 02, 2023 1:06 pm To turn off auto discovery of printers:
viewtopic.php?p=2086822#p2086822
Thanks. But, if I understand the approach described in that forum message, everyone on the machine will loose the ability to auto discover printers. This may work, but on every laptop there will be an admin account. I'll have to think through the implications. It is probably OK for the admin to loose the ability to auto find printers, but I was hoping there was a way to turn off printer auto discovery on a user basis rather than a machine basis.

Added on 2/3/23: After thinking it over, I don't think there is a way to turn off auto discover for one user and keep it for another. Printers are a machine level resource, not a user level one.
dnessett
Level 1
Level 1
Posts: 36
Joined: Fri Jan 20, 2023 1:47 am

Re: Setting Linux Mint configuration information using files

Post by dnessett »

I have spent a lot of time trying to figure out how to eliminate the "Remove Menu" selection when a user right-clicks the Menu icon. I discovered how to remove the "Configure Menu" right click choice by editing the file: ~/.config/cinnamon/spices/menu@cinnamon.org/0.json and edit the entry "menu-layout" to remove the key "menu-editor-button". However, there is no key labeled "Remove Menu" in that entry, so I assume it comes from some other data on the machine.

Does anyone know where that data might reside?
Locked

Return to “Beginner Questions”