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.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

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'

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.