LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   How - auto startx, and restart computer (https://www.linuxquestions.org/questions/ubuntu-63/how-auto-startx-and-restart-computer-504515/)

Optiker 11-24-2006 11:50 AM

How - auto startx, and restart computer
 
Last night I installed and used Automatix for the first time. It's on a fresh install of Kubuntu Dapper. When finished, I was supposed to reboot. However, the "start" menu had only a logout option, and using it, only logged out back to a fill-screen terminal window - ie, logged out of X.

Not only that, but the first time I did reboot, it didn't auto startx as I had set up to do.

One of my Automatix seelctions was updating KDE, so I'm guessing that's probably the root of the problem.

I've posted to the Automatix Dapper forum, but traffic seems slow, and no replies so far.

Can anybody tell me how to set it up to automatically startx? I also set the convenience option to auto-login, but I think I know how to do that from Dapper.

Also, what do I need to do to get the "turn off computer" and "restart computer" options when I logout?

Thanks!
Optiker

statyk 11-24-2006 01:42 PM

strange
 
I've never been asked to reboot after installing automatix so thats a a bit strange to me. Did you intall automatix or automatix2? Also which version of *buntu are you using ... 6.06 or 6.10?

Optiker 11-24-2006 04:14 PM

I am not sure what Automatix...2 I think. The reboot was because of the nVidia component I think.

This is Dapper, 6.06. Tried Edgy on this very old machine and had a ot of trouble. Dapper was fine till I did Automatix.

I wou ldhave guessed that the startup and shutdown would be some settings someplace, or at worst, editing a config file...no?

Still no replies on the Automatix forum...slow day I guess.

Thanks!
Optiker

mcmillan 11-25-2006 01:29 PM

Take a look to see if there's a file called /etc/inittab. One of the first lines should read something like id:5:initdefault: If the number is 3 then it will default to the command line, 5 is for graphics.

I'm not totally sure about this, since when I went to look at this in my edgy setup the file wasn't there. I know ubuntu changed some stuff with init scripts which may be why this got changed, so it might be the standard way still in dapper. I do find it bizarre that they would change such a significant configuration file.

I've only seen the missing shutdown and restart options for the menu when I've been logged into the X server from a command line. If you can get it to automatically start in X the options should be back I'd think.

Optiker 11-26-2006 11:03 AM

Quote:

Originally Posted by mcmillan
Take a look to see if there's a file called /etc/inittab. One of the first lines should read something like id:5:initdefault: If the number is 3 then it will default to the command line, 5 is for graphics.

[...]

I've only seen the missing shutdown and restart options for the menu when I've been logged into the X server from a command line. If you can get it to automatically start in X the options should be back I'd think.

Great...even with my limited expertise, I can try that. Will do and report back.

Thanks!
Optiker

Optiker 11-26-2006 11:21 AM

Quote:

Originally Posted by mcmillan
Take a look to see if there's a file called /etc/inittab. One of the first lines should read something like id:5:initdefault: If the number is 3 then it will default to the command line, 5 is for graphics.

OK...It was set to 2, but I've changed to 5. Here's the script as it now stands. I'd appreciate it if you could take a look and see if there's anything else out of line, but in the meantime, I will try to reboot and see what happens.

Thanks!
Optiker

------------------------------------------------
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $

# The default runlevel.
id:5:initdefault:

# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS

# What to do in single-user mode.
~~:S:wait:/sbin/sulogin

# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.

l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.
z6:6:respawn:/sbin/sulogin

# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

# Action on special keypress (ALT-UpArrow).
#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work."

# What to do when the power fails/returns.
pf::powerwait:/etc/init.d/powerfail start
pn::powerfailnow:/etc/init.d/powerfail now
po::powerokwait:/etc/init.d/powerfail stop

# /sbin/getty invocations for the runlevels.
#
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
#
# Format:
# <id>:<runlevels>:<action>:<process>
#
# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
1:2345:respawn:/sbin/getty 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
6:23:respawn:/sbin/getty 38400 tty6

# Example how to put a getty on a serial line (for a terminal)
#
#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100

# Example how to put a getty on a modem line.
#
#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3
-----------------------------------------------

Optiker 11-26-2006 11:38 AM

OK...tried it reset to 5 rather than 2. Still came us as before, in command line mode, but this time, never did compolete X startup. It headed in that direction, but stopped at a blue screen - not the same shade blue as a Windows blue screen! :)

So, I guess that's not the answer.

See anything alse in the inittab?

In the meantime, Arnieboy on the Automatix forum asked that I post back with the Automatix activity.log, so will try to get at it and do that as well.

Thanks!
Optiker

mcmillan 11-26-2006 02:58 PM

I don't see anything obvious in there. One thought was to try setting the run level to 3 and 4 to see what that does, since the comments say all of these are multi-user runlevels. Other than that, I'd also be interested in seeing that automatix log since it seems odd that it would be affecting something like this anyway.

Optiker 11-26-2006 10:14 PM

Still trying to find the Automatix activity.log. He said to enter a line in the CL, but I don't understand the syntax anad don't know where to find the /.Automatix/ directory, so waiting for an answer from him on that.

The last time I tried to boot into it, I got in with the same CL, but this time it didn't hang at the blue screen after startx, but continued to boot into X. So, I am back where I was. Haven't tried 2 or 3 in place of 5 yet in thre inittab, but will, and will post /.Automatix/activity.log when I find it.

Thanks
Optiker

mcmillan 11-26-2006 10:26 PM

For the automatix log, I'd guess it's in your home folder, since a file or directory name starting with a period usually (always?) is a hidden file in your home directory.

Optiker 11-27-2006 08:14 AM

OK - will check my home folder when I get home tonight. I tried searching "/" including subdirectories for "/Automix" but zero hits - probably wrong syntax, so not conclusive. Will look tonight.

Thanks!
Optiker

Optiker 11-27-2006 09:40 PM

Quote:

Originally Posted by mcmillan
[...snip...] I'd also be interested in seeing that automatix log since it seems odd that it would be affecting something like this anyway.

Here you go...here's a URL to the activity.log. Hope it's of some use.

http://tinyurl.com/y34fmr

Thanks!
Optiker

fotoguy 11-27-2006 11:40 PM

Quote:

Originally Posted by Optiker
OK...tried it reset to 5 rather than 2. Still came us as before, in command line mode, but this time, never did compolete X startup. It headed in that direction, but stopped at a blue screen - not the same shade blue as a Windows blue screen! :)

So, I guess that's not the answer.

See anything alse in the inittab?

In the meantime, Arnieboy on the Automatix forum asked that I post back with the Automatix activity.log, so will try to get at it and do that as well.

Thanks!
Optiker


if the /etc/inittab was set to 2, then it was setup as a single user mode. As stated ealier you need to set it to either 4 or 5. This will depend on what distro it is based on.

If Xserver is failing to start up, it will most likely be to do with your /etc/X11/xorg.conf file. It probably is not setup with the right driver loaded.

look for a section like this:

Code:

# **********************************************************************
# Graphics device section
# **********************************************************************

# Any number of graphics device sections may be present

Section "Device"
    Identifier  "VESA Framebuffer"
    Driver      "nv"
    #VideoRam    4096
    # Insert Clocks lines here if appropriate
EndSection

Look for the line

Code:

Driver      "nv"
And depending on what card you have in there, you might need to slect a different drive:

for Nvidia:

Code:

Driver      "nv"
For ATi:
Code:

Driver      "ati"

or

Driver      "radeon"

If all else fails you maybe able to get away with

Code:

Driver      "vesa"

or

Driver      "vga"


Optiker 11-28-2006 08:08 AM

fotoguy...I can check that when I get home tonight. The card is an nVidia, but since part of the Automatix installation was the nVidia driver, I don't understand how it could be wrong - though just because I don't understand it doesn't mean it's not so.

Enjoyed your lawyer anecdote in yoru signature enough to send it to a lawyer friend who collects lawyer jokes. :)

Thanks!
Optiker

fotoguy 11-28-2006 08:40 AM

Quote:

Originally Posted by Optiker
fotoguy...I can check that when I get home tonight. The card is an nVidia, but since part of the Automatix installation was the nVidia driver, I don't understand how it could be wrong - though just because I don't understand it doesn't mean it's not so.

Enjoyed your lawyer anecdote in yoru signature enough to send it to a lawyer friend who collects lawyer jokes. :)

Thanks!
Optiker

With a Nvidia card there is actually to drivers for it, if you use the driver that is built into the kernel you use the:

driver "nv"

If you download and install the driver supplied from the Nvidia site, or most likely the ones that the distro developers supply, it would then be:

driver "nvidia"

I should have mentioned that as well.


Glad you like the joke.


All times are GMT -5. The time now is 11:32 AM.