LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-03-2005, 08:42 PM   #1
videoediting
LQ Newbie
 
Registered: Mar 2005
Posts: 8

Rep: Reputation: 0
Activating/Disabling the autologin


I am running Suse Linux 9.2 Pro, full install.

My problem: My cousin comes over from time to time, and although he thinks he knows a lot about computers, he really doesn't. The problem is that he will often try to change settings and end up destroying everything on my computer, forcing me to reformat. I have the computer set up so he can just turn it on, and it will login as guest. If I don't want him using the computer, I would type:
Code:
xlock -mode laser -timeout 1 -password "System Locked by Administrator" -invalid "Access Denied"
This worked until he figured out that if he just pulled the plug and restarted the computer, it would log back in for him and he could use the computer again no problem. Is there a way that with the click of a button I can lock the screen and disable the "autologin on restart" but make it so when I type in the password, the program will unlock the screen and re-enable the "autologin on restart" I guess the best thing would be a C++ program that can enable/disable the autolock, and would call xlock.

something to the effect of:

int main(){
disable autologin
call xlock
while xlock does not return success, keep looping
enable autologin
return 0;
}


I can put this executable on the desktop, and with a single click accomplish my goal. I would be VERY thankful if someone could write a quick program to do this (I understand you guys have lives and probably don't want to do that), so if anyone knows of a quick script or a prewritten program that does this I would be very thankful!

I can probably figure out the xlock calling and checking if xlock is done, but I have no idea how to change the autologin setting. Any help would be hot!
 
Old 04-03-2005, 09:29 PM   #2
tsphan
Member
 
Registered: Jan 2005
Location: Clackamas, Oregon, US
Distribution: Slackware 10.2
Posts: 154

Rep: Reputation: 30
perhaps you can just setup your xsession script to do an automatic xlock. So that everytime you log in, you get an xlock, forcing you to type the password everytime you log in.
 
Old 04-05-2005, 07:52 PM   #3
videoediting
LQ Newbie
 
Registered: Mar 2005
Posts: 8

Original Poster
Rep: Reputation: 0
oh, that is a GREAT idea, thanks!
 
Old 04-05-2005, 10:44 PM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Disabling auto-logon in SuSE 9.2

Here's how to disable auto-login on SuSE 9.x:

su - root
vi /etc/sysconfig/displaymanager:

Look for: "DISPLAYMANAGER_AUTOLOGIN=<name>"

Change the name to <blank>:
Set "DISPLAYMANAGER_AUTOLOGIN="

'Hope that helps .. PSM
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
autologin zaicheke Linux - General 1 07-16-2004 07:15 PM
autologin on RH 7.2 mehesque Linux - General 0 06-08-2004 08:16 AM
disabling autologin nacha Debian 5 05-30-2004 05:45 PM
disabling x-windows autologin in Suse .0 ako Linux - Newbie 6 02-11-2004 01:30 AM
SSH and autologin? presstone Linux - General 8 03-12-2003 08:40 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:57 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