• opensuse12.1遇到的各种问题


      问题总是少不了的,幸亏有了网络,它们总是能得到比较好的解决,潜移默化中,自己已经提升了很多。以后遇到的关于opensuse的各种问题就都放在这篇博客里。

    一、chromium浏览器

    如果你同步了google的帐户,而且系统启动了自动登录,那么第一次启动后会弹出这样的窗口(该窗口可以直接忽略掉的):

    The login keyring did not get unlocked when you logged into your computer
    

    我就纳闷了,不知道keyring是什么概念?我从没有设置过阿?反正跟用户密码不是一个!不知道这是什么安全机制,网上资料也不太多,不过在chrome的bug提交里看到了,总算找到了一个不太完美的解决方案:

    1.明确两个有关的目录

    chromium配置文件(即同步的信息)  ~/.config/chromium/

    所谓的keyrings目录   ~/.gnome2/keyrings/

    2.算一个解决方案吧

    首先删除这两个目录下的所有文件 --> 重启 --> 打开chromium,同步个人信息 --> 重启chromium,这时会弹出设置keyings的对话框,设置一个跟自己用户密码一样的密码,OK!怪不得,linux大哥说opensuse的安全机制过于扰人了!

    二、主机名

    在系统安装过程中,不记得有设置主机名阿?看 shell 的提示符,貌似是系统随机给的一个名字 linux***,还是修改一下吧,修改配置文件是很有用的。

    sudo vi /etc/HOSTNAME


    三、不显示 boot options

    系统启动后默认有两个或更多选项,其实压根用不到,设置直接登录则更快。有两种方法:

    1.图形化

    发现opensuse设置很方便的, yast -> boot loader settings -> section management (设置一个默认的登录选项) -> .. -> boot loader installation -> boot loader options -> boot menu (勾选hide menu on boot),并设置 timeout in  seconds 为 0,OK!

    2.配置文件

    图形化虽然方便,但是通用性较差,熟悉的话,还是修改配置文件吧,这就要了解一下系统启动的流程了,主要是grub。

    相关文件及介绍:(详细见http://www.linuxtopia.org/online_books/opensuse_guides/opensuse11.1_reference_guide/sec_grub_basic.html#sec_grub_menu_example

    /boot/grub/menu.lst

    This file contains all information about partitions or operating systems that can be booted with GRUB. Without this information, the GRUB command line prompts the user for how to proceed (see Editing Menu Entries during the Boot Procedure for details).

    # Modified by YaST2. Last modification on Sat Mar 10 17:43:04 CST 2012
    #
    THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
    #
    For the new kernel it try to figure out old parameters. In case we are not able to recognize it (e.g. change of flavor or strange install order ) it it use as fallback installation parameters from /etc/sysconfig/bootloader

    default 0
    timeout 0
    ##YaST - generic_mbr
    gfxmenu (hd0,0)/boot/message
    ##YaST - activate
    hiddenmenu

    ###Don't change this comment - YaST2 identifier: Original name: linux###
    title Desktop -- openSUSE 12.1 - 3.1.9-1.4
    root (hd0,0)
    kernel /boot/vmlinuz-3.1.9-1.4-desktop root=/dev/disk/by-id/ata-WDC_WD5000BEVT-24A0RT0_WD-WXP1A3004869-part1 resume=/dev/disk/by-id/ata-WDC_WD5000BEVT-24A0RT0_WD-WXP1A3004869-part2 splash=silent quiet showopts vga=0x314
    initrd /boot/initrd-3.1.9-1.4-desktop

    ###Don't change this comment - YaST2 identifier: Original name: failsafe###
    title Failsafe -- openSUSE 12.1 - 3.1.9-1.4
    root (hd0,0)
    kernel /boot/vmlinuz-3.1.9-1.4-desktop root=/dev/disk/by-id/ata-WDC_WD5000BEVT-24A0RT0_WD-WXP1A3004869-part1 resume=/dev/disk/by-id/ata-WDC_WD5000BEVT-24A0RT0_WD-WXP1A3004869-part2 splash=silent quiet showopts vga=0x314
    initrd /boot/initrd-3.1.9-1.4-desktop

    /boot/grub/device.map

    This file translates device names from the GRUB and BIOS notation to Linux device names.

    (hd0)    /dev/disk/by-id/ata-WDC_WD5000BEVT-24A0RT0_WD-WXP1A3004869

    /etc/grub.conf

    This file contains the commands, parameters, and options the GRUB shell needs for installing the boot loader correctly.

    setup --stage2=/boot/grub/stage2 --force-lba (hd0,0) (hd0,0)
    quit


    上面是我的配置文件,可以大概参考下,关于简介我也不好翻译,直接拿来,原汁原味,有能力的同学可以直接去看 Reference Guide

     

     四、vim配置

    设置一个艳丽点的颜色吧,vim的配置文件在  /etc/vimrc  ,或者   ~/.vimrc,我编辑的是前者(对所有用户适用)。

    colorscheme  colorname

    关于colorname,系统内置了几个, 以下命令可以查看,但感觉颜色不够鲜艳,于是自己动手吧。

    ls /usr/share/vim/vim73/colors 

    这里有各种主题:http://vimcolorschemetest.googlecode.com/svn/html/index-c.html,选一个中意的另存为 mycolor.vim 保存在 /usr/share/vim/vim73/colors 目录中。然后修改配置文件就ok了。我可能选择了个太艳丽的,还需要添加下面一句才能生效:

     set t_Co=256


    五、默认的bash界面也不够艳丽……(最好不要编辑 /etc/bash.bashrc , 系统更新可能会丢失修改的信息)

    sudo vi ~/.bashrc


    六、做一个小结

    这样一个华丽的系统,折腾起来简直没完了……发现这一周都在搞图形化的配置,以及认识界面什么的,高来高去,发现真没太大意思,好像走进了一个误区,界面太华丽反而分散了我的精力,这很不利于自身的提高,琢磨这还是从一个默认字符界面的centos学习,潜下心来,别再浮于表面了!

    苦逼少年啊,玩起来就没有尽头了……


  • 相关阅读:
    《Apache Doris在美团外卖数仓中的应用实践》
    《一文教会你如何写复杂业务的代码》
    《SOFA企业应用框架》
    《为什么阿里巴巴代码规约要求避免使用 Apache BeanUtils 进行属性的拷贝》
    《浅析VO、DTO、DO、PO的概念、区别和用处》
    Spring 注解
    《浅析VO、DTO、DO、PO的概念、区别和用处》
    dsgn_ebook
    《清华大学刘世霞“可解释机器学习的可视化分析”(附PPT)》
    《图结构的相似度度量与分类》
  • 原文地址:https://www.cnblogs.com/xiangzi888/p/2386153.html
Copyright © 2020-2023  润新知