LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 05-30-2004, 05:20 PM   #1
Cobra133
LQ Newbie
 
Registered: Oct 2003
Location: Atlanta/Savannah, GA
Distribution: slackware/mandrake
Posts: 21

Rep: Reputation: 15
Unhappy Two Questions: autologin to X, and setting the adding a user to a group.


Hi, I'm doing some custom Linux development for a consumer device. I've decided to use Slackware because A: its fast, B: its stable.

There is a catch to all of this though.

Background info:

Once the linux box boots up it will only run one program.
The program is a java based program which does some analysis and communicates through a serial port using the RXTX drivers. The only input device which will be connected to this box is a mouse. There will be no keyboard.

Question 1)

How do I autologin as a specified user in X? For example, I need the system to automatically boot into KDE and start this one application, lets call it APPX, when the system is turned on. I've got the inital boot level set at 4 right now. Thats fine when i have a keyboard, but not when i only have a mouse to login to the system with.

Question 2)

I've been trying to access the serial port using the RXTX driver for sometime now. I can do it when I'm logged in as root with no problems. I can't do it logged in as a normal user. Whenver i try, i get this error which states that my current use must be a member of group "uucp". I've tried editig the /etc/group file but that didn't seem to do it. I've even tried adding my current user to the root group and that didn't work. (It also didn't give me root privilages). How do I alter my user settings to allow me to be a member of group "uucp"?

Thanks!
 
Old 05-30-2004, 05:39 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Re: Two Questions: autologin to X, and setting the adding a user to a group.

Quote:
Originally posted by Cobra133
Question 1)
How do I autologin as a specified user in X? For example, I need the system to automatically boot into KDE and start this one application, lets call it APPX, when the system is turned on. I've got the inital boot level set at 4 right now. Thats fine when i have a keyboard, but not when i only have a mouse to login to the system with.
Have a look at
</your prefix>/kde/share/config/kdm/kdmrc
You can set autologins there ...
May I suggest NOT to fire up kde if you just need one application?
Rather give that user a personalised .xsession file that starts that
one application...

Quote:
Question 2)

I've been trying to access the serial port using the RXTX driver for sometime now. I can do it when I'm logged in as root with no problems. I can't do it logged in as a normal user. Whenver i try, i get this error which states that my current use must be a member of group "uucp". I've tried editig the /etc/group file but that didn't seem to do it. I've even tried adding my current user to the root group and that didn't work. (It also didn't give me root privilages). How do I alter my user settings to allow me to be a member of group "uucp"?
What does the uucp entry in /etc/group look like, and what's
the related users numeric ID?


Cheers,
Tink
 
Old 05-30-2004, 05:39 PM   #3
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
For autologin read carefully the docs for kdm, try the control center from kde and see session options for autologin.

For your other question, look at /etc/group if group uucp exist if not do as root
/usr/sbin/groupadd -g 14 uucp
and add your user to the group by edit /etc/group and type his name in the uucp line.

[edit]

Sorry for redundant answer I didn't see that Tinkster already did a reply

Last edited by keefaz; 05-30-2004 at 05:41 PM.
 
Old 05-30-2004, 05:56 PM   #4
Cobra133
LQ Newbie
 
Registered: Oct 2003
Location: Atlanta/Savannah, GA
Distribution: slackware/mandrake
Posts: 21

Original Poster
Rep: Reputation: 15
how would i go about starting a personalized x session?

here is the entry in the /etc/group file:

uucp::14:uucp,user

user is the user i want to add (named, you guessed it, user)
 
Old 05-30-2004, 06:08 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Well now, that looks correct. Membership changes like
that however only get picked up on a new login. Does
it still not work after having logged out and back in?



Cheers,
Tink
 
Old 05-31-2004, 05:31 PM   #6
Cobra133
LQ Newbie
 
Registered: Oct 2003
Location: Atlanta/Savannah, GA
Distribution: slackware/mandrake
Posts: 21

Original Poster
Rep: Reputation: 15
yes, i've restarted the computer twice and it doesnt work. Could it be that the JVM has its own user/group?
 
Old 06-01-2004, 06:35 AM   #7
Cobra133
LQ Newbie
 
Registered: Oct 2003
Location: Atlanta/Savannah, GA
Distribution: slackware/mandrake
Posts: 21

Original Poster
Rep: Reputation: 15
I've got it working now. Though i do have one question. How do create a custom .xsession that only boots one program?
 
Old 06-01-2004, 11:20 AM   #8
sio
Member
 
Registered: Jul 2003
Location: Louisiana, US
Distribution: Slackware
Posts: 129

Rep: Reputation: 15
Heres a thought for you on doing it
here i have kmail and my program of choice

1) as root navigate to

/etc/X11/xinit

2) Create a text file and name it xinitrc.kmail

3) past this in as follows to have something to play around with

Quote:
#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
xmodmap $usermodmap
fi

# start some nice programs

twm &
kmail -geometry 1024x768+0+0 &
exec xterm -geometry 80x66+0+0 -name MyCompany
this is taken straight from the xinitrc.twm minus all the xterms it starts. At the bottom you'll notice it starts twm. Just a window manager that uses a hell of a lot less resources than kde. As someone said above if all you want to start is one program to initialize kde unless its a must for some bizarre reason.

Next you'll notice it starts kmail with the geometry set as 1024x768+0+0. The first two numbers are obviously the the size of the box and should be set to whatever the screen resolution is. The +0+0 are the x and y coordinates of the top left corner of the program. Thus if the x and y are set to 0 and 0 and the size of the box is set to the screen resolution, the program will start taking up the entire screen.

The exec xterm... is necessary for twm to start, work, and get kmail going. Plus it will provide you with a terminal to 'su' with and fix things if you need to and then you can exit 'su' and issue the kmail -geo... or have a script to do it and have the program back up.

Now save the file

4) from /etc/X11/xinit

rm xinitrc
ln -s xinitrc.kmail xinitrc

Remove the current link which is whatever you chose as your default X session such as kde, gnome, etc and create a new link to what you just created.

5) issue startx et voila

Now im not exactly in a position to try this out at the moment but see if you follow me.

in /etc/X11/xinit
rename xinitrc.kde to xinitrc.other
then rename your xinitrc.kmail to xinitrc.kde
and then link xinitrc to xinitrc.kde

google and find out the command line to start the kde control panel and then go in and setup the autologin stuff and it should try and start the xinitrc.kde maybe

Of course now im just plain hacking around ( like i wasn't before )
This would enable you to boot the computer up straight to your program and if you need to, close your program and get to the xterm, launch kde control panel and make changes to what user is booting up.

The only thing left from that would be securing things up to keep people from messing around with it.

Just some thoughts
 
Old 06-01-2004, 02:43 PM   #9
Cobra133
LQ Newbie
 
Registered: Oct 2003
Location: Atlanta/Savannah, GA
Distribution: slackware/mandrake
Posts: 21

Original Poster
Rep: Reputation: 15
thanks alot, your answer really helped!
 
  


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
adding user to group ryancoolest Linux - Newbie 9 04-14-2008 12:50 PM
adding user to wheel group tied2 *BSD 10 09-28-2007 04:22 AM
Adding new group to existing user ALF Linux - Software 7 05-08-2006 09:35 PM
after adding user to group peter72 Linux - General 2 08-01-2005 10:17 AM
adding user to a group Chilipepa Linux - Newbie 2 09-27-2003 11:08 AM

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

All times are GMT -5. The time now is 06:33 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
Open Source Consulting | Domain Registration