LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 05-29-2012, 02:22 PM   #1
josephw47
LQ Newbie
 
Registered: Sep 2010
Location: North Carolina
Distribution: centOS 5, RHEL 5/6, SLES10/11, VMWare, Backtrack 4, Ubuntu 10.04
Posts: 20

Rep: Reputation: 0
Unhappy Autologin root user GUI


Hi
I already know I'm probably going to get flamed for this but I need to make SLES 11 automatically log in the root user when the GUI starts.

(Hopefully this will limit the flames)
I work in a hardware test environment, I can't tell you what I'm working on, but I have a program that tests a specific hardware function within the OS... The program only runs in GUI mode, and in order to automate this software, I have to get the root user logged in at boot in the GUI. I didn't write the program, nor do i have the authority to get the person who wrote it to change it to where it works in the shell.

I would prefer a script that would run at startup that would start the GUI from runlevel 3 and and log in as the root user.... and bash is not my forte'
 
Old 05-29-2012, 03:46 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo, Slackware
Posts: 14,898
Blog Entries: 2

Rep: Reputation: 3811Reputation: 3811Reputation: 3811Reputation: 3811Reputation: 3811Reputation: 3811Reputation: 3811Reputation: 3811Reputation: 3811Reputation: 3811Reputation: 3811
Quote:
Originally Posted by josephw47 View Post
I would prefer a script that would run at startup that would start the GUI from runlevel 3 and and log in as the root user.... and bash is not my forte'
No, what you need is a script that starts your program as root when the normal user is logged in automatically (via the normal display manager functions). This is much safer and won't get you flamed.

At first you have to enable your normal user to start the application as root without giving a password. this can easily be done with sudo. Assuming that your normal user's name is josephw47 and the application is named /usr/sbin/rootapp the entry in /etc/sudoers (configurable with visudo) for that should look like this:
Code:
josephw47 ALL=NOPASSWD: /usr/sbin/rootapp
If that entry is added you can test your application with
Code:
kdesudo rootapp
if you use KDE or
Code:
gksudo rootapp
if you use Gnome or XFCE. If you can start the app successfully this way just add an entry with that command to your GUIs autostart-feature.

Remember, there is never a need to start a whole GUI as root just for one program.

Last edited by TobiSGD; 05-29-2012 at 03:48 PM.
 
1 members found this post helpful.
  


Reply

Tags
autologin, login, root, sles


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
autologin without GUI PFloyd2002 Linux - Software 9 05-21-2013 10:53 AM
[SOLVED] Making my GUI user a root user. LittlePenguin Linux - Newbie 31 08-22-2011 05:21 AM
root user is not logging in gui singh_chitranjan Linux - Server 2 12-13-2010 05:43 AM
Autologin with GUI, and shutdown gregorya Linux - Software 1 06-12-2004 07:18 AM
Loggin into my GUI as root user MackH Mandriva 6 06-08-2004 11:18 AM


All times are GMT -5. The time now is 10:20 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration