zoukankan      html  css  js  c++  java
  • CentOS7桌面版系统使用的一些小技巧

    1、 清空~/.kde/ 文件下的文件,登陆后不显示桌面的解决方法

    在使用CentOS7 桌面系统时,有时候打开文件会很卡。这时我们需要清空当前用户下的 .kde 文件下的所有文件。

    再重新登陆该用户时,会发现桌面上的图标都不显示了。

    首先查看一下系统语言hao@test01: $ cat ~/.config/user-dirs.locale 
    zh_CN       ##发现是中文的

    然后我们需要查看~/.config/user-dirs.dirs 配置文件是否正常

    hao@test01: $ cat ~/.config/user-dirs.dirs 

    # This file is written by xdg-user-dirs-update
    # If you want to change or add directories, just edit the line you're
    # interested in. All local changes will be retained on the next run
    # Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
    # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
    # absolute path. No other format is supported.
    # 
    XDG_DESKTOP_DIR="$HOME/桌面"
    XDG_DOWNLOAD_DIR="$HOME/下载"
    XDG_TEMPLATES_DIR="$HOME/模板"
    XDG_PUBLICSHARE_DIR="$HOME/公共"
    XDG_DOCUMENTS_DIR="$HOME/文档"
    XDG_MUSIC_DIR="$HOME/音乐"
    XDG_PICTURES_DIR="$HOME/图片"
    XDG_VIDEOS_DIR="$HOME/视频"


    不显示的原因是
    XDG_DESKTOP_DIR="$HOME/"
    ……

    在$HOME/ 添加桌面的 目录就行了。
    如果是英文 就是"$HOME/DeskTop"

    vim  ~zhousc/.config/user-dirs.dirs  



    2、在桌面上添加图标

    cat /usr/local/bin/desktop-shotcut.bash 

    source ~/.config/user-dirs.dirs
    
    ln -s /usr/share/applications/firefox.desktop $XDG_DESKTOP_DIR/firefox.desktop
    ln -s /usr/share/applications/mozilla-thunderbird.desktop $XDG_DESKTOP_DIR/mozilla-thunderbird.desktop
    ln -s /usr/share/applications/pidgin.desktop $XDG_DESKTOP_DIR/pidgin.desktop
    ln -s /usr/share/applications/spark.desktop $XDG_DESKTOP_DIR/spark.desktop
    ln -s /usr/share/applications/shotgun.desktop $XDG_DESKTOP_DIR/shotgun.desktop
    
    #指定用户添加不同的桌面图标
    if [[ $USER == lisi ]]|| [[ $USER == zhaoliu ]]
     then
        ln -s /usr/share/applications/recorder.desktop $XDG_DESKTOP_DIR/recorder.desktop
    fi
    

      

  • 相关阅读:
    三部曲搭建本地nuget服务器(图文版)
    用批处理编译*.sln工程
    一组无序的整数找出出现次数大于一半的数字
    程序打怪升级之旅
    web开发有那些牛逼东西可以用
    Visual Studio for mac从入门到放弃1
    svn自动更新服务器最新代码
    WinRT支持GB2312
    初试Node —— node.js的安装
    为什么要重写equals方法和hashcode方法
  • 原文地址:https://www.cnblogs.com/luck123/p/8602971.html
Copyright © 2011-2022 走看看