Jump to content

Running X at boot


Yankee
 Share

Recommended Posts

Hello, I am really new to Linux and when I installed it I set it to start X at boot up. Now I want to change that but have a problem.

I go to Mandrake Control Center and then to boot options and uncheck auto start x and when I reboot sure enough, no X. But, logging in and typing startx starts it up, then it exits. There is no error and there is no errors in /var/log/Xfree86.log.

 

I boot to install CD 1 and tell it to upgrade and of course it don't, it just flies thru to where I tell it to auto start X and it is back in good shape.

 

I don't think it is the XF86Config-4 file because it stays the same. Seems to me it is a bug maybe to do with the run level? I've only been at this about a month so I know it must be simple...

 

Thanks for your help!

 

Sorry guys, it is MDK 9.0 with all the updates.

Link to comment
Share on other sites

forgive me for not reading the full post, but I'm in a hurry now (seems something unavoidable this days)

ut, logging in and typing startx X starts it up, then it exits.  There is no error and there is no errors in /var/log/Xfree86.log.

 

"startx X" is wrong; that atempts to start the X server with a program named X, and if it can't run then the X server exits (same as "startx foo")

 

run "startx" alone (or read man startx to see which parameters can be used) ;)

Link to comment
Share on other sites

The startx X was a typo, sorry.

 

I have been reading the docs and learning a lot about the startup. Changing the initdefault to 3 in /etc/inittab makes the startx command not work.

 

Typing "init 5" after login starts X and works, just startx does not work.

 

I have went thru the run levels in /etc/rc3.d and rc5.d and they appear to have the same contents except for rc5.d has S30dm which when I read it tells me "This startup script launches the graphical display manager".

 

I have a book on Redhat and read the docs on MDK and they both explain changing the run level to 3 in initdefault makes it boot to console and then to use startx.

 

It sure appears to be a script error and not a problem with the X server.

Link to comment
Share on other sites

Good call...

 

When logged in at the console typing kde goes right into KDE with no graphic login.

 

Typing init 5 goes into the KDE graphic login screen.

 

I have an XP 1600 so it is too fast to see good but when I type startx it displays entering run level 3, stopping dm.

 

It is a script error because startx should switch it to run level 5 and it don't. I am glad it is not the run levels screwed up.

 

I have been reading here:

http://www.mandrakeuser.org/docs/xwin/xstart.html

, and it is like this script calls that script and in turn calls this script if this or that happens. WOW!

 

By the way, I didn't play with anything to do with the start up until I used the Mandrake Control Center to tell it to not startx at boot and found this problem.

 

I have installed TTF's, DVD codecs, all the MDK updates, a couple themes, and my hardware like scanner, camera etc. None of that should change the startup scripts unless it was the updates.

Link to comment
Share on other sites

Glad it worked. I think you might have a problem with the setting of your default desktop which was the logic behind my suggestion. In Mandrake, "kde" is an alias for "startx kde". Try that command and see if it still works. My theory is that the starx command looks for the default desktop and has trouble finding it. When you specify the desktop, X knows what destop to start up and doesn't need to look for the default.

Link to comment
Share on other sites

pmpatrick:

 

Well here is the deal. I poked around so much I may have screwed something up but I don't think so. I made a ./xinitrc file in my home directory then I found out ./ files are invisible. Do you know how to make them viewable in Konq?

Anyway, all I put in it was exec startkde and then logged in and typed startx and it worked. Liked to never got out of it! And lots of errors on exit.

But, then I deleted the ./xinitrc file and done a full reboot. I logged in on the graphic screen, brought up a console and init 3'd it to force run level 3. Then a startx did not work. SO I done a init 5 and it switched to 5 then a startx worked. So far as I can tell it is fixed though I'm not sure why, but you are on the right track about default window manager etc.

There is an option somewhere to set default WM or last used. I'm going to set a default as I think it is loosing the last used, maybe.

I can say one thing, if X won't fire up at all, I think I can fix that now!!!! Thanks for your help...

Link to comment
Share on other sites

Do you know how to make them viewable in Konq?

Toolbar>View>Show Hidden Files

 

When you tell mcc>Boot>Boot Config to not start the graphical environment at boot, it's suppose to stop the dm from running at boot. Once, the very same thing happened to me and it didn't. It edited all the other scripts for a init 3 environment, went to init 3, and I guess at startx started the dm and the confusion started. This was when I first installed ML9.0 and hadn't configured a wm or .xinitrc file.

 

You can find the "dm at boot" in mcc>System>Services in X, or from init 3 type linuxconf and I think you go to >Configure Network>Control Panel> Control Service Activities. Or in a terminal or in init 3 type;

service -s

to see the status of all sevices;

 service --help

Usage: service -[Rfshv] SERVICE ARGUMENTS

       -f|--full-restart:      Do a fullrestart of the service.

       -R|--full-restart-all:  Do a fullrestart of all services currently running.

       -s|--status-all:        Print a status of all services.

       -d|--debug:             Launch with debug.

       -h|--help:              This help.

       -v|--version:           Print version.



version 1.12

You can stop and start services as well;

service dm start

from init 3 will start kdm, gdm, xdm. Don't

service dm stop

from X though. The stop and start is temp. To make it permanent for off or on;

chkconfig dm off

chkconfig --help

chkconfig version 1.3.4 - Copyright (C) 1997-2000 Red Hat, Inc.

This may be freely redistributed under the terms of the GNU Public License.



usage:   chkconfig --list [name]

        chkconfig --add <name>

        chkconfig --del <name>

        chkconfig [--level <levels>] <name> <on|off|reset>)

Link to comment
Share on other sites

BVC,

 

Up a few post I said: when I type startx it displays entering run level 3, stopping dm.

It flashes entering run level so fast, but I see it blink 2 or 3 times then it says enterinmg run level 3 and stopping dm. It flashes the nvidia splash (Nvidia drivers), you see the cursor, then the runlevel stuff, exiting X.

I had not caught on to stopping dm as being display manager. And this does sound like what is going on as I had not configured a dm or .xinitrc. I never even checked view>show hidden files as things are so much different than windows it never dawned on me!!! Hahaha!

I sure wish they would put a right click>copy in Konq, that is driving me nuts!

I build computers and all my friends are going to see this Linux and want it so I NEED to know how to work the bugs out. I'm telling all them to get a book now and even a Knoppix or Suse live CD to learn a bit now.

I started with RH6 in 2000, then RH7 and what got me was if you went to use a tool in 7 from the 1200 page RH6 book, it was no longer there.

I played with Mandrake then, but for the past month I have been serious about learning Linux because I see it on the radar as a need to know thing.

I believe you are right on track that it is a new install issue and I'll bet 9.1 is not like that. I appreciate your help guys and I knew one of you had seen this but all that digging was worth it because I understand the X startup process pretty well now. I have a lot to learn about the syntax of the scripts.

I will try to share what I learn in the forums and here you guys can find a good post about how I got XP & MDK to dual boot:

http://www.mandrakeusers.org/viewtopic.php...t=1841&start=15

 

Thanks again and if I find a for sure perfect fix I'll post it. After checking show hidden files I see that the .xinitrc is there and is blank. It may be confusing it so I am going to make the .xinitrc file point to whichever script it is supposed to run if .xinitrc does not exist instead of having it load a WM there because it seems that file short circiuts some needed stuff in the other scripts. Sorry the posts are so long...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...