Re: startx gdm
Mark Grieveson wrote:
Hello. I'm wondering if there is a way to, without using gdm, have x
started, my user logged in, and fluxbox opened, automatically. Perhaps
a script, or something.
Yes. I haven't tested the following, but I believe it will work (it's
based on the solution googled at
http://www.linux.org.za/Lists-Archives/glug-tech-0511/msg00341.html).
Create a script, say, "/usr/local/bin/sudologin.sh", and put the
following into it:
====
#!/bin/bash
/usr/bin/sudo -u YourUserName -H -i
====
("-H" specified for the sudo process to change the home directory to
YourUserName's home directory; "-i" specifies the process to simulate an
initial login, that is, to run the program specified in /etc/password
for this user.)
chmod 755 the script.
Now, in "/etc/inittab", make the following change:
====
# Format:
# <id>:<runlevels>:<action>:<process>
#
# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
#1:2345:respawn:/sbin/getty 38400 tty1
1:2345:respawn:/usr/bin/getty -l sudologin.sh 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6
====
Edit "/etc/password" so it looks something like:
====
YourUserName:x:1000:1000:Your Real
Name,,,:/home/YourUserName:/usr/bin/startx
====
And finally, edit YourUserName's ~/.xinitrc to have the single line
"fluxbox" in it.
Test it, and let us know if it works.
--
Kent
Reply to:
- References:
- startx gdm
- From: Mark Grieveson <dg135@torfree.net>