LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 11-07-2005, 08:34 AM   #1
Zerodark
Member
 
Registered: Mar 2003
Location: Fort Sill, Oklahoma
Distribution: Gentoo
Posts: 192

Rep: Reputation: 30
Having an issue with inittab


Ok, I know you are all probably thinking this is a question that has been asked hundreds of times over, but I've spent the last 45 minutes searching for something to help me and couldn't find anything, so I'm going to ask. I just finished getting Gentoo installed, and it's been a long time since I've used linux so I feel like a newbie again. I know that the file to start X automatically on boot is inittab, and the graphical runlevel is generally 5. so i changed the runlevel to 5. When I'm starting up, it says it's switching to runlevel 5, but it I get no graphical interface. I don't mind starting X manually, but sometimes I just like to start up to GDM. If I changed the default runlevel to 5, what am I missing that keeps it from starting up to X?
 
Old 11-07-2005, 08:38 AM   #2
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Indeed, inittab used to be the place where the graphical session got started. It seems that the current trend, however, is to create a system service (init.d/dm) that gets started only in runlevel 5.

Your choice.

Either you create a line that starts GDM on boot in /etc/inittab (copy-paste a line from a virtual terminal and adapt it), or you create a 'dm' init script that starts/stop/restart GDM depending on the value of $1.

Yves.
 
Old 11-07-2005, 10:31 AM   #3
Zerodark
Member
 
Registered: Mar 2003
Location: Fort Sill, Oklahoma
Distribution: Gentoo
Posts: 192

Original Poster
Rep: Reputation: 30
@_@ Wow. That's way different from when I used it before. How would I go about writing a 'dm' init script to start GDM? I'm not that great at bash scripting, and I'm having to learn to use linux all over again. I think I was lucky to successfuly bootstrap my gentoo installation. >_< Any help would be awesome.
 
Old 11-08-2005, 02:35 AM   #4
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Something along those lines, I'd say:
Code:
#!/bin/bash

function dm_start() {
  /usr/X11R6/bin/gdm &
}
function dm_stop() {
  killall gdm
}
function dm_restart() {
  dm_stop
  dm_start
}

eval dm_$1 || echo "Usage: $0 [start|stop|restart]"
This is very minimal however:
- there's no check that gdm is already running in dm_start, and the eval line is not secure against misbehaviour.

Yves.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rc[0-6] and inittab kpachopoulos Linux - General 1 08-12-2005 04:27 PM
inittab corrupted daya Red Hat 1 12-23-2004 08:26 AM
inittab mikedeatworld Linux - Software 3 08-13-2004 10:01 AM
Cant get out of inittab InEeDhElPlInUx Linux - Newbie 3 10-09-2003 02:13 PM
/etc/inittab sakeeb Linux - General 9 05-29-2002 09:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 04:33 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