安装配置VNC——debug的日志

安装配置VNC——debug的日志

安装sogou输入法报错 xxx is not installed.

sudo dpkg -i sogoupinyin_2.2.0.0108_amd64.deb # ??sogou???
Selecting previously unselected package sogoupinyin.
(Reading database ... 264452 files and directories currently installed.)
Preparing to unpack sogoupinyin_2.2.0.0108_amd64.deb ...
Unpacking sogoupinyin (2.2.0.0108) ...
dpkg: dependency problems prevent configuration of sogoupinyin:
 sogoupinyin depends on libopencc2 | libopencc1; however:
  Package libopencc2 is not installed.
  Package libopencc1 is not installed.
 sogoupinyin depends on fcitx-libs (>= 4.2.7); however:
  Package fcitx-libs is not installed.
 sogoupinyin depends on libqtwebkit4 (>= 2.1.0~2011week13); however:
  Package libqtwebkit4 is not installed.

dpkg: error processing package sogoupinyin (--install):
 dependency problems - leaving unconfigured
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for libglib2.0-0:amd64 (2.48.2-0ubuntu4.1) ...
No such key 'Gtk/IMModule' in schema 'org.gnome.settings-daemon.plugins.xsettings' as specified in override file '/usr/share/glib-2.0/schemas/50_sogoupinyin.gschema.override'; ignoring override for this key.
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.2) ...

Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Errors were encountered while processing:
 sogoupinyin
sudo apt install  libopencc1 fcitx-libs libqtwebkit4

libopencc2 libopencc1二者装一个就好

然后重新

sudo dpkg -i sogoupinyin_2.2.0.0108_amd64.deb # 安装sogou输入法

得到

(Reading database ... 264867 files and directories currently installed.)
Preparing to unpack sogoupinyin_2.2.0.0108_amd64.deb ...
Unpacking sogoupinyin (2.2.0.0108) over (2.2.0.0108) ...
Setting up sogoupinyin (2.2.0.0108) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for libglib2.0-0:amd64 (2.48.2-0ubuntu4.1) ...
No such key 'Gtk/IMModule' in schema 'org.gnome.settings-daemon.plugins.xsettings' as specified in override file '/usr/share/glib-2.0/schemas/50_sogoupinyin.gschema.override'; ignoring override for this key.
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.2) ...

Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...

其中No such key 'Gtk/IMModule'不影响

此后能显示这个,但不现实候选汉字

sogou输入法 新出现的候选框没有内容问题

https://www.findhao.net/res/786#i-2

删除~/.config目录下的SogouPY、SogouPY.users、sogou-qimpanel三个文件夹即可恢复正常

Install VNC on Ubuntu 16.04

  • 实现Ubuntu的桌面GUI转发

Ubuntu has several desktop environments available in its repositories. The following command installs the default desktop, Unity, as well as the dependencies that are required for the graphical interface to work properly:

sudo apt-get install ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

Note

This will install the full Ubuntu desktop environment, including office and web browsing tools. To install the desktop without these packages, run:

sudo apt-get install --no-install-recommends ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

It works for me, when I start XFCE with this command:

dbus-launch /usr/bin/startxfce4 &

in .vnc/xstartup of the user which starts vncserver.

export GSETTINGS_SCHEMA_DIR=/usr/share/mate:/usr/share/mate:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop

export XDG_DATA_DIRS=/usr/share/mate:/usr/share/mate:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop

安装方法

sudo apt install xfce4 xfce4-goodies
  • vncserver
sudo apt install tightvncserver
  • 支持powerline字体
sudo apt install powerline fonts-powerline

中文支持

https://zhuanlan.zhihu.com/p/26843097

  • 当vnc客户端连接服务器时显示的界面是英文的,主要是中文环境还没有装入,而且没有中文输入法。

~/.vnc/xstartup中写

export LANG=zh_CN.UTF-8 # 启用中文环境
scim –d  # 加载scim输入法
sudo apt-get install ttf-wqy-zenhei  # 字体
sudo apt-get install scim-pinyin  # 输入法
# sudo apt-get install scim-gtk2-immodule im-switch scim-uim scim-chinese scim-modules-table scim-tables-zh

输入法安装

https://wiki.archlinux.org/index.php/Localization/Simplified_Chinese_(简体中文)

常用的中文输入法平台有IBusfcitxscim。具体安装配置参见各自条目。

注意: scim现在维护滞后,不推荐使用。

安装fcitx输入法框架

sudo apt-get install fcitx  fcitx-config-gtk // 根据提示安装
sudo  apt-get install -f     // 安装依赖包
sudo add-apt-repository ppa:giuspen/ppa #添加源
sudo apt-get install fcitx fcitx-googlepinyin sogoupinyin #安装 fcitx 和搜狗拼音
wget http://cdn2.ime.sogou.com/dl/index/1524572264/sogoupinyin_2.2.0.0108_amd64.deb?st=oiAxBlWmfJYk6NfXpKmPfg&e=1555408685&fn=sogoupinyin_2.2.0.0108_amd64.deb
sudo dpkg -i sogoupinyin_2.2.0.0108_amd64.deb # 安装sogou输入法
sudo add-apt-repository --remove ppa:giuspen/ppa

复制黏贴

sudo apt install autocutsel

~/.vnc/xstartup中写

autocutsel -f # -f表示后台运行
vncconfig -nowin &
im-switch -s fcitx #配置默认输入法为 fcitx ,注意无须加 sudo

从远程复制中文,粘在本地是乱码

http://www.voidcn.com/article/p-wnbyufun-bgv.html

http://www.voidcn.com/article/p-keiwdqln-bgv.html

http://ask.zol.com.cn/x/4652161.html

https://cloud.tencent.com/developer/ask/23121

https://changkun.us/archives/2016/08/209/

文件传输

https://www.realvnc.com/connect/docs/file-transfer.html

输入法设置

https://xunyunliu.github.io/post/install_sogou/

修改系统语言

https://blog.csdn.net/f156207495/article/details/80795722

安装中文语言包

sudo apt-get install  language-pack-zh-han*

安装gnome包

sudo apt-get install   language-pack-gnome-zh-han*

安装kde包

sudo apt-get install   language-pack-kde-zh-han*

最后运行语言支持检查

sudo apt install $(check-language-support)

ubuntu 16.04 输入法候选框不显示:

sougou输入法安装需要 fcitx-module-kimpanel,请勿apt remove 它

sudo apt-get remove fcitx-ui-qimpanel

使用经典UI界面。除了此方法以外还可以通过设置Fcitx的Addon选项来解决该问题即禁止Fcitx中Kimpanel的支持,如下

去掉Kimpanel前面的选中选项,重新启动后切换到中文就可以看到候选框了。

rm -r ~/.config/fcitx
sudo apt-get purge fcitx*
sudo apt-get install fcitx-googlepinyin
sudo apt install fcitx-ui-classic
fcitx -r # restart

How to Install KDE Environment and VNC remote desktop connection to Ubuntu 14.04 Linux server

https://siterobot.io/en/blog/how-to-install-kde-environment-and-vnc-remote-desktop-connection-to-ubuntu-1404-linux-server-24

sudo apt-get update
sudo apt-get install -y kubuntu-desktop

https://blog.51cto.com/2955941/647369

# dbus-launch /usr/bin/startxfce4 &
# startkde
exec /usr/bin/startkde # startkde
# exec gnome-session
# exec /usr/bin/startlxde

https://wiki.archlinux.org/index.php/KDE_(简体中文)#字体感觉模糊

  • 建议安装plasma-widgets-kimpanel,未安装成

卸载方法

sudo apt remove --purge tightvncserver xfce4* xfce4-goodies powerline fonts-powerline ttf-wqy-zenhei  autocutsel fcitx-googlepinyin  libgooglepinyin* \
kubuntu-desktop  \
ubuntu-desktop *gnome* gnome-panel gnome-settings-daemon metacity* nautilus gnome-terminal \
fcitx-ui-classic *fcitx*  sogoupinyin fcitx-googlepinyin scim-pinyin scim \
plasma-widgets-kimpanel vnc4server \
fcitx-libs libqtwebkit4

请勿运行apt autoremove,它可能会把除了上述包相关的包也卸载了。用上面的匹配就能卸干净

要达到效果

apt list | grep -E 'xfce4|fcitx|gnome|ubuntu-desktop|kubuntu-desktop|vnc4server|sogoupinyin|googlepinyin|scim|autocutselpowerline|ttf-wqy-zenhei|libqtwebkit4|metacity*|nautilus|plasma-widgets-kimpanel' | grep -E 'residual-config|installed'

是空的,即没有residual-config,也没有installed

which startxfce4
which fcitx
which /etc/vnc/xstartup
which vncconfig
rm /tmp/.X11-unix/X1 /tmp/.X1-lock ~/.vnc/{*.log,*.pid}

也都是not found

sudo apt install vim-gnome