windows 子shell配置

1. 在终端界面键入以下操作


cp  /etc/apt/sources.list  /etc/apt/sources.list.bak


2. 使用vi编辑器,创建新的源文件


vi  /etc/apt/sources.list


3. 选择一个源,将源代码复制进去

# 中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ cosmic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ cosmic main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ cosmic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ cosmic-security main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ cosmic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ cosmic-updates main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ cosmic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ cosmic-backports main restricted universe multiverse

# 阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse


4. ==更新源==


sudo apt-get update


5. 安装 xorg


sudo apt-get install xorg


6. 安装xfce4


sudo apt-get install xfce4


7. 安装xrdp


sudo apt-get install xrdp


8. 配置xrdp(配置端口)


sudo sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini


9. 向xsession中写入xfce4-session


sudo echo xfce4-session >~/.xsession

10. 重启xrdp服务


sudo service xrdp restart


在Cortana中搜索远程桌面连接,点击进入,输入本机IP(本地回环地址127.0.0.1,可用来测试):端口(3390或者3389),以及子系统用户名
登陆成功,显示Ubuntu的图形界面。

==注:每次远程连接之前都要在终端中启动xrdp,并且窗口不能关闭。==

sudo service xrdp start

配置中文字符

输入命令:

sudo gedit /etc/default/locale

将如下添加进去,保存

LANG=zh_CN.UTF-8 
LANGUAGE=”zh_CN:zh”

安装中文字体(这里以文泉驿微米黑为例):

sudo apt-get install ttf-wqy-microhei

重启,搞定

安装谷歌输入法

1) 卸载之前没装好的搜狗输入法。

arac@test:~/Downloads$ sudo apt-get remove fcitx*

删除依赖库

arac@test:~/Downloads$ sudo apt-get autoremove

检测是否删除fcitx

arac@test:~/Downloads$ dpkg --get-selections | grep fcitx          模仿网友的,可惜我不太会用它,这里对我没发挥任何作用。

2) Ubuntu 默认是安装了ibus,这里先卸载它。

arac@test:~/Downloads$ sudo apt-get remove ibus

3) 添加fcitx的nightlyPPA。有两种方式:

方法一: 在源中添加nightly源。

    arac@test:~/Downloads$ sudo gedit /etc/apt/sources.list

加入以下两行:

    deb http://ppa.launchpad.net/fcitx-team/nightly/ubuntu quantal main

    deb-src http://ppa.launchpad.net/fcitx-team/nightly/ubuntu quantal main

    然后:

    arac@test:~/Downloads$ sudo apt-get update

    方法二: PPA,在终端输入:

    arac@test:~/Downloads$ sudo add-apt-repository ppa:fcitx-team/nightly

    arac@test:~/Downloads$ sudo apt-get update

4) 安装fcitx,Google输入法,云输入法

arac@test:~/Downloads$ sudo apt-get install fcitx fcitx-config-gtk fcitx-sunpinyin fcitx-googlepinyin fcitx-module-cloudpinyin

arac@test:~/Downloads$ sudo apt-get install fcitx-table-all

5) 设置fcitx为默认输入法

arac@test:~/Downloads$ im-switch -s fcitx -z default

arac@test:~/Downloads$ sudo im-switch -s fcitx -z default

6) 注销,看到右上角输入法出来了。Ctrl+空格键可以切换,和windows下风格似乎差不多,赞!

如果遇到终端无法获取程序文件,尝试一下命令

https://blog.csdn.net/appleyuchi/article/details/80203134
    
root@DESKTOP-IE0AIQ7:~# update-alternatives --config x-terminal-emulator 
There is only one alternative in link group x-terminal-emulator (providing /usr/bin/x-terminal-emulator): /usr/bin/gnome-terminal.wrapper 
Nothing to configure.
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 官网 中文版本 好的网站 Content-type: text/htmlBASH Section: User ...
    不排版阅读 4,483评论 0 5
  • 一、Python简介和环境搭建以及pip的安装 4课时实验课主要内容 【Python简介】: Python 是一个...
    _小老虎_阅读 5,846评论 0 10
  • ORA-00001: 违反唯一约束条件 (.) 错误说明:当在唯一索引所对应的列上键入重复值时,会触发此异常。 O...
    我想起个好名字阅读 5,453评论 0 9
  • feisky云计算、虚拟化与Linux技术笔记posts - 1014, comments - 298, trac...
    不排版阅读 3,938评论 0 5
  • 要资源的过程充满了诱惑,哈哈,吃喝玩乐一天。
    c95f1478303f阅读 172评论 0 1