“UbuntuHelp:BadDeviceError”的版本间的差异
来自Ubuntu中文
小 (新页面: {{From|https://help.ubuntu.com/community/BadDeviceError}} {{Languages|UbuntuHelp:BadDeviceError}} === Removing the 'BadDevice' Errors === This page describes how to get rid of the BadDev...) |
小 |
||
第2行: | 第2行: | ||
{{Languages|UbuntuHelp:BadDeviceError}} | {{Languages|UbuntuHelp:BadDeviceError}} | ||
=== Removing the 'BadDevice' Errors === | === Removing the 'BadDevice' Errors === | ||
− | |||
This page describes how to get rid of the BadDevice errors when starting a GUI application from a Terminal: | This page describes how to get rid of the BadDevice errors when starting a GUI application from a Terminal: | ||
<pre><nowiki>X Error: BadDevice, invalid or uninitialized input device 170 | <pre><nowiki>X Error: BadDevice, invalid or uninitialized input device 170 | ||
第15行: | 第14行: | ||
Failed to open device | Failed to open device | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
==== The Fix ==== | ==== The Fix ==== | ||
To stop these errors from appearing you need to modify your ''/etc/X11/xorg.conf'' file and remove the relevant parts. | To stop these errors from appearing you need to modify your ''/etc/X11/xorg.conf'' file and remove the relevant parts. | ||
First we'll make a backup, just in case. | First we'll make a backup, just in case. | ||
− | |||
Open the file by pressing Alt+F2 and putting in: | Open the file by pressing Alt+F2 and putting in: | ||
<pre><nowiki>gksu gedit /etc/X11/xorg.conf | <pre><nowiki>gksu gedit /etc/X11/xorg.conf | ||
第27行: | 第24行: | ||
</nowiki></pre> | </nowiki></pre> | ||
For Kubuntu | For Kubuntu | ||
− | |||
Then choose '''File -> Save As''' and save it as ''xorg.conf.backup'' | Then choose '''File -> Save As''' and save it as ''xorg.conf.backup'' | ||
− | |||
Now to change the file, | Now to change the file, | ||
Find this part: | Find this part: | ||
第39行: | 第34行: | ||
Option "ForceDevice" "ISDV4" # Tablet PC ONLY | Option "ForceDevice" "ISDV4" # Tablet PC ONLY | ||
EndSection | EndSection | ||
− | |||
Section "InputDevice" | Section "InputDevice" | ||
Driver "wacom" | Driver "wacom" | ||
第47行: | 第41行: | ||
Option "ForceDevice" "ISDV4" # Tablet PC ONLY | Option "ForceDevice" "ISDV4" # Tablet PC ONLY | ||
EndSection | EndSection | ||
− | |||
Section "InputDevice" | Section "InputDevice" | ||
Driver "wacom" | Driver "wacom" | ||
第64行: | 第57行: | ||
</nowiki></pre> | </nowiki></pre> | ||
In the '''Section "ServerLayout"''' section and delete/comment out those too. | In the '''Section "ServerLayout"''' section and delete/comment out those too. | ||
− | |||
Once you've done that, choose '''File -> Save As''' and save it as ''xorg.conf'' to replace the origional. | Once you've done that, choose '''File -> Save As''' and save it as ''xorg.conf'' to replace the origional. | ||
− | |||
You will then have to restart the X server for the settings to take effect. First save anything you are working on and logout, then from the login screen menu choose "Restart the X server", then you can log back in. | You will then have to restart the X server for the settings to take effect. First save anything you are working on and logout, then from the login screen menu choose "Restart the X server", then you can log back in. | ||
− | |||
=== If Something Went Wrong === | === If Something Went Wrong === | ||
If, after you chose to restart the X server, you don't get the login screen back, then the you may have not competed the steps properly or just made a mistake somewhere, but that's why we created a backup. | If, after you chose to restart the X server, you don't get the login screen back, then the you may have not competed the steps properly or just made a mistake somewhere, but that's why we created a backup. | ||
− | |||
Login to the console and from there run this command: | Login to the console and from there run this command: | ||
<pre><nowiki>sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf | <pre><nowiki>sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf | ||
</nowiki></pre> | </nowiki></pre> | ||
That will restore your X configuration back to how it was before, then restart the login manager: | That will restore your X configuration back to how it was before, then restart the login manager: | ||
− | |||
In Ubuntu | In Ubuntu | ||
<pre><nowiki>sudo /etc/init.d/gdm restart | <pre><nowiki>sudo /etc/init.d/gdm restart |
2007年11月30日 (五) 16:12的版本
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
Removing the 'BadDevice' Errors
This page describes how to get rid of the BadDevice errors when starting a GUI application from a Terminal:
X Error: BadDevice, invalid or uninitialized input device 170 Major opcode: 146 Minor opcode: 3 Resource id: 0x0 Failed to open device X Error: BadDevice, invalid or uninitialized input device 170 Major opcode: 146 Minor opcode: 3 Resource id: 0x0 Failed to open device
The Fix
To stop these errors from appearing you need to modify your /etc/X11/xorg.conf file and remove the relevant parts. First we'll make a backup, just in case. Open the file by pressing Alt+F2 and putting in:
gksu gedit /etc/X11/xorg.conf
For Ubuntu, or
kdesu kate /etc/X11/xorg.conf
For Kubuntu Then choose File -> Save As and save it as xorg.conf.backup Now to change the file, Find this part:
Section "InputDevice" Driver "wacom" Identifier "stylus" Option "Device" "/dev/input/wacom" Option "Type" "stylus" Option "ForceDevice" "ISDV4" # Tablet PC ONLY EndSection Section "InputDevice" Driver "wacom" Identifier "eraser" Option "Device" "/dev/input/wacom" Option "Type" "eraser" Option "ForceDevice" "ISDV4" # Tablet PC ONLY EndSection Section "InputDevice" Driver "wacom" Identifier "cursor" Option "Device" "/dev/input/wacom" Option "Type" "cursor" Option "ForceDevice" "ISDV4" # Tablet PC ONLY EndSection
and either delete or comment out the lines. (To comment out the lines you put a '#' character at the beginning of each line) Then find the lines:
InputDevice "stylus" "SendCoreEvents" InputDevice "cursor" "SendCoreEvents" InputDevice "eraser" "SendCoreEvents"
In the Section "ServerLayout" section and delete/comment out those too. Once you've done that, choose File -> Save As and save it as xorg.conf to replace the origional. You will then have to restart the X server for the settings to take effect. First save anything you are working on and logout, then from the login screen menu choose "Restart the X server", then you can log back in.
If Something Went Wrong
If, after you chose to restart the X server, you don't get the login screen back, then the you may have not competed the steps properly or just made a mistake somewhere, but that's why we created a backup. Login to the console and from there run this command:
sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf
That will restore your X configuration back to how it was before, then restart the login manager: In Ubuntu
sudo /etc/init.d/gdm restart
In Kubuntu
sudo /etc/init.d/kdm restart
Then you can log back in and try again.