LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-27-2010, 01:01 AM   #1
afreitascs
Member
 
Registered: Aug 2004
Location: Brasil
Distribution: Slackware_Cur-64_mult
Posts: 433

Rep: Reputation: 30
How to make a real logout when exiting KDE in Slack?


hello

I use Slack 13-32 with kde-431, but when in kde logout actually get out of the X-KDE ...

I have that after leaving the kde, type "logout" at the command line ...

How to make a real logout when exiting KDE in Slack?

Thankful
 
Old 04-27-2010, 03:02 AM   #2
sjampoo
Member
 
Registered: Jan 2009
Location: Oosterbeek, The Netherlands
Distribution: Desk and Lap: Slackware13.1 64
Posts: 203
Blog Entries: 4

Rep: Reputation: 27
I Think it's only called 'logout' in KDE, cause when you should load into runlevel 4, you will logon to your machine using the KDE logon screen.

Since Slackware defaults runlevel 3 (terminal) and you thus probably logon in on the CLI, and thus, after starting X/KDE with startx, you will, after logout, come back to where you started: at runlevel 3.

Change your runlevel to 4, and logout will be a real logout. You will not come back tot the commandline, but will be presented a X/KDE logon/logout screen. ( I presume, I don't use any of this )
 
1 members found this post helpful.
Old 04-27-2010, 04:14 PM   #3
afreitascs
Member
 
Registered: Aug 2004
Location: Brasil
Distribution: Slackware_Cur-64_mult
Posts: 433

Original Poster
Rep: Reputation: 30
(SOLVED)How to make a real logout when exiting KDE in Slack?

Quote:
Originally Posted by sjampoo View Post
I Think it's only called 'logout' in KDE, cause when you should load into runlevel 4, you will logon to your machine using the KDE logon screen.

Since Slackware defaults runlevel 3 (terminal) and you thus probably logon in on the CLI, and thus, after starting X/KDE with startx, you will, after logout, come back to where you started: at runlevel 3.

Change your runlevel to 4, and logout will be a real logout. You will not come back tot the commandline, but will be presented a X/KDE logon/logout screen. ( I presume, I don't use any of this )
Hello

It makes sense for your replies ... I'll check when I get home ... I'm actually using init3

Thank you very much :-)

ps: I'm currently using the windows

ps2:Resolved but I think it is a security breach especially for those using KDE at Slack and init3 ...

Last edited by afreitascs; 04-27-2010 at 11:44 PM.
 
Old 04-28-2010, 02:56 AM   #4
sjampoo
Member
 
Registered: Jan 2009
Location: Oosterbeek, The Netherlands
Distribution: Desk and Lap: Slackware13.1 64
Posts: 203
Blog Entries: 4

Rep: Reputation: 27
Quote:
Originally Posted by afreitascs View Post
I think it is a security breach especially for those using KDE at Slack and init3 ...
Why?

It says 'logout',.. and gets you out of X/KDE, back to the prompt where you where, just before you started X.

It's very clear to you that you are back at a prompt, logged out of X/KDE but still logged in to you system ( hence the prompt: 'yourname@compname:' )

But okay, yes, it's a security breach, but only if you leave your computer alone, still powered on, without logging of, or even checking if the system goes a complete shutdown after clicking 'logout' in KDE.

Problem is: Who's to blame if the computer ain't powered off, left running (at TTY1) for ages, in the end catches fire and burns down your house?? Is it X/KDE/Slackware or just the ignorant user?

*pardon the rant*
 
Old 04-28-2010, 06:18 AM   #5
veeall
Member
 
Registered: May 2007
Location: Estonia
Distribution: Slackware64-current
Posts: 258

Rep: Reputation: 43
Code:
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
  xinit
  #startx
  logout
fi
This in ~/.bash_profile should log user out from console upon ending the X session on tty1. Also it automatically launches xinit (or startx) when loging in at runlevel 3.

Taken from the how-to's found on internet.

Last edited by veeall; 04-28-2010 at 06:20 AM.
 
Old 04-28-2010, 06:35 AM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,299

Rep: Reputation: 321Reputation: 321Reputation: 321Reputation: 321
Another thing you could is instead of issuing startx, do 'init 4' as root which will bring you into runlevel 4 from 3.
 
Old 04-28-2010, 10:49 AM   #7
vbatts
Member
 
Registered: Jun 2005
Location: Raleigh, NC, USA
Distribution: slackware
Posts: 83

Rep: Reputation: 58
the simplest solution may be to prefix your command with 'exec', which will kill the parent shell.
Code:
 exec startx
that way when your X session exits, the parent shell will already be exited.

take care,

Last edited by vbatts; 04-28-2010 at 10:52 AM.
 
1 members found this post helpful.
Old 04-28-2010, 11:53 PM   #8
afreitascs
Member
 
Registered: Aug 2004
Location: Brasil
Distribution: Slackware_Cur-64_mult
Posts: 433

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by vbatts View Post
the simplest solution may be to prefix your command with 'exec', which will kill the parent shell.
Code:
 exec startx
that way when your X session exits, the parent shell will already be exited.

take care,
I liked !

$exec startx

very good !

I do not like to use init4 ...

many thanks :-)
 
Old 04-30-2010, 05:10 AM   #9
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 4,065

Rep: Reputation: Disabled
If you use (one of) the red button(s) of KDE you can simply change the command connected to it to "shutdown -h now" e.g. by using the menu editor.
 
Old 05-01-2010, 03:54 PM   #10
afreitascs
Member
 
Registered: Aug 2004
Location: Brasil
Distribution: Slackware_Cur-64_mult
Posts: 433

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by JZL240I-U View Post
If you use (one of) the red button(s) of KDE you can simply change the command connected to it to "shutdown -h now" e.g. by using the menu editor.
I do not think that is a solution, because let's say the user needs to go to the shell (x install nvidia drivers for example).
In my case the best solution is even a replica of vbat ("exec startx"), because besides not mischaracterize the role of the "red button" KDE takes the output of the X-KDE automatically to the shell-logout, even init3 using ...

on the other hand it is still perhaps an alternative for someone will ...

many thanks for replica
 
Old 05-03-2010, 02:49 AM   #11
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 4,065

Rep: Reputation: Disabled
No, that is not the way KDE is organized on my SuSE box since 6.3 (actual version 11.2). The red button pops up a menu which lets you chose complete shutdown, restart, end session (logout and fall back to kdm) and one other I don't remember since I don't use it. With the menu editor you could change one of those or create an additional one to exit X (if that is what you want).

Alternatively you go back to kdm which has another button and menu which lets you end KDE (I think. I'll have to look tonight).

Why don't you use a console via <Ctrl><Alt<Fn> when you need one?

Last edited by JZL240I-U; 05-03-2010 at 02:52 AM.
 
Old 05-03-2010, 02:02 PM   #12
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,366

Rep: Reputation: 835Reputation: 835Reputation: 835Reputation: 835Reputation: 835Reputation: 835Reputation: 835
That assumes runlevel 5 in other distros and runlevel 4 in Slackware. The OP is using runlevel 3 -- ie a console login with no graphical display manager. The desktop environment cannot remove its own running process in addition to shutting down the computer afterwards, since it was launched from a console. Though technically you could include something like `shutdown -h now` in a custom menu entry, it would crash your KDE session on its way down, and seeing that KDE likes to end its life under its own control I don't know what that will do to your KDE configuration files over time.
 
Old 05-04-2010, 02:34 AM   #13
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 4,065

Rep: Reputation: Disabled
Quote:
Originally Posted by T3slider View Post
...The desktop environment cannot remove its own running process in addition to shutting down the computer afterwards, since it was launched from a console...
Why is that so? Can you explain? I thought something like a issued command-queue should be able to shut down first KDE and then the system in a controlled fashion, where is my misconception?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
'make' error msg when exiting chap 5 env hrp2171 Linux From Scratch 2 01-31-2007 06:39 PM
vnc session is not exiting at logout marozsas Linux - Software 3 07-18-2006 03:53 PM
kde kicker crash while exiting kde but why? towsonu2003 Linux - Software 6 10-04-2005 11:08 PM
Help! slack 10 locks up when exiting xorg 6.7.0 wine Slackware 5 10-25-2004 11:15 PM
Slack 10 is *CRASHING* on KDE Logout tubatodd Slackware 10 07-02-2004 12:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:56 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration