Automatically log into Xfce without a login manager

July 13, 2006 at 8:24 am | Posted in tips and tricks, xubuntu | 20 Comments

This has been done countless times before. However, I want to provide a version that doesn’t require messing with gcc and removing xubuntu-desktop. This howto is based off of this message from the Ubuntu Lite group.

1) Install mingetty:
sudo aptitude install mingetty

2) Edit your .bash_profile file. This controls what happens when you log in:

mousepad .bash_profile

And paste this in, at the bottom of the file:

# autologin tty2
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty2 ];
then
exec startxfce4
fi

Save the file, and exit.

3) Edit /etc/inittab (sudo mousepad /etc/inittab), and replace the following line:

1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2

with

#1:2345:respawn:/sbin/getty 38400 tty1
2:2345:respawn:/sbin/mingetty --autologin
YOURUSERNAME tty2

Obviously, replace YOURUSERNAME with your username. Save the file and exit.

4) Stop GDM from loading on startup. Go to Xfce menu > Services, and uncheck “Graphical Login Manager (gdm)”.

5) Reboot. While this saves RAM, Xfce’s default Quit menu does not work (for me, anyway.) To fix this, create a group that can shutdown your computer:

sudo addgroup shutdown

Then, edit /etc/group:

sudo mousepad /etc/group

Scroll down to the bottom, and write in your username after shutdown:x:1001:.

Then, run

export EDITOR=mousepad && sudo visudo

And paste in:

%shutdown ALL=(root) NOPASSWD: /sbin/halt, /sbin/reboot, /sbin/shutdown

Then, right click the Xfce menu > run, Edit menu, and create shortcuts to gksudo /sbin/halt and gksudo /sbin/reboot. Save your menu, and exit.

Now, your computer will automatically log in, and save some RAM and CPU cycles along the way.

20 Comments »

RSS feed for comments on this post. TrackBack URI

  1. […] It’s IceWM with a composite manager, xfce4-terminal and Opera. I got myself set up with IceWM following this guide here: http://ubuntuforums.org/showpost.php?p=1254289&postcount=13. I’m using the IceBuntu theme, and used Icepref to configure it to my liking. I followed the guide here: The Composite Manager Guide: How to Get Vista-ish Effects in (K)(X)Ubuntu to get transparency and shadow effects, and disabled GDM and used Mingetty with my guide. It’s lightning fast! […]

  2. […] 3) Using my login automatically guide, I changed the line startxfce4 to startx in my .bash_profile file. This, along with .xinitrc, automatically logs me into IceWM. […]

  3. Hey! It works just fine. Only problem is that I loose VC1 and VC2.
    HowTo keep VC1..4? Don’t need VC5 & 6.

  4. VC1 is commented so that you don’t see a bunch of text when you log in. I’m not sure why you lose VC2-4, because this guide does nothing to it.

  5. […] Following this guide, you can set up bash to re-start X after you log out, just like a display manager. […]

  6. It might not be as educational, but with xubuntu 7.04 one can simply select “applications” > “settings” > “login window” then choose the “security” tab, check “enable automatic login”, choose the user to be logged in and click “close”.

  7. Charles, thank you for your comment (no joke) I was also about to reinvent the wheel. But as you said the tip above is quite educational and will save time to lot of people.

  8. I tried the above, but after several attempts, couldn’t get it to work. When doing step 4), X crashed, and I was thrown back to the terminal login prompt. Logging back in and typing “startx — :1” brought me up in GNOME. Restarting and shutting down did not help.

    It might be because my/etc/inittab did not have the lines shown above, or because I am on 7.10, or because I also have KDE and GNOME installed, but I would warn people to be VERY CAREFUL when changing these settings, as they are not for novices! Luckily, I knew enough to get X back, but I think people should take the advice of the warning that appears when you try to uncheck the Graphical Login Manager.

    But thanks for the tips, anyway!

  9. There’s an error in this script:

    2:2345:respawn:/sbin/mingetty –autologin
    YOURUSERNAME tty2

    1) This line looks like it’s 2 lines – including the br tag in the underlying HTML. It isn’t! It should be all on one line, otherwise you’ll get an error about an id field being too long (referring to “olpc”).

    2) autologin needs 2 dashes in front of it, not one, or mingetty just dies and does nothing, causing an “Error: id “2” respawning too fast” error message forever. So it’s:

    2:2345:respawn:/sbin/mingetty -–autologin YOURUSERNAME tty2

    But, all that does is make the error messages go away so I can boot – it doesn’t autologin for me. There’s either still more that’s wrong with this script, or Xubuntu on OLPC needs more than this in order for autologin to succeed. I end up with a console login prompt.

    A couple tips for those who want to investigate further:

    > man mingetty

    That will pull up the help for mingetty after it’s installed, where you can find things like the proper syntax for autologin.

    Searching for man inittab will give you a run-down on how inittab works (Ubuntu and Xubuntu guides will NOT find you this info).

    2:2345:once:/sbin/mingetty -–autologin YOURUSERNAME tty2

    Changing the line to the above (once instead of respawn) lets you experiment in a way that at least just does nothing if you screw it up, rather than preventing you from booting and hosing your machine. Any line you mess with, use once until you’re SURE it works.

    Good luck.

  10. Got autologin to work on the OLPC XO-1!

    2 more changes:

    1) Change the autlogin line to 1, so that section looks like this:

    #1:2345:respawn:/sbin/getty 38400 tty1
    #2:23:respawn:/sbin/getty 38400 tty2
    1:12345:respawn:/sbin/mingetty –autologin olpc tty1
    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

    Very important to notice that the autologin line ends in “tty1” not “tty2”.

    2) After editing inittab, reboot using:

    > sudo reboot

    I’m not certain this is required, but reading about this lead me to several blogs saying this was required to “respawn inittab” (?).

    It works!

  11. один из самых интересных порталов в интернете

  12. […] Automatically log into Xfce without a login manager | Xubuntu … […]

  13. […] Automatically log into Xfce without a login manager | Xubuntu … […]

  14. […] Automatically log into Xfce without a login manager | Xubuntu … […]

  15. […] Automatically log into Xfce without a login manager | Xubuntu … […]

  16. Грузоперевозки из
    по России догрузом в противном случае отдельным транспортом.
    [url=azimut18.ru]перевозка грузов/url]/url] из Ижевска в Москву. Санкт-Петербург и по всем регионам России и в возвратном направлении.
    Расчет ценности для отправки отдельным
    Грузоперевозки догрузом из
    Грузоперевозки отдельным транспортом. Заказ машины от первого тонны до двадцать тонн.
    Перевозки фурой из Ижевска в городка
    Транспортно – логистическая команда ООО”Магистраль” призывает услуги по доставке грузов автомобильным транспортом из Ижевска по городкам и областям России и в возвратном направлении. Заказать газель для офисного и квартирного переезда, перевозки рефрижиратором (с температурным режимом), доставка не габаритных грузов по городкам России. Машины грузоподъемностью от первого тонны до двадцать тонн и выше, объемом до 120 кубов. Грузовой перевозчик оплачивается лишь в одну сторону от двенадцатого руб./километрах. Рассчитать ценность перевозки могут помочь наши логисты по телефону:

    одного – Бесплатная доставка груза до двери
    двух – Бесплатный забор груза от двери
    три – Доставка груза по городку не
    четыре – Возврат документов не осуществляется;
    Дополнительные требования:
    Услуга предоставляется на основании письменной заявки посетителя и при существовании заключенного договора с посетителем.
    Упаковка: жесткая упаковка (обрешетка) – 700 руб./м три ( минимальная ценность 300 руб.).
    Ежели длина груза равна иначе более второго,пяти м. напротив, ширина и/иначе высота равна в противном случае менее 0,пять м. то ценность упаковки увеличивается на тридцать% (минимальная ценность будет 390 руб.), прочие виды упаковки вы можете отыскать в разделе сайта “Упаковка “.
    Хранение на складе: безвозмездный срок хранения на складе третьего рабочих дня с минуты прибытия груза.
    Всякий последующий рабочий день хранения на складе 200 руб/м три в противном случае первого руб/кг.
    Банкет груза с проверкой внутренних вложений. Ценность услуги – пяти руб. за пересчет 1 внутритарного места.
    Сортировка груза согласно с накладными (без испытания внутренних вложений). Тариф увеличивается на пятьдесят%
    Негабаритный груз: ежели длина одной стороны места превосходит четырех метра в противном случае масса места превосходит тысячей кг, то ценность перевозки негабаритного места увеличивается на тридцать%, ежели масса места превосходит 2000 кг, ценность перевозки негабаритного места увеличивается на пятьдесят%.
    Груз принимается по числу мест без пересчета внутренних вложений.
    Выгрузка и погрузка экспедитором рассчитывается отдельно: до пятьсот кг в соответствии тарифам на погрузо-разгрузочные службы. более пятьсот кг – по прайс-листу “грузчик в взаимопомощь “.
    Объем груза рассчитывается исходя из соотношения: объем груза +десять% от объема, нужных для качественной укладки в транспортное способ. В происшествие выработки жесткой упаковки, объем груза умножается на коэффициент одного,25.
    Команда «ГлавДоставка» гарантирует сделание сроков доставки груза лишь в том происшествие, ежели груз был сдан на склад городка отправления не позднее 19-00 дня отправления автомобили. Ежели груз был сдан опосля 19-00, он будет транспортирован в пункт присвоения лишь следующей машиной по графику отправок .
    Забор/доставка груза по адресу в г. Атырау рассчитывается за отдельную плату по прайсу автоэкспедирования в/из следующих городов: Алматы, Астана, Барнаул, Екатеринбург, Ижевск, Иркутск, Кемерово, Красноярск, Курган, Нижневартовск, Новокузнецк, Новосибирск, Озерск, Омск, Сургут, Томск, Тюмень, Уфа.
    Оформление бланка CMR – 200 руб./шт. Услуга предоставляется лишь при обстоятельстве, то что получателем и отправителем будет указана ГлавДоставка и ее компаньоны.

  17. Админ форума подсказал Ваш контакт. Вы писали статью как без принуждения за один день заработали 116$
    здесь вот ссылка [u]http://record.fxclubaffiliates.com/_2aODD0XAadeCbhE8FJgrXWNd7ZgqdRLk/1/[/u] alpari.ru если Вас не затруднит дайте ссылку на статью
    или поделитесь секретом такого успеха
    буду премного благодарен.С уважением Сергей.

  18. Админ форума подсказал Ваш контакт. Вы писали статью как без принуждения за один день заработали 116$ на падении курса рубля
    на этом сервисе вот ссылка [u]http://record.fxclubaffiliates.com/_2aODD0XAadeCbhE8FJgrXWNd7ZgqdRLk/1/[/u] alpari.ru если Вас не затруднит дайте ссылку на статью
    или поделитесь секретом такого успеха
    буду премного благодарен.С уважением Сергей.

  19. [b]SocPlugin 4.0.34 – modern soft for SMM[/b]

    [img]http://www.hamariit.com/wp-content/uploads/2015/02/123-e1443936125187.jpg[/img]

    [b][color=green]+ absolutely automatic captcha breaking
    + supports 4 most popular social networks, included Facebook
    + intellectual auto-dialogue system[/b][/color]
    + profile collect can be made by parameters, from groups, from list of friends, recursive
    + save / load profiles lists in TXT and XML
    + collecting of video by parameters, for future commenting
    + automatic action at log in: accept / decline invites to groups or friends, automatic change of status
    + filter of profile list by parameters set by user
    + mass sending of personal messages with breaking of all captchas
    + automatic invite to groups
    + automatic invite to friends
    + automatically pressing “Like” and ratting photo with “5” and “5+”
    + automatic grabbing of profiles content and photos
    + commenting photos and video
    + support of variations and macros
    + automatic checking of profile list
    + automatic fulfil of own accounts with personal information and photos
    + full automation of actions
    + more other options!

    [b]Free demo-version available.[/b]
    [i]Interested? Just Google for “SocPlugin” ;)[/i]

  20. Welcome to the original hookup club!

    WARNING: THIS SITE CONTAINS NAKED
    PICTURES OF PEOPLE YOU KNOW
    These members are ONLY looking for casual sex and discreet encounters.
    You know them from work, from school, from the gym, they are your neighbors!

    http://www.hookupclub.coolpage.biz


Leave a comment

Create a free website or blog at WordPress.com.
Entries and comments feeds.