Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: HOWTO: Automatically login to XFCE without a login manager

  1. #21

    Re: HOWTO: Automatically login to XFCE without a boot loader

    Thanks for this. I had been looking for a way to lighten the load on a 750Mhz laptop, and the first thing I wanted to dump was gdm. I needed the autologin though.

    This worked perfectly under an extremely lightweight Xubuntu 6.06.1 system after installing build-essential. It's very nice to be able to automatically log in without the desktop manager.

    Thanks again!

    EDIT: I should mention I didn't have the same luck on an Edgy installation, but I blame that mostly on all the weird tweaks and modifications I've done since I installed it. I'll try some other time on a fresh build and see if it works ... maybe once Edgy is fully stable.
    Ubuntu user #7247 :: Linux user #409907
    inconsolation.wordpress.com

  2. #22
    Join Date
    Nov 2004
    Location
    Bydgoszcz, Poland
    Beans
    78
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HOWTO: Automatically login to XFCE without a boot loader

    I just would like to tell that it works on Debian Sarge too.

    Great.

    Thx.

    DANIeL

  3. #23

    Re: HOWTO: Automatically login to XFCE without a boot loader

    Quote Originally Posted by K.Mandla View Post
    I'll try some other time on a fresh build and see if it works ... maybe once Edgy is fully stable.
    If you've tried this autologin under Edgy and had no luck, here's the reason.

    The upstart boot sequence, as I understand it, abandons inittab, and instead uses a series of files under /etc/event.d/ to spawn tty consoles.

    That means each console has a separate tty file inside /etc/event.d/ ... edit tty1 in the same way you would for inittab, to get the autologin working. In other words. ...

    Code:
    # tty1 - getty
    #
    # This service maintains a getty on tty1 from the point the system is
    # started until it is shut down again.
    
    start on runlevel-2
    start on runlevel-3
    start on runlevel-4
    start on runlevel-5
    
    stop on shutdown
    
    respawn /sbin/getty -n -l /usr/local/sbin/autologin 38400 tty1
    That should do the trick for you. Cheers! 8)

    P.S.: I should mention that this is only the case for Edgy post-Knot 2, which means if you install from Knot 1 or 2, and don't find those files, you should either use the old system for Dapper, or dist-upgrade to the new bootup system. There is some related information here.
    Ubuntu user #7247 :: Linux user #409907
    inconsolation.wordpress.com

  4. #24
    Join Date
    Nov 2006
    Beans
    1

    Re: HOWTO: Automatically login to XFCE without a boot loader

    I get the following error message any ideas what's up?

    autologin.c: In function ‘main’:
    autologin.c:1: warning: incompatible implicit declaration of built-in function ‘execlp’
    autologin.c:1:62: warning: no newline at end of file
    /usr/bin/ld: crt1.o: No such file: No such file or directory
    collect2: ld returned 1 exit status

  5. #25
    Join Date
    Feb 2006
    Location
    Hatboro, PA
    Beans
    2,528
    Distro
    Ubuntu Development Release

    Re: HOWTO: Automatically login to XFCE without a boot loader

    silly me, i just started a new thread on a problem i had with this... my openbox startup script is written to start gnome-volume-manager, but when doing the autologin sequence, it doesn't seem to load. and then, when i try to write files to my manually mounted external drives, i find them "unwritable." ideas?

    more specifics are @ my thread (http://ubuntuforums.org/showthread.php?t=363713)

    ================================================== ============
    EDIT:

    nevermind... i just dumped gnome-volume-manager and went with ivman... works; not sure why, but it does.
    Last edited by moore.bryan; February 17th, 2007 at 06:42 PM.
    Asus EeePC 1005HA: ElementaryOS Luna | Asus X501A: Windows 8.1 & Ubuntu 14.04 Trusty Tahr | Apple iMac G4: Ubuntu 14.04 Trusty Tahr | LG Optimus F3: Psycho Billy ROM | Nexus 10 Cyanogenmod 11

  6. #26
    Join Date
    Jan 2007
    Beans
    7
    Distro
    Ubuntu 6.10 Edgy

    Re: HOWTO: Automatically login to XFCE without a login manager

    Hi,

    To the author - please update the guide and tell ppl. to install build-essentials in order to successfully compile the program? Thanks for the guide btw!

    linuks

  7. #27
    Join Date
    Nov 2006
    Beans
    Hidden!

    Re: HOWTO: Automatically login to XFCE without a boot loader

    Quote Originally Posted by Tobitas View Post
    could you maybe also supply a script for automated shut down, so I dont have to type "sudo halt"?
    thanks
    hello. try this. add this line to /etc/sudoers
    Code:
    %users    localhost=NOPASSWD:/sbin/reboot, /sbin/poweroff
    this makes possible to any user from the users group to invoke sudo reboot or sudo poweroff without the need of typing in root password.
    lastly, make a change in ~/.bash_profile as such:
    Code:
    if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
           startx; sudo poweroff;
    fi
    for me it works like a charm. btw. I don't use any of the xDMs (have GDM in my Debian/Etch installed but disabled), just terminal login with the autologin feature created according to the how-to found in this topic.
    the effect is: when I invoke "log off" from gnome menu, the xserver shuts down and the sudo poweroff command is executed automaticlly (no need to give root password).

    btw. anyone could tell me what are the drawbacks of my solution?

    one quiet annoying thing I found is that when you want to resetart xorg (by ctrl+alt+backspace) the computer goes off, because the power off command is invoked always after the xserver shutdown. a good thing would be to swap this command with the call of some kind of script which could offer choosing, if the user wants to restart or halt the system or just log off (back to text login prompt). I'm not the best in bash programming so if anyone can help, I'd be thankful. the use of ncurser would be nice.
    Last edited by wrrr; October 2nd, 2007 at 06:35 PM. Reason: found a drawback

  8. #28
    Join Date
    Jul 2006
    Location
    Here
    Beans
    9,689

    Re: HOWTO: Automatically login to XFCE without a boot loader

    Quote Originally Posted by wrrr View Post
    hello. try this. add this line to /etc/sudoers
    Code:
    %users    localhost=NOPASSWD:/sbin/reboot, /sbin/poweroff
    this makes possible to any user from the users group to invoke sudo reboot or sudo poweroff without the need of typing in root password.
    lastly, make a change in ~/.bash_profile as such:
    Code:
    if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
           startx; sudo poweroff;
    fi
    for me it works like a charm. btw. I don't use any of the xDMs (have GDM in my Debian/Etch installed but disabled), just terminal login with the autologin feature created according to the how-to found in this topic.
    the effect is: when I invoke "log off" from gnome menu, the xserver shuts down and the sudo poweroff command is executed automaticlly (no need to give root password).

    btw. anyone could tell me what are the drawbacks of my solution?
    looks okay to me, i do mine a little different(using debian+xfce4).no compiling needed, i apt-get mingetty. "user" is my login name.

    Code:
    my sudoers line:
    %nopasswd ALL=(root) NOPASSWD: /usr/bin/conky, /sbin/halt, /sbin/reboot, /sbin/shutdown, /usr/sbin/xfsm-shutdown-helper, /usr/bin/thunar, /usr/bin/mousepad, /usr/sbin/synaptic
    Code:
    my login line(/etc/inittab):
    1:2345:respawn:/sbin/mingetty tty1 --autologin user
    Code:
    bash_profile:
    if [ `tty` = "/dev/tty1" ]; then
    startx
    fi
    Last edited by kerry_s; September 30th, 2007 at 12:45 PM.

  9. #29
    Join Date
    Oct 2006
    Location
    Farnborough, UK
    Beans
    41
    Distro
    Ubuntu Development Release

    Re: HOWTO: Automatically login to XFCE without a login manager

    Please can this be updated to remove "sudo" from the first nano line and from the gcc line, as it is not required.

  10. #30
    Join Date
    Dec 2005
    Location
    Nagoya, Japan
    Beans
    138
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Automatically login to XFCE without a login manager

    Credit to "shallow thoughts" for this.

    First the bad news:
    The login files changed again in Karmic. The file to edit is now /etc/init/tty1.conf but the line is the same.

    The good news:
    You don't need to compile an "autologin" binary - a script containing
    Code:
    #! /bin/sh
    /bin/login -f yourusername
    is enough.
    2004 IBM desktop (2.8GHz P4, 512MB RAM)
    Blatant self-advertising: a restaurant, a band and a sort of Japan blog

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •