Magiclinux攻略2
时间:2006-03-29 来源:kmaya
Magiclinux攻略2 Magiclinux系统的简单修复(Magiclinux2.0)
作者:陈德宏
一:kde崩溃的修复办法
一般安装完Magiclinux后,我们要作一些配置,让magiclinux更适合自己使用或者让她更漂亮华丽,但在配置过程中难免会出错导致不能进入kde环境或者不满意而且想从头再配,这个时候最简单的办法就是重新建立一个用户(这个有点像Windowsxp ^_^),或者删除用户目录下的配置文件。
字符模式下添加用户(图形界面简单喽,不用说了吧)
字符模式下添加用户的命令:addusr
使用权限:系统管理员
使用方式:adduser [-c comment] [-d home_dir]
[-e expire_date] [-f inactive_time]
[-g initial_group] [-G group[,...]]
[-m [-k skeleton_dir] | -M] [-p passwd]
[-s shell] [-u uid [ -o]] [-n] [-r] loginid
或 adduser -D [-g default_group] [-b default_home]
[-f default_inactive]
[-e default_expire_date]
[-s default_shell]
附注:adduser 与 useradd 指令为同一指令(经由符号连结 symbolic link)
说明:新增使用者帐号或更新预设的使用者资料
参数:
-c comment 新使用者位于密码档(通常是 /etc/passwd)的注解资料
-d home_dir 设定使用者的家目录为 home_dir ,预设值为预设的 home 后面加上使用者帐号 loginid
-e expire_date 设定此帐号的使用期限(格式为 YYYY-MM-DD),预设值为永久有效
-f inactive_time 范例:
adduser是增加使用者.
相对的,也有删除使用者的指令,userdel.
语法:userdel [login ID]
2、删除配置文件的方法
删除配置文件要先转到相应的用户目录下,比如"cd /root" 到root用户目录下,"cd /home/yourhome/" 转到名为yourhome的用户目录下。
字符界面下查看目录中所有文件的命令是:
ls -a
kde的配置文件是隐藏的,隐藏文件就是名字以.号开头的目录或文件比如“.kde”,这个文件家里面就是保存着kde环境下的主要配置文件,删除这个文件夹后系统会自动重建一个默认配置的.kde目录,要删除隐藏文件或文件夹必须要在rm命令后加上 -r 命令强制删除
rm -r .kde
更改硬件配置
电脑用久了可能有时候要升级换硬件,或者有时候硬件配置出了问题要修改配置,这个问题在linux下面是比较困难的。我们以换显卡为例说明一下。
一般在windows xp下换一块显卡是没有什么问题的,插上去重启再装一下驱动就搞定了。而在linux下就没有那么智能。还好Magiclinux其实对比其他发行版本的linux来说要智能的多。
Magiclinux系统字符界面下的配置命令是:
Setup
然后正常情况下会出现如下图的界面(我这是在图形界面下终端中的截图,字符界面下应该为英文的,但是类似)
选择X配置后,系统会自动探测显卡,然后选择好分辨率和最高显示色点击确定就可以了。
手动修改x配置的方法是:vim /etc/X11/xorg.conf
修改完后要保存,先按Esc键退出编辑状态(进入编辑状态是按键盘上的Insert键),然后输入“:”表示录入命令,先输入的是“:w”保存一下,然后输入“:q”退出,当然也可以写在一起“:wq”
# Xorg configuration created by system-config-display
Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
# Multiple FontPath entries are allowed (they are concatenated together)
# By default, a font server independent of the X server is
# used to render fonts.
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/share/fonts/"
EndSection
Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "freetype"
Load "type1"
Load "dri"
EndSection
Section "InputDevice"
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds" "1 2 3"
# To disable the XKEYBOARD extension, uncomment XkbDisable.
# Option "XkbDisable"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# Or if you just want both to be control, use:
# Option "XkbOptions" "ctrl:nocaps"
#
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "yes"
EndSection
Section "Monitor"
### Comment all HorizSync and VertSync values to use DDC:
### Comment all HorizSync and VertSync values to use DDC:
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "F710B"
DisplaySize 330 250
### Comment all HorizSync and VertSync values to use DDC:
HorizSync 30.0 - 71.0
VertRefresh 50.0 - 160.0
Option "dpms"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "sis"
VendorName "Videocard vendor"
BoardName "Silicon Integrated Systems [SiS] 661/741/760/761 PCI/AGP VGA Display Adapter"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 16
Modes "800x600" "640x480"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Section "DRI"
Group 0
Mode 0666
EndSection
相关阅读 更多 +
排行榜 更多 +