Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X for idiots
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
ReeferMac
Guru
Guru


Joined: 30 May 2004
Posts: 389

PostPosted: Wed Jul 28, 2004 6:52 pm    Post subject: X for idiots Reply with quote

... OK, so besides the technical issue's I'm experiencing, all this X-server nonsense is making it difficult for me to figure out what it is I need to ask for help in accomplishing.

I'm new to linux, but have a strong computer background, and experience in Solaris.... I understand that the X-server is what draws the pretty pictures on the screen.

But just exactly how many different flavors are there out there? Xorg, Xfree, X11? X-Huh? I'm lost. I've got an nVidia card, does that matter?

I'm having trouble getting the GUI portion of my gentoo install running, but am not even sure what I should be trouble-shooting. I used the LiveCD install method for stage 1 of Gentoo2004.2. When I type "x" at the CLI, The thing takes off and gives me a checkboard screen with a big 'X' for my mouse cursor, which does respond.... but then does nothing else at all - I have to yank the power cord out the back to get it to rebooted (reset and power buttons on the front of the case do nothing, ctrl-alt-delete does nothing, etc.). I can move the mouse around all day long, but the 'launching of the Xserver never completes (I've let it sit overnight), and never dies/fails back to CLI. It just sits there.

/var/log/ shows the last two attempts from X11r6, but I can't spy anything terminal in there at all (last couple lines talk about font server not finding things where it expected). No hard-error messages, etc. I checked documentation and just found some very basic stuff about running config.sh scripts... which don't exist on my install, in the directory's the ReadMe points me to. :roll:

Should I drop back and punt and try one of the 2004.3 install's?

- Mac
Back to top
View user's profile Send private message
Unne
l33t
l33t


Joined: 21 Jul 2003
Posts: 616

PostPosted: Wed Jul 28, 2004 7:07 pm    Post subject: Reply with quote

No, don't punt. Yes, it is confusing. But it's manageable. See http://www.gentoo.org/doc/en/index.xml#doc_chap5 for lots of nice documentation. Going back to the install CDs will just get you back to where you are right now.

To make a long story short, xorg and xfree86 are both servers (X-servers). You need one of those, and only one. xfree86 was the standard for a long time, and xorg is a newer fork of xfree86. xorg is what you want to go with now, for various reasons. X11 is just a standard, which xfree86 and xorg impliment (I think).

Yes, it matters that you have an nvidia card. Your video card works using drivers of course, which in Linux are kernel modules. For nvidia cards you'll want to

Code:
emerge nvidia-kernel nvidia-glx


to get the latest.

When you start the X-server, it looks in /etc/X11 for a config file. For xorg, that config file is /etc/X11/xorg.conf. If that file doesn't exist, you can run the command

Code:
xorgconfig


to create one, after answering some questions. See also http://www.gentoo.org/doc/en/index.xml#doc_chap5 You need to edit that file to reflect the kind of video card you have too (in this case nvidia). There are lots of threads about that around here.

You should start X with the command

Code:
startx


When you run startx, it looks for the file ~/.xinitrc, and loads any programs that are listed in that file. If you'd like to use a window manager other than the default (you do), you put it into your .xinitrc file. For example if you want to use Gnome, then you put a line in your .xinitrc file like so:

Code:
gnome-session


See also http://www.gentoo.org/doc/en/gnome-config.xml and http://www.gentoo.org/doc/en/kde-config.xml among others.

To kill your X-server, use CTRL+ALT+Backspace, rather than a hard reboot. Or CTRL+ALT+F1 (through F5) to get back to a console.
Back to top
View user's profile Send private message
malone
Apprentice
Apprentice


Joined: 19 Feb 2004
Posts: 159
Location: The p-n junction.

PostPosted: Wed Jul 28, 2004 7:20 pm    Post subject: Reply with quote

Just to add to what Unne said, Ctrl+Alt+F(1 through 6) get you to a console. Use Alt+F(7 through 12) to get back to your xserver.

Hang in there, the payoff is worth it.

Cheers.
_________________
malone
Back to top
View user's profile Send private message
grant.mcdorman
Apprentice
Apprentice


Joined: 29 Jan 2003
Posts: 295
Location: Toronto, ON, Canada

PostPosted: Wed Jul 28, 2004 7:27 pm    Post subject: Reply with quote

Yep, what unne said (beat me to it). Some more comments:

Running just 'X' will just get you a stippled (checkerboard patterned) screen with a mouse; it's just the X server. No desktop or applications, like xterm, are run. Same on Solaris, by the way.

An alternative to startx is to use XDM: /etc/init.d/xdm start. This will give you a graphical login screen, somewhat similar to what you're used on on Solaris. Possible login managers include vanilla X (xdm), KDE (kdm), and Gnome (gdm). KDE, and probably Gnome, can be configured to automatically login in a specific user. Personally, I prefer the graphical login (especially since my home systems have multiple users), but it's all a matter of taste.

It's odd that the reset button doesn't work. The power button doesn't work because of ACPI (power control), presumably - it's generating a software notification that nothing in Linux is handling. Perhaps the reset button is doing the same thing.

Note that most systems that have the power button working this way will do a hardware powerdown if you hold down the button (2-3 seconds, I think).

From your description, it sounds like the X server is functional, since the mouse is moving (you can also check to see if the Caps Lock, Num Lock, and Scroll Lock keys cause the corresponding LEDs to turn on and off).

To help with system lockups, you can also configure your kernel to respond to the 'Magic SysRq' key combination; this is useful when the machine is pretty much locked up (often the 'Magic SysRq' key combo will work when nothing else, save a powercycle, is working). The two most useful combos for this (if I recall correctly) are Alt+SysRq+B for reboot, and Alt+SysRq+O for power off.
Back to top
View user's profile Send private message
ReeferMac
Guru
Guru


Joined: 30 May 2004
Posts: 389

PostPosted: Wed Jul 28, 2004 8:10 pm    Post subject: Reply with quote

First off, thank you all for the help. I'm getting a less-muddy picture now.

grant.mcdorman wrote:

Running just 'X' will just get you a stippled (checkerboard patterned) screen with a mouse; it's just the X server. No desktop or applications, like xterm, are run.


Jesus Tap-dancing Christ!
OK, epiphany, hang with me:

Quote:
Running just 'X' will just get you a stippled (checkerboard patterned) screen with a mouse;


Plus what Unne said here:

Quote:
When you run startx, it looks for the file ~/.xinitrc, and loads any programs that are listed in that file. If you'd like to use a window manager other than the default (you do), you put it into your .xinitrc file


Is telling me.... I have a perfectly functioning X-server, and I just need to tell it I want to run KDE by creating an .xinitrc file in my user's homedir? I've been using 'x' instead, but regardless... what it appears I'm describing, is normal behavior?

Then why the machine locking up? That power/ACPI thinggy grant was talking about... Hmm.. I'm an admitted newb here, but have seen/read a handful of things about the whole power-saving software thing being flaky at best (and to compound matters, I'm running an AMD64 chip!).. Well, I guess I'll tackle that problem down the road once I get passed this set.

Thanks for the help guy's. If I can get past my BIOS problems, maybe I can get in there and see if I have a 'session' desribed in my /.xinitrc file (it should be there already, right?)

- Mac
Back to top
View user's profile Send private message
ikshaar
Veteran
Veteran


Joined: 23 Jul 2002
Posts: 1339
Location: Baltimore, MD

PostPosted: Wed Jul 28, 2004 9:04 pm    Post subject: Reply with quote

One good combo to know when testing X is to kill the X server - if you test it again :wink: - just hit Ctrl-Alt-Backspace.

But following Gentoo desktop guide works pretty well otherwise...
_________________
"May God stands between you and harm in all the empty places where you must walk" - Babylon 5
Back to top
View user's profile Send private message
ReeferMac
Guru
Guru


Joined: 30 May 2004
Posts: 389

PostPosted: Wed Jul 28, 2004 9:41 pm    Post subject: Reply with quote

Thnx ikshaar... I'd tried that.. got bupkus.

- Mac
Back to top
View user's profile Send private message
grant.mcdorman
Apprentice
Apprentice


Joined: 29 Jan 2003
Posts: 295
Location: Toronto, ON, Canada

PostPosted: Wed Jul 28, 2004 11:30 pm    Post subject: Reply with quote

ReeferMac wrote:
First off, thank you all for the help. I'm getting a less-muddy picture now.
Good, glad to hear it.

ReeferMac wrote:
Is telling me.... I have a perfectly functioning X-server, and I just need to tell it I want to run KDE by creating an .xinitrc file in my user's homedir? I've been using 'x' instead, but regardless... what it appears I'm describing, is normal behavior?
Yes, absolutely. To run KDE using startx, create your .xinitrc file with this in it:
Code:
#!/bin/sh
exec startkde $@
and make it executable. Then do startx from a console. (However, you may not need an ~/.xinitrc file - see below.)

Running X is useful when testing, but outside of that is pretty much useless.

ReeferMac wrote:
Then why the machine locking up? That power/ACPI thinggy grant was talking about...
It sounds very much like this is the case. When enabled in the kernel - and it may be the default - the power button doesn't do anything unless you have sys-apps/acpid installed. Even then, you typically need to do some configuration to get it to do anything useful.

ReeferMac wrote:
Thanks for the help guy's. If I can get past my BIOS problems, maybe I can get in there and see if I have a 'session' desribed in my /.xinitrc file (it should be there already, right?)
Not necessarily. The default home directory skeleton, /etc/skel, doesn't contain one. However, these comments in /etc/rc.conf are enlightening:
Code:
# XSESSION is a new variable to control what window manager to start
# default with X if run with xdm, startx or xinit.  The default behavior
# is to look in /etc/X11/Sessions/ and run the script in matching the
# value that XSESSION is set to.  The support scripts is smart enouth to
# look in all bin directories if it cant find a match in /etc/X11/Sessions/,
# so setting it to "enligtenment" can also work.  This is basically used
# as a way for the system admin to configure a default system wide WM,
# allthough it will work if the user export XSESSION in his .bash_profile, etc.
#
# NOTE:  1) this behaviour is overridden when a ~/.xinitrc exists, and startx
#           is called.
#        2) even if a ~/.xsession exist, if XSESSION can be resolved, it will
#           be executed rather than ~/.xsession, else KDM breaks ...
#
# Defaults depending on what you install currently include:
#
# Gnome - will start gnome-session
# kde-<version> - will start startkde (ex: kde-3.0.2)
# Xsession - will start a terminal and a few other nice apps


As I also commented, you may want to set up the machine to automatically start X when you boot. This can be done by doing rc-update add xdm default. The display manager to use is configured in /etc/rc.conf; for KDE, as I commented, you can get it to automatically log in a specific user, too (don't make it root, though!).
Back to top
View user's profile Send private message
Malakai
Apprentice
Apprentice


Joined: 24 Dec 2002
Posts: 299

PostPosted: Thu Jul 29, 2004 2:30 am    Post subject: Reply with quote

Learn all you can about the xorg.conf file, and X will do your bidding.

EVERYTHING about X is configurable via that one simple text file.
Back to top
View user's profile Send private message
Sipi
Guru
Guru


Joined: 03 Apr 2003
Posts: 406
Location: Hungary

PostPosted: Thu Jul 29, 2004 7:28 am    Post subject: Reply with quote

If you want to see some nice things instead of the gray background with big X cursor, you need to emere some windows managers. The two big is Gnome and KDE, but in Portage's x11-wm dir you can find tons of others (e.g. windowmaker, fwvm, etc.).

After emerging it, all will create a session file in /etc/X11/Sessions. These are almost the same as your .xinitrc files - they start the X server with different kind of window managers.

So, you don't need to create a personal .xinitrc file. If you edit /etc/rc.conf, at the and you can find a line with XSESSION=. Here you can write any of the file names in /etc/X11/Sessions. For example, after emerging KDE, you will have a kde-3.2.3 file here, so you need:
Code:
XSESSION="kde-3.2.3"

line. Now, if you login and start X server with start, it will start this window manager.

Also, in rc.conf you can set which kind of graphical login manager you wish to use:
Code:
DISPLAYMANAGER="kdm"

for KDE, gdm for Gnome, etc.

These are system-wide settings. You can start your login manager with
Code:
/etc/init.d/xdm start

This will start the login manager you set in rc.conf.
Sipi
Back to top
View user's profile Send private message
ReeferMac
Guru
Guru


Joined: 30 May 2004
Posts: 389

PostPosted: Thu Jul 29, 2004 11:48 am    Post subject: Many Many Thanks. Reply with quote

Well, many thanks to everyone for the help once again. I got a GUI running last night! (but the wifey wasn't nearly as impressed as I was).
Emerge KDE finished up overnight, but I didn't have time to monkey w/ it this morning before leaving for work. I'll be printing this thread out and going over it tonight. Thanks for the commands.
I played w/ a few of the BIOS settings too, and I was able to wake it up this morning successfully.
Thanks again (I'll be back!)

- Mac
Back to top
View user's profile Send private message
malone
Apprentice
Apprentice


Joined: 19 Feb 2004
Posts: 159
Location: The p-n junction.

PostPosted: Thu Jul 29, 2004 2:02 pm    Post subject: Re: Many Many Thanks. Reply with quote

ReeferMac wrote:
but the wifey wasn't nearly as impressed as I was

... they never are :roll:
Welcome to Gentoo.

Cheers.
_________________
malone
Back to top
View user's profile Send private message
Sipi
Guru
Guru


Joined: 03 Apr 2003
Posts: 406
Location: Hungary

PostPosted: Thu Jul 29, 2004 2:04 pm    Post subject: Reply with quote

No-no! My wife loves Gentoo with qingy, tvtime and KDE! :)

Sipi
Back to top
View user's profile Send private message
dmartin
Apprentice
Apprentice


Joined: 19 Jan 2004
Posts: 158
Location: Saint Louis, MO, USA

PostPosted: Thu Jul 29, 2004 2:50 pm    Post subject: Reply with quote

Sipi wrote:
No-no! My wife loves Gentoo with qingy, tvtime and KDE! :)

Could you ask her to talk to my wife, please?
Back to top
View user's profile Send private message
Sipi
Guru
Guru


Joined: 03 Apr 2003
Posts: 406
Location: Hungary

PostPosted: Thu Jul 29, 2004 2:56 pm    Post subject: Reply with quote

I should ask her, but only if YOU phone me and pay the phone bill. :) :)

Sipi
Back to top
View user's profile Send private message
dmartin
Apprentice
Apprentice


Joined: 19 Jan 2004
Posts: 158
Location: Saint Louis, MO, USA

PostPosted: Thu Jul 29, 2004 8:31 pm    Post subject: Reply with quote

Sipi wrote:
I should ask her, but only if YOU phone me and pay the phone bill. :) :)

Hungary is just 8 cents per minute on my Vonage phone. That would be worth every penny. :D

What was this topic about again? (sorry for all my OT chatter)
Back to top
View user's profile Send private message
ReeferMac
Guru
Guru


Joined: 30 May 2004
Posts: 389

PostPosted: Thu Jul 29, 2004 11:57 pm    Post subject: Reply with quote

Sipi wrote:
What was this topic about again? (sorry for all my OT chatter)


LOL! No worries, we solved the problem a few post's back anyways... ;)

- Mac
Back to top
View user's profile Send private message
ReeferMac
Guru
Guru


Joined: 30 May 2004
Posts: 389

PostPosted: Fri Jul 30, 2004 1:24 am    Post subject: Reply with quote

Well, I'm not done, and it ain't KDE (Session not found error's), BUT.... I'm writing this from Firefox on my AMD64 Gentoo2004.1 box!

All's I can say is, Thanks man....

- Mac
Back to top
View user's profile Send private message
Sipi
Guru
Guru


Joined: 03 Apr 2003
Posts: 406
Location: Hungary

PostPosted: Fri Jul 30, 2004 9:24 am    Post subject: Reply with quote

Did you emerge KDE? What files are in /etc/X11/Sessions? What is in your rc.conf?

Sipi
Back to top
View user's profile Send private message
Sipi
Guru
Guru


Joined: 03 Apr 2003
Posts: 406
Location: Hungary

PostPosted: Fri Jul 30, 2004 9:27 am    Post subject: Reply with quote

dmartin wrote:
Hungary is just 8 cents per minute on my Vonage phone. That would be worth every penny. :D


Uhh... It is about ten times lower than for me, in the opposite direction...:(
Happy guy! :)

Sipi
Back to top
View user's profile Send private message
ReeferMac
Guru
Guru


Joined: 30 May 2004
Posts: 389

PostPosted: Fri Jul 30, 2004 10:31 am    Post subject: Reply with quote

Sipi wrote:
Did you emerge KDE? What files are in /etc/X11/Sessions? What is in your rc.conf?


Yes, I did, finished w/ no errors, but I can't seem to get it started (remember, I told you I was a n00b :) ). That will be todays task at work.... get enough howto's and doc's printed out to last me through the weekend! :D

I see the last line on my RC.conf file is: "XSession=Gnome".. so I'm guessing I can just change the Gnome to KDE, and it will all work? It can't be THAT easy, can it? When I tried starting up X w/ .Xinitrc in my home dir, I got those 'no session' errors.

- Mac
Back to top
View user's profile Send private message
Sipi
Guru
Guru


Joined: 03 Apr 2003
Posts: 406
Location: Hungary

PostPosted: Fri Jul 30, 2004 10:35 am    Post subject: Reply with quote

Yes, it is so easy - but instead KDE you need to write here EXACTLY the same as in you /etc/X11/Sessions. Because there are several KDE versions, it used to be kde-3.2.2 or similar.

.xinitrc is a harder way to go... I recommend the rc.conf-way. It is Gentooished. :)

Sipi
Back to top
View user's profile Send private message
ReeferMac
Guru
Guru


Joined: 30 May 2004
Posts: 389

PostPosted: Fri Jul 30, 2004 11:48 am    Post subject: Reply with quote

Sipi wrote:
... I recommend the rc.conf-way. It is Gentooished. :)


LOL! Many thanks. Then I'll have to do it that way.

- Mac
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum