![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Quad Shot of Ubuntu
![]() |
HOWTO: Automatically login to XFCE without a login manager
I based this post of one made in the Hoary section by "peekpt" with some updates for breezy and later versions of ubuntu.
Are you tired off typing logins? Don't want to load heavy login managers? This guide let's you have autologin and autostart for your XFCE: Let's open a console and then create the file autologin.c Code:
sudo nano autologin.c Code:
int main() { execlp( "login", "login", "-f", "your_user_here", 0); }
Let's compile.. you will need to have gcc-3.4 installed so if you dont you need to Code:
sudo apt-get install gcc-3.4 Code:
sudo gcc-3.4 -o autologin autologin.c Code:
sudo cp autologin /usr/local/sbin Code:
sudo nano /etc/inittab Code:
1:2345:respawn:/sbin/getty 38400 tty1 Code:
1:2345:respawn:/sbin/getty -n -l /usr/local/sbin/autologin 38400 tty1 Code:
#1:2345:respawn:/sbin/getty 38400 tty1 1:2345:respawn:/sbin/getty -n -l /usr/local/sbin/autologin 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 let's make the autostart: Code: Code:
nano .bash_profile Code:
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
startxfce4
fi
Code:
sudo apt-get remove gdm xdm kdm I used this page as guide: http://www.dicas-l.unicamp.br/dicas-l/20030129.shtml Notes If you don't use xfce you can also run startx at startup using Code:
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
startx
fi
To undo the changes you have made just edit the inittab file and uncomment the line you commented and comment out the line you added. Code:
sudo nano /etc/inittab
__________________
Regards, Haegin If all else fails curl up in bed with a good book. "<mc44> rob: every time you don’t read the topic, god kills a lolcat" Last edited by Haegin; December 11th, 2006 at 04:49 PM.. Reason: Updating to bring inline with new forum rules on howtos |
|
|
|
|
|
#2 |
|
Skinny Soy Caramel Ubuntu
![]() |
Re: HOWTO: Automatically login to XFCE without a boot loader
Nice howto. Just to mention that boot loader is GRUB. This refers to programs like GDM or KDM which are login managers.
__________________
Help Us To Free the Bulgarian medics in Lybia!!! |
|
|
|
|
|
#3 |
|
5 Cups of Ubuntu
![]() Join Date: Mar 2006
Beans: 15
Xubuntu
|
Re: HOWTO: Automatically login to XFCE without a boot loader
Thank you, worked well on my installation of breezy with xfce.
|
|
|
|
|
|
#4 |
|
Quad Shot of Ubuntu
![]() |
Re: HOWTO: Automatically login to XFCE without a boot loader
Darn! If somebody can edit this or knows how I can then please do so/tell me...
__________________
Regards, Haegin If all else fails curl up in bed with a good book. "<mc44> rob: every time you don’t read the topic, god kills a lolcat" |
|
|
|
|
|
#5 |
|
5 Cups of Ubuntu
![]() Join Date: Mar 2006
Beans: 15
Xubuntu
|
Re: HOWTO: Automatically login to XFCE without a boot loader
could you maybe also supply a script for automated shut down, so I dont have to type "sudo halt"?
thanks Last edited by Tobitas; March 30th, 2006 at 05:00 PM.. |
|
|
|
|
|
#6 |
|
Just Give Me the Beans!
![]() Join Date: Jun 2005
Beans: 42
|
Re: HOWTO: Automatically login to XFCE without a boot loader
|
|
|
|
|
|
#7 |
|
Just Give Me the Beans!
![]() Join Date: Aug 2005
Beans: 74
|
Re: HOWTO: Automatically login to XFCE without a boot loader
The default XFCE behavior is to make you type in your password in order to shut down. To fix this so that xfce simply shuts down without prompting you for a password, add the following line to the /etc/sudoers file as root:
ALL ALL = NOPASSWD: /usr/sbin/xfsm-shutdown-helper I picked this up on another forum. I added this as the last line in the file and it works like a charm. |
|
|
|
|
|
#8 |
|
Just Give Me the Beans!
![]() Join Date: Aug 2005
Beans: 74
|
Re: HOWTO: Automatically login to XFCE without a boot loader
I ran the sudo gcc-3.4 -o autologin autologin.c command as described above and received the following error:
sudo: gcc-3.4: command not found. I did a whereis gcc in a shell and found it in the /usr/bin directory. Scanning this directory I found gcc and also found a gcc-4.0. Re-running the compile with gcc threw an error message I did not understand. I continued through the instructions, and the automated login process still worked, so whatever the compile error was, it was not a showstopper. I repeated the experiment using gcc-4.0 and same results: compile error, but the auto login process still worked. |
|
|
|
|
|
#9 | |
|
100% Pure Ubuntu
![]() |
Re: HOWTO: Automatically login to XFCE without a boot loader
this will work for any wm... just replace the appropriate executable...
__________________
Quote:
|
|
|
|
|
|
|
#10 |
|
Ubuntu addict and loving it
![]() Join Date: Jan 2006
Location: Philadelphia
Beans: 3,779
Ubuntu 8.10 Intrepid Ibex
|
Re: HOWTO: Automatically login to XFCE without a boot loader
So, it seems to me that since we are changing inittab, a very common and basic system file, that this guide should work for Dapper as well. I do not run Dapper at the moment, so I cannot check - so could anyone please let me know if it does/should work on Dapper just as well as Breezy?
thanks |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|