Hi AMMRL!
I got a lot of help on this question, for which I’m quite grateful. The problem’s been solved, and in the process a number of tools have been developed and posted to IVAN-Spinsights’ user_library Slack channel. Three families of solutions are posted there:
1) “Userchanges” - a set of scripts for setting a variety of user preferences (such as session management options, screensaver settings, etc) for all CentOS7+KDE users with UIDs greater than a certain threshold.
https://tinyurl.com/y3na9n4w
2) Scripts for creation and propagation of accounts for a single user across all facility CentOS computers: https://tinyurl.com/yybo49vo
3) Scripts for migrating a large number of user accounts to a fresh CentOS computer: https://tinyurl.com/yxqykr2s
First, it was pointed out by a number of people (but John Grimes was especially helpful here) that preferences for things like logging out or powering down can be found graphically by navigating to the lower-left corner of the screen, clicking the “Kickoff Application Launcher" (aka “Start” menu) icon and selecting Computer….System Settings … System Administration…Startup and Shutdown. There, one finds a “Session Management” family of settings where one can change the Default Leave Option away from “Turn off computer” (a terrible default to provide users) to “End Session” (aka “log out”).
BONUS: Just above that, one can un-check the “Offer shutdown options” box, nicely removing the “shut off the computer” option from the user’s choices if they were to seek choices.
ALSO: I was considering checking the “Confirm logout” button, which basically asks the user “Are you sure” when they try to go out. But Jerry Hirschinger strenuously advocated against giving user that option, having spent a lot of time dealing with people who walked away before responding to that dialog. Before he figured out how to disable it, he had a lot of people who couldn’t log in because the previous user hadn’t logged out and the screen was locked, and I’d like to take advantage of his wisdom. Thanks, Hirsch!
In our facility, every user gets their own Linux account on every facility computer (a system to be reconsidered another day), so knowing how to fix the problem when someone is logged in does not resolve the issue for all users. Holger Foersterling pointed out that KDE interface preferences like this are stored in files located in each user’s ~/.kde/share/config directory. (Why the name “share”? That threw me off when searching for recently-modified files, so it was really good that Holger pointed it out). It turns out that all those session management setting are stored in the file “ksmserverrc”. It turns out there are no user-specific components to this file, so one can simply copy it to all user accounts to set their preferences. That’s the basis for the script “userchange1_powersettings” posted to IVAN_Spinsights. And if one places that file in /etc/skel/.kde/share/config, then all future user accounts will have those settings, too.
After exploring a bit, I found a variety of other files that hold user preference settings, like those for screensavers (helpful to ensure they don’t lock a screen with a password if someone leaves the computer idle), etc. Scripts for modifying all user accounts to reflect those settings are also provided in the user_library channel.
A number of respondents indicated interest in the scripts I use in the facility for account creation and propagation. My initial problem arose because I’d just installed a new CentOS7 disk image on a fresh hard drive, and used a “migration” script I developed to populate it with 100+ user accounts, each with the same environment but with their own pertinent user-specific information (e.g., when each opens Topspin the first time, the default directory for their data is their own /opt/nmrdata/<username> directory.) This script is a modified version of one I’ve been using for routine account creation, which itself is a modified version of the one developed by Antoni Jurkiewicz, my predecessor at UChicago.
The core script creates a Linux account when given a username, password, UID, GID, and extra info. After creating the Linux account it automatically calls a second script that sets up Topspin preferences, creates symbolic links, copies MNova license files, etc. on spectrometers, and provides data copying aliases on data servers. After editing one account creation script with user info on one computer, the account is created, and another script is run to copy that user-specific script to other computers, ensuring that the new account will be created on multiple systems with fidelity, keeping the same UID and GID on each system. With the migration script, a .csv file provides the user information, and user accounts are created the same way.
Maybe there’s a better way of managing the and I just missed it, but this is working OK for me now. If you’d like to do something similar to manage your systems, you’re welcome to download the scripts from IVAN-Spisights<
https://app.slack.com/client/T014W8X2HNZ/C0168U16UVC> and try them out.
Many thanks to those who contributed their parts of the solutions: John Grimes, Holger Foesterling, Jerry Hirschinger, Phil Dennison, Walt Massefski, Karen Ann Smith, Simon Sham, Thomas Smith, Robin Stein, Gary Strahan, John Decatur, Jeff Ellena, Bob Berno, and Dee-Hua Huang, and others who expressed interest in seeing the solution.
Thanks for your attention.
- Josh
On Aug 6, 2020, at 10:16 AM, Kurutz, Joseph <jkurutz_at_alumni.caltech.edu<mailto:jkurutz_at_alumni.caltech.edu>> wrote:
Hi AMMRL.
I need help averting disasters with inadvertent shutdowns of my spectrometer computer. The KDE interface for CentOS 7 I just installed makes it easy to shut down the computer, but complicated to log out of a user account. I now have two aims with which I need help:
- Completely disabling the easy shut-down capability
- Making it easier for users to simply log out of their account.
I just gave one spectrometer a new hard drive and installed CentOS 7 + Topspin 3.6.2 from a disk image. On this instrument, every user has their own linux account, complete with their own Desktop. This environment includes a funny little box/button named “Desktop" in the upper-right corner, and clicking it yields a menu with number of irrelevant choices except for the “Leave” button. Clicking “Leave” immediately shuts down the computer with no additional dialog, which is troubling.
I would like to either:
- swap out the “Leave” button for a “Log out” button
- OR delete the “Leave” button
- OR get rid of this “Desktop” box/button entirely
How do I do it? I’ve been poking around a lot of the system preferences, and I can’t find any references to this funny “Desktop” box/button/menu.
I would also like to make it easier for people to log out, preferably with one button in an obvious location that provides an “are you sure?” dialog to prevent inadvertent exit. The current workflow is “click the thing in the lower-left corner”, “awkwardly hover over the red Leave button”, then “choose the “Log Out” option from among the many options.”
Surely there is a better way. What is it, and how do I set it up? I’d appreciate some help from someone with more CentOS 7 / KDE experience than I have.
Thanks for your help. - Josh
University of Chicago Chemistry NMR Facility
https://voices.uchicago.edu/chemnmr/
Received on Thu Sep 17 2020 - 14:00:08 MST