LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-18-2009, 10:58 AM   #1
dreamwalking
Member
 
Registered: Dec 2005
Distribution: Slackware 14
Posts: 106

Rep: Reputation: 31
Xorg 1.6.5: can't find the xorg.conf file to configure keyboard.


Hi all,

I would like help to configure xorg to change keyboard layout.

I just did a fresh install of Debian Squeeze (testing) and X 11.0, xorg 1.6.5 is installed. I need to be able to switch keyboard layout and up to now (in my Lenny/Sid I had previously and all previous versions of Debian I've used), I was able to do it by tweaking the /etc/X11/xorg.conf :

Quote:
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc102"
Option "XkbLayout" "us,el" #xkeymap0
Option "XkbOptions" "grp:alt_shift_toggle"
EndSection
My problem is that there is no xorg.conf file in any of the usual locations. I created a new one by X -configure, which I copied to /etc/X11/xorg.conf and edited the keyboard section. But xorg doesn't seem to read it and I still can't switch my keyboard layout.

I'm sure I'm missing the obvious here, I would appreciate any help.

Thanks.

Last edited by dreamwalking; 12-18-2009 at 06:02 PM.
 
Old 12-18-2009, 02:37 PM   #2
kofucii
Member
 
Registered: May 2007
Location: Bulgaria
Distribution: Slackware, SCO Unix
Posts: 62

Rep: Reputation: 20
I, don't know how is on Debian, but in new Slackware, the new X doesn't need xorg.conf, sot here is no one. You can add "setxkbmap" command into your .xinitrc file:
Code:
setxkbmap -model pc102 -layout us,el -option grp:alt_shift_toggle
 
1 members found this post helpful.
Old 12-18-2009, 05:43 PM   #3
dreamwalking
Member
 
Registered: Dec 2005
Distribution: Slackware 14
Posts: 106

Original Poster
Rep: Reputation: 31
Thanks for answering me!

Yes, I remember too reading somewhere that the new X doesn't need xorg.conf. I wonder how are people supposed to configure/customize their settings, though.

Well, by trying to implement your suggestion, I noticed two more things:

1) I don't have .xinitrc
2) Control-Alt-Backspace doesn't kill X anymore!

I wrote a .xinitrc but, apparently, it doesn't get read. I also tried to pass setxkbmap into ~/.profile, but doesn't function either: once I exit the session, it stops working.

So, problem remains the same.
 
Old 12-18-2009, 06:15 PM   #4
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
I don't know the answer to your question exactly, but at least in the new Slackware with the new xorg, you CAN create an xorg.conf file and it will be used. It's required for my NVIDIA proprietary driver. On my slack, at least, there is xorgsetup I believe will allow for a remap of the keyboard and set up an xorg.conf file for you. I'm not sure how well it will work, but it's worth a try. You can always just "rm xorg.conf" if it fails to work properly with no ill effects. Of course this has been my experience with slackware_current while trying to sort out a driver issue the last few weeks.
 
1 members found this post helpful.
Old 12-18-2009, 06:27 PM   #5
dreamwalking
Member
 
Registered: Dec 2005
Distribution: Slackware 14
Posts: 106

Original Poster
Rep: Reputation: 31
Thanks for your answer, unfortunately there's no xorgsetup or xorgcfg in Debian. I finally solved the problem, but I definitively have to get xorg to read a xorg.conf.

BTW, out of curiosity, does Control+Alt+Backspace kill X in Slackware? I wonder why it stopped doing so in Debian.

Anyway, I solved the problem thanks to this page.

Basically, I created a /etc/hal/fdi/policy/x11-input.fdi file:

Quote:
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keyboard">
<merge key="input.x11_options.XkbOptions" type="string">terminate:ctrl_alt_bksp</merge>
<merge key="input.x11_options.XkbModel" type="string">pc102</merge>
<merge key="input.x11_options.XkbLayout" type="string">us,el</merge>
<merge key="input.x11_options.XkbOptions" type="string">grp:alt_shift_toggle</merge>
</match>
</device>
</deviceinfo>
And now I can switch to Greek keyboard at least in X.

BTW, the terminate:ctrl_alt_bksp option doesn't work

Anyway, problem solved and thanks those who answered.

Last edited by dreamwalking; 12-18-2009 at 06:28 PM.
 
Old 12-18-2009, 06:48 PM   #6
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
Yes CTRl+ALT+BACKSPACE does kill x. It's a version thing I believe from http://www.linuxquestions.org/questi...cpugpu-776169/. From a console you can't type
PHP Code:
xorgsetup 
and bring up a curses based program to modify the xserver?
 
Old 12-18-2009, 07:02 PM   #7
dreamwalking
Member
 
Registered: Dec 2005
Distribution: Slackware 14
Posts: 106

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by damgar View Post
Yes CTRl+ALT+BACKSPACE does kill x. It's a version thing I believe from http://www.linuxquestions.org/questi...cpugpu-776169/.
Interesting. From the second post in this thread:
Quote:
If you do not have an /etc/X11/xorg.conf file, then your X server needs HAL to run.
Which I assume must be my case? That could be why X does not read the xorg.conf I wrote myself but it does read the hal policy file.

Quote:
Originally Posted by damgar View Post
From a console you can't type
PHP Code:
xorgsetup 
and bring up a curses based program to modify the xserver?
No, this does not work in Debian (I think). I believe in Etch (not sure) there was the equivalent xorgcfg, but now this doesn't work anymore. It's either you manually edit the xorg.conf file, or you reconfigure the package (dpkg-reconfigure xserver-xorg).

But after reading the thread you linked, it seems I should try and modify hal policies instead of xorg.conf.
 
Old 12-18-2009, 07:38 PM   #8
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
My machine doesn't require xorg.conf and doesn't have one if I don't create one, it's actually been very handy for me to troubleshoot issues with the nvidia proprietary driver and kernels from 2.6.31 up locking my machine. After the required hard reset I just rename xorg.conf so I startx with an open source driver. Debian (or actually ubuntu) always confuses me

Last edited by damgar; 12-18-2009 at 07:41 PM.
 
Old 12-18-2009, 10:48 PM   #9
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,883
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
dpkg-reconfigure console-setup has an option for ctrl+alt+backspace to kill X

Xorg - Debian Wiki
Quote:
What if I do not have an xorg config file?

If xorg.conf is missing for some reason, Xorg will probe your hardware on every startup. Though this works fine in most cases, some settings remain inaccessible. To create a starting point for customization, do the following:

Switch to a console as root (not a terminal emulator in X), then run:

/etc/init.d/kdm stop
/etc/init.d/gdm stop
/etc/init.d/xdm stop
cd /etc/X11/
Xorg -configure

Alternatively, reboot the machine in single user mode, then run:

cd /etc/X11/
Xorg -configure

Follow the on-screen instructions. This should give you something to work with.
 
Old 12-19-2009, 01:42 AM   #10
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

With Debian these days it is best, IMNSHO, to use the "console-setup" package. Yes, I know that sounds strange since you are asking about X, but if you use this package to set your keyboard on the console, X will automatically use the same settings. So just install the package and answer the config questions it asks you.

I think this has been the situation is sid for about 6 months now.

http://packages.debian.org/sid/console-setup

Cheers,

Evo2.
 
1 members found this post helpful.
Old 12-19-2009, 06:05 AM   #11
dreamwalking
Member
 
Registered: Dec 2005
Distribution: Slackware 14
Posts: 106

Original Poster
Rep: Reputation: 31
@ damgar:
Yeah, I've heard Slackware is more straight-forward than Debian. I wouldn't mind to have to create my own xorg.conf file (I did already, actually), but I'm puzzled as to why xorg doesn't read it.
I have configured the xdm to iniciate at startup, so I log in directly in X, but even if I go with startx, xorg.conf still doesn't get read.


@ craigevil:
Thanks for your answer!
Quote:
dpkg-reconfigure console-setup
gives me only 3 options: "Encoding for the console", "Character set to support" and "Font for the console".
As for the Debian wiki entry, I saw it before posting this thread. My problem is, actually, that X seems to ignore my xorg.conf. However, editing the hald seemed to fix the problem (though ctrl+alt+bksp still doesn't kill X).


@ Evo2:
And now I have Greek on the console, too! Thanks!
(I was initially hesitant to change the default encoding, but it works fine, I can switch easily between Latin and Greek characters)

Last edited by dreamwalking; 12-19-2009 at 06:11 AM.
 
Old 12-19-2009, 07:07 AM   #12
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Bullseye
Posts: 1,508

Rep: Reputation: Disabled
I found to re-enable ctrl-alt-bkspce to restart X i had to do the following:

Code:
dpkg-reconfigure keyboard-configuration
See if that works for you.
 
Old 12-19-2009, 07:55 AM   #13
dreamwalking
Member
 
Registered: Dec 2005
Distribution: Slackware 14
Posts: 106

Original Poster
Rep: Reputation: 31
@ the trooper:

It doesn't.
However the /etc/default/keyboard is modified:

Quote:
# The following variables describe your keyboard and can have the same
# values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options
# in /etc/X11/xorg.conf.

XKBMODEL="pc102"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS="terminate:ctrl_alt_bksp"
I'm more confused now. Does the new X ignores all the configuration files? Should I stick with the advice of this post (http://www.linuxquestions.org/questi...9/#post3794455) and only try and edit the hald?
 
Old 12-19-2009, 07:59 AM   #14
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Bullseye
Posts: 1,508

Rep: Reputation: Disabled
Did dpkg-reconfigure keyboard-configuration give you the option to use ctrl-alt-bkspce?.
You might also have to restart X.
 
Old 12-19-2009, 08:10 AM   #15
dreamwalking
Member
 
Registered: Dec 2005
Distribution: Slackware 14
Posts: 106

Original Poster
Rep: Reputation: 31
Yes, it did give me the option and I did restart X. It just doesn't work.

Googling a bit more about this, it seems to be a feature of X.org > 1.5, supposedly to prevent new users from accidentally killing X and lose their work? I still don't get why users that do want this functionality are not given an easy and obvious option to get it.
 
  


Reply



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
How to configure xorg.conf vishalkhialani Linux - Hardware 2 07-24-2009 06:03 AM
Xorg.conf configure help ohadbasan Linux - Newbie 5 06-02-2009 03:22 AM
xorg.conf keyboard problem purrcy Linux - Newbie 3 02-01-2009 02:05 PM
Xorg.conf Keyboard layouts flebber Debian 1 05-18-2007 07:59 AM
keyboard layouts with xorg.conf logicport Linux - Software 1 07-27-2004 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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