Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm slowly getting my wife interested in Linux. In order to do this, I need to try and hide the terminal as much as possible (and it gives me something to do )
So, I'm looking for something that should be easy, but I can't figure out where to put the script. When she chooses to end her KDE session, I want a script to run that will log her out. However, I don't want to change my run level, because I like staying with the prompt when I'm using the box.
So the question is, where can I put this tiny, one-line script?
Why bother with a script? Just instruct her to right-click on an empty part of the desktop. Then, in the dialogue box that comes up, click on 'logout <username>'. That logs her out, and returns to the login prompt box.
As an aside, without seeing the 'tiny, one-line script', I'm at a loss for what to suggest.
How are you starting your KDE session? Are you typing startx ?
You should set your initdefault in /etc/inittab to be 2 (or 5, depends on your distro, it should explain the different options in the file comments), so you boot straight into the KDE graphical login screen.
When you get into KDE, you need to look at "System settings" - "KDE Components" - "Session Manager".
Here is where you check "Offer Shutdown Options". These will be offered at logout as a choice of "Login as different user / End session", "Shutdown Computer", "Restart Computer".
Then you need to look at "System settings" - "Login Manager" - Shutdown. Here set "Allow everybody to shutdown".
Then I think you'll have what you / your wife wants.
For Slackware, it's run level 4. However, I don't want to boot straight into KDE. My wife, however, does. I like working from the command prompt a lot more, however my wife is terrified of it.
If there is a place where I can set the runlevel differently for a different user (we have separate login accounts), then this would be a way to approach this. However, the runlevel is in /etc/inittab, which is read at bootup IIRC, before the login sequence, meaning that I'd have to login to KDE. This is NOT what I want for me, but what my wife would love.
Right now I do use startx to start KDE. For my wife, I put this command in .bash_login, so as soon as she logs in, KDE pops up for her. However, I often come to the computer, and have the command prompt, her still logged in, facing me. She just hates typing things at the command prompt, and I always have to make her logout.
I hope this is possible. I know Linux is very customizable, but I do realize there are some limitations somewhere. I hope I explained this scenario much better.
If what you are wanting to do is boot to the command prompt when you want to hold the shift key during boot ( if you have 0 wait on lilo ) type the name you gave slackware (linux for me) then "init 3" and you will boot to the command prompt and "init 4" for kde and such.
If you haven't found a workable solution to this yet, you might try it this way (there's something similar in another thread here, but I can't find it at the moment). My wife also uses my PC and likes to use KDE. I started off just putting startx in her ~/.bash_profile but she didn't like manually logging out afterwards. I use the following instead now in her ~/.bash_profile and it works fine:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.