LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-01-2009, 06:37 AM   #1
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 211

Rep: Reputation: 30
Automatic login and startx at boot-up


I want my system to do:
  • login
  • startx
  • emacs

All automatically. I tried searching the net and found all references to GDM or KDM. I don't use a DM, I just get a tty and then I login and use startx to run X.

Is there any way I can accomplish this ?
 
Old 06-01-2009, 10:56 AM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
You can autostart in gdm with
http://wiki.archlinux.org/index.php/...ault_run-level
and autostart applications with
http://www.linuxquestions.org/questi...fedora-163113/
 
Old 06-05-2009, 01:57 AM   #3
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 211

Original Poster
Rep: Reputation: 30
Thats what exactly I said, I don't use GDM. Crappy Desktop thing takes lots of RAM for no good. Anyway, I have done that like this:
  1. Installed mingetty and changed the /etc/inittab like this:

    Code:
    Old:
    c1:2345:respawn:/sbin/agetty 38400 vc/1 linux
    c2:2345:respawn:/sbin/agetty 38400 vc/2 linux
    c3:2345:respawn:/sbin/agetty 38400 vc/3 linux
    c4:2345:respawn:/sbin/agetty 38400 vc/4 linux
    c5:2345:respawn:/sbin/agetty 38400 vc/5 linux
    c6:2345:respawn:/sbin/agetty 38400 vc/6 linux
    
    
    New:
    c1:2345:respawn:/sbin/mingetty --autologin arnuld vc/1 linux
    c2:2345:respawn:/sbin/agetty 38400 vc/2 linux
    c3:2345:respawn:/sbin/agetty 38400 vc/3 linux
    c4:2345:respawn:/sbin/agetty 38400 vc/4 linux
    c5:2345:respawn:/sbin/agetty 38400 vc/5 linux
    c6:2345:respawn:/sbin/agetty 38400 vc/6 linux
  2. Added these lines to ~/.bash_profile (or ~/.bashrc)

    Code:
    if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/vc/1 ]]; then
      startx
      logout
    fi
  3. and then finally put a line in my WM (window manager) to start emacs as soon as WM itself starts.

Its works fine now . Everything I learned from Arch Wiki.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic login and startx? Plastech Linux - Newbie 8 05-23-2007 01:48 PM
Automatic login on boot Recirqie SUSE / openSUSE 6 11-28-2004 02:51 PM
Automatic -dpi option for startx Zoombie Linux - Software 2 07-13-2003 01:54 AM
startx automatic? lanif Linux - Newbie 6 03-26-2003 06:12 PM
Automatic login at boot RH 8.0 dleone Linux - General 2 01-08-2003 05:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration