VTs and QT blocks [Solved]

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Re: VTs and QT blocks [Solved]

Postby Fitzcarraldo » Wed Jun 10, 2009 17:03

What runlevel have you got xdm in? Also, what does /etc/conf.d/xdm contain?
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7333
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: VTs and QT blocks [Solved]

Postby signals » Thu Jun 11, 2009 1:54

Strangely, I have xdm in the "boot" runlevel. I would've expected default, but I never changed it:

Code: Select all
whitestar ~ # rc-update show | grep xdm
                  xdm |         boot


Here's my /etc/conf.d/xdm:

Code: Select all
# We always try and start X on a static VT. The various DMs normally default
# to using VT7. If you wish to use the xdm init script, then you should ensure
# that the VT checked is the same VT your DM wants to use. We do this check to
# ensure that you have't accidently configured something to run on the VT
# in your /etc/inittab file so that you don't get a dead keyboard.
CHECKVT=7

# What display manager do you use ?  [ xdm | gdm | kdm | kdm-3.5 | kdm-4.0 | entrance ]
# NOTE: If this is set in /etc/rc.conf, that setting will override this one.
# KDE-specific note: kdm-3.5 and kdm-4.0 are just examples. You will find all
# possible versions by looking at the directories in /usr/kde/.
DISPLAYMANAGER="gdm"


Again, I haven't intentionally changed it since install.

Here's the /etc/inittab (for good measure):

Code: Select all
#
# /etc/inittab:  This file describes how the INIT process should set up
#                the system in a certain run-level.
#
# Author:  Miquel van Smoorenburg, <miquels@cistron.nl>
# Modified by:  Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
# Modified by:  Daniel Robbins, <drobbins@gentoo.org>
# Modified by:  Martin Schlemmer, <azarah@gentoo.org>
# Modified by:  Mike Frysinger, <vapier@gentoo.org>
# Modified by:  Robin H. Johnson, <robbat2@gentoo.org>
#
# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/files/inittab-2.86-r12,v 1.2 2008/12/18 20:26:27 robbat2 Exp $

# Default runlevel.
id:3:initdefault:

# System initialization, mount local filesystems, etc.
si::sysinit:/sbin/rc sysinit

# Further system initialization, brings up the boot runlevel.
rc::bootwait:/sbin/rc boot

l0:0:wait:/sbin/rc shutdown
l0s:0:wait:/sbin/halt -dhip
l1:S1:wait:/sbin/rc single
l2:2:wait:/sbin/rc nonetwork
l3:3:wait:/sbin/rc default
l4:4:wait:/sbin/rc default
l5:5:wait:/sbin/rc default
l6:6:wait:/sbin/rc reboot
l6r:6:wait:/sbin/reboot -dk
#z6:6:respawn:/sbin/sulogin

# new-style single-user
su0:S:wait:/sbin/rc single
su1:S:wait:/sbin/sulogin

# TERMINALS
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:2345:respawn:/sbin/agetty 38400 tty2 linux
c3:2345:respawn:/sbin/agetty 38400 tty3 linux
c4:2345:respawn:/sbin/agetty 38400 tty4 linux
c5:2345:respawn:/sbin/agetty 38400 tty5 linux
c6:2345:respawn:/sbin/agetty 38400 tty6 linux

# SERIAL CONSOLES
#s0:12345:respawn:/sbin/agetty 9600 ttyS0 vt100
#s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100

# What to do at the "Three Finger Salute".
ca:12345:ctrlaltdel:/sbin/shutdown -r now

# Used by /etc/init.d/xdm to control DM startup.
# Read the comments in /etc/init.d/xdm for more
# info. Do NOT remove, as this will start nothing
# extra at boot if /etc/init.d/xdm is not added
# to the "default" runlevel.
x:a:once:/etc/X11/startDM.sh
signals
Baby Hen
 
Posts: 12
Joined: Tue Jun 09, 2009 23:41

Re: VTs and QT blocks [Solved]

Postby Fitzcarraldo » Thu Jun 11, 2009 10:49

Well, xdm is also in the boot runlevel on my laptop and it launches kdm without problem.

Your /etc/conf.d/xdm also looks OK. Same as mine except that I have DISPLAYMANAGER="kdm" as I use KDE 3.5.10 instead of GNOME.

Your /etc/inittab looks identical to mine.

So I'm not sure. I wonder if something has been changed in the default GDM configuration settings file /usr/share/gdm/defaults.conf or in the custom GDM configuration file /etc/X11/gdm/custom.conf? I can't see how your repeated pressing of the F2 key during boot (which, as we know, is not the same as the F2 key on a PC keyboard) on the Apple keyboard would cause that, though. Anyway, try running gdmsetup to see if that fixes it.

If not, paste here the contents of your /etc/rc.conf file, in case something has been messed up in that.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7333
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: VTs and QT blocks [Solved]

Postby Fitzcarraldo » Thu Jun 11, 2009 23:37

Once you have done the things mentioned in my previous post, here's something else to check (I've been re-reading the Gentoo Baselayout and OpenRC Migration Guide :idea: ):

Have a look in your /etc/env.d/90xsession file. Does it have the environment variable XSESSION assigned as follows?

Code: Select all
XSESSION="Gnome"

This would specify Gnome as the X Session for all users. After you edit /etc/env.d/90xsession you need to issue the command env-update and then logout and login again for it to take effect.

Perhaps XSESSION="Gnome" is commented out? In which case delete the hash symbol.

If you don't want Gnome to be the X session for the whole system, just a specific user (you, for example), then you can instead assign XSESSION per user in each user's ~/.bashrc file. In that case, re-source the file using the command source ~/.bashrc.

N.B. Check that the script /etc/X11/Sessions/Gnome exists. You'll probably see other scripts in that directory too. On my PC, apart from the Gnome script I have scripts in /etc/X11/Sessions/ for fluxbox, kde-3, openbox and Xsession

Also have a look inside ~/.xinitrc (if it exists) and ~/.bashrc to see if anything is assigned in there, or if anything looks odd.

I think perhaps your problem is that the X session is not being specified when you boot your PC, i.e. XSESSION is not being assigned and therefore /etc/X11/Sessions/Gnome is not being run.

(Another thing I'm not entirely happy about -- despite it being the case on my PC too -- is xdm being in the boot runlevel rather than the default runlevel, but that is something we can investigate later if we run out of other avenues to explore.)
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7333
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: VTs and QT blocks [Solved]

Postby signals » Fri Jun 12, 2009 13:49

Fitzcarraldo wrote:Perhaps XSESSION="Gnome" is commented out?


What do you know? It was commented out. Don't know how that got that way...

I just made the change, but can't reboot the machine at the moment. I have work to do. I'll try at lunchtime or something.

The main reason I'm posting is because I found out how to fix that Apple "Fn" problem:

Code: Select all
echo "2" > /sys/module/hid_apple/parameters/fnmode


Now the keyboard works just like it should! I have to hit "Fn" to use the special media-functions, and F1-F12 work properly without Fn.

Thanks for all of the help. I'm finally beginning to feel at home on Sabayon. I'll post again with the results from changing my XSESSION var, as soon as I can reboot this thing.
signals
Baby Hen
 
Posts: 12
Joined: Tue Jun 09, 2009 23:41

Re: VTs and QT blocks [Solved]

Postby signals » Fri Jun 12, 2009 16:00

Hmm... I guess it was the XSESSION= variable. Either that, or it was the "fnmode" setting. Those are the only two things I changed before I rebooted, and it worked this time. I can't really see how the fnmode setting could be to blame, so it was probably XSESSION.

Now, I wonder how that got commented out? I don't remember merging any changes to that file, and I certainly didn't change it on my own. Also, gdm WAS starting, I just had to flip to the proper vt to see it. But, you never look a gift horse in the mouth, and it's working now; so maybe I should just be happy. :mrgreen:

Thanks.
signals
Baby Hen
 
Posts: 12
Joined: Tue Jun 09, 2009 23:41

Re: VTs and QT blocks [Solved]

Postby Fitzcarraldo » Fri Jun 12, 2009 16:27

It was the XSESSION variable.

Have a look at the main comment in the file /etc/env.d/90xsession: I think that is the reason why Gnome was still selected when you issued manually the /etc/init.d/xdm start or restart command:

Code: Select all
$ cat /etc/env.d/90xsession
# /etc/env.d/90xsession

# 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 are smart enough to
# look in all bin directories if it cant find a match in /etc/X11/Sessions/,
# so setting it to "enlightenment" 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 ~/.xsession exists, 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 (look in /etc/X11/Sessions/)
# Xfce4 - will start a XFCE4 session
# Xsession - will start a terminal and a few other nice apps

#XSESSION="Gnome"


Anyway, now that you are up and running perhaps you would like to add a brief article to the SL Wiki explaining how to get an Apple keyboard working with SL. That would be a good way to contribute to the project. The following post explains how to create an article in the SL Wiki: viewtopic.php?f=49&t=12787&start=70#p85268
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7333
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: VTs and QT blocks [Solved]

Postby signals » Fri Jun 12, 2009 19:22

Will do. I've never contributed to a wiki before, and I'm not a strong writer, but I'll get something up. Hopefully someone with stronger language skills than I can clean it up when I'm done. :wink:

EDIT: Done. Here it is:

http://wiki.sabayonlinux.org/index.php?title=HOWTO:_Make_The_Function_Keys_Work_On_An_Apple_Keyboard
signals
Baby Hen
 
Posts: 12
Joined: Tue Jun 09, 2009 23:41

Re: VTs and QT blocks [Solved]

Postby signals » Fri Jun 12, 2009 21:11

Hmm, I guess I was just lucky the last time I rebooted. I just did it again, and was greeted with the blank VT with a single flashing cursor in the top left corner of the screen. It doesn't appear to be fixed at all. But, I guess I can now say that it is intermittent. Not that it makes it any easier to troubleshoot. Still, at least I can easily get into X with Control-Alt-F7. :)
signals
Baby Hen
 
Posts: 12
Joined: Tue Jun 09, 2009 23:41

Re: VTs and QT blocks [Solved]

Postby Fitzcarraldo » Fri Jun 12, 2009 21:57

Bravo for the Wiki article. Bummer about the Gnome session problem, though. Have to say I'm curious about the cause and would like to get to the bottom of the problem. Has the hash symbol been reinstated in front of the XSESSION="Gnome" by something, by any chance?
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7333
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

PreviousNext

Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 3 guests