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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: For KDE: Re: how to hide the mouse pointer
    ... The 'file' command will recognize the file as a script, ... specifies to the shell interpreter to use bash instead of the default ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • RE: forwarding logs
    ... Same with another script. ... >> You should not need to cange anything in the log script itself. ... >> Reuben D. Budiardja ...
    (RedHat)
  • RE: forwarding logs
    ... Same with another script. ... >> You should not need to cange anything in the log script itself. ... >> Reuben D. Budiardja ...
    (RedHat)
  • brute force ssh login attempts and how to Disrupt them
    ... My head ... and I heard a rhythmic tick-tock coming from ... back, the idiot was gone so apparently, the script gives up ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: CD to acc
    ... I m learning python, so thought i should write small py script to ... os.system (cmd) ... Run this script, while you are in the mounted CD ROM dir... ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)