LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 03-21-2007, 08:34 PM   #1
Crobat
Member
 
Registered: Dec 2005
Distribution: Slackware 10.2, Slackware 11.0
Posts: 135

Rep: Reputation: 15
KDE shutdown scripts


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?
 
Old 03-21-2007, 09:16 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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.
 
Old 03-22-2007, 06:23 AM   #3
Crobat
Member
 
Registered: Dec 2005
Distribution: Slackware 10.2, Slackware 11.0
Posts: 135

Original Poster
Rep: Reputation: 15
Right-clicking and selecting log out doesn't log her out. It ends the KDE session. She's still logged in under her name.
 
Old 03-23-2007, 06:00 AM   #4
Crobat
Member
 
Registered: Dec 2005
Distribution: Slackware 10.2, Slackware 11.0
Posts: 135

Original Poster
Rep: Reputation: 15
Oh, and of course, the tiny, one lined script would just be this:

Code:
logout
 
Old 03-23-2007, 01:31 PM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Crobat,

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.
 
Old 03-23-2007, 07:17 PM   #6
Crobat
Member
 
Registered: Dec 2005
Distribution: Slackware 10.2, Slackware 11.0
Posts: 135

Original Poster
Rep: Reputation: 15
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.
 
Old 03-24-2007, 12:05 AM   #7
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
You can..

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.

http://www.redhat.com/docs/manuals/l...n-booting.html

the link is for red hat but does contain kewl things that can be done with lilo

you can set lilo to give you a menu like KDE or Console option by passing the init value. just keep 4 as the first for the wife.

not sure if this solves your whole problem... just the bootup one.

Last edited by Hern_28; 03-24-2007 at 12:19 AM.
 
Old 03-24-2007, 10:02 AM   #8
Crobat
Member
 
Registered: Dec 2005
Distribution: Slackware 10.2, Slackware 11.0
Posts: 135

Original Poster
Rep: Reputation: 15
That's a bit better. That's more what I'm looking for. I'll give that try a run through, and see what happens.
 
Old 05-23-2007, 01:03 AM   #9
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
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:
Code:
startx && logout
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New install, questions on xorg and shutdown scripts Randux Arch 0 03-01-2006 07:28 AM
shutdown scripts? mushmaster Linux - Software 5 02-15-2005 06:23 PM
Emergency Shutdown scripts? samroberts Linux - Enterprise 3 10-29-2004 04:48 AM
Where do you place shutdown scripts? zer0halo Linux - Newbie 3 08-24-2004 03:43 PM
Want to run a few scripts before KDE shutdown, where can I add them. Brian1 Linux - Software 6 06-16-2004 06:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration