GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I start my X server from my /etc/inittab. Now I want to start the X server with the Gid and Uid of my ordinary user. So which is the group and uid of Init?
To see the user and group init is running as you can type:
ps -eo cmd,user,group |grep init
This shows the command, user and group for processes and the grep limits output to init. You should see something like:
init [5] root root
So init is running as user root and group root. You could use uid,gid instead of user,group if you want the numeric values from /etc/passwd (user) and /etc/group (group) instead of the names.
init is the parent process of all other processes on the system. It can NOT be started manually or killed and you should not muck with how it starts.
Typically what is running in inittab is run as root so you'd have to modify the the "command" portion of the inittab entry to have an "su - <user> -c" in front of a command (or have it in a script and use that as the command). However, I don't know that you can run X Windows itself as a non-root user. Note that even though X Windows is being started by root user it doesn't grant access - you still have to login to the X login screen as either the root or the non-root user of your choice. Why do you think you need to change it to a non-root user?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.