Kubuntu
@ fragrant10 | 2021-05-13T22:16:07+08:00 | 2 minutes read | Update at 2021-05-13T22:16:07+08:00

记录Kubuntu日常常用的小技巧:剪切板、触摸板手势、ldx安装kali、乱码reset

内容copy到剪切板或者鼠标滚轮键

安装软件sudo apt install xsel xclip

将文件内容copy到剪切板

本地
xsel -b < file
OR
xclip -sel c < file

如果是登录其它linux机器需要在ssh的时候加上-X参数

ssh -X xxx@xx.xx.xx.xx

将命令输出存储到剪切板

echo -n 111 | xsel -b
cat /etc/passwd | xclip -sel c

将剪切板中的内容输出到文件

xsel -b -o >> file # -o 貌似可以省略

将文件内容或命令输出copy到鼠标滚轮键和将鼠标滚轮键中的内容输出到文件

将文件内容copy到鼠标滚轮键
xsel < file
OR
xclip < file
将命令输出copy到鼠标滚轮键
echo -n 111 | xsel
cat /etc/passwd | xclip

将鼠标滚轮键中的内容输出到文件
xsel >> file
xclip >> file

touchpad gestures

安装

sudo gpasswd -a $USER input
newgrp input
sudo apt-get install libinput-tools
sudo apt-get install ruby
sudo gem install fusuma
sudo apt-get install xdotool
sudo gem install fusuma-plugin-tap fusuma-plugin-keypresss

自定义手势映射

mkdir -p ~/.config/fusuma        # create config directory
vim ~/.config/fusuma/config.yml # edit config file.

支持的手势

  • swipe:
    • support 3:, 4: fingers
    • support left:, right:, up:, down: directions
  • pinch:
    • support 2:, 3:, 4: fingers
    • support in:, out: directions
  • rotate:
    • support 2:, 3:, 4: fingers
    • support clockwise:,counterclockwise: directions

我的手势vim ~/.config/fusuma/config.yml

swipe:
  3:
    left:
      command: 'xdotool key ctrl+shift+Tab'
    right:
      command: 'xdotool key ctrl+Tab'
    up:
      command: 'xdotool key ctrl+t'
      keypress:
        LEFTSHIFT:
          command: 'xdotool key --clearmodifiers ctrl+shift+t'
    down:
      command: 'xdotool key ctrl+w'
      keypress:
        LEFTSHIFT:
          command: 'xdotool key --clearmodifiers ctrl+d'
  4:
    left:
      command: 'xdotool key super+shift+Tab'
    right:
      command: 'xdotool key super+Tab'
    up:
      command: 'xdotool key super+a'
    down:
      command: 'xdotool key super+a'

tap:
  4:
    command: 'xdotool key alt+Tab'

pinch:
  2: 
    in:
      command: "xdotool key ctrl+alt+a"
    out:
      command: "xdotool key ctrl+alt+a"

plugin:
  inputs:
    libinput_command_input:
      enable-tap: true
      verbose: true

threshold:
  swipe: 0.5
  pinch: 0.9

interval:
  swipe: 0.5
  pinch: 0.5

开机自启

iberianpig/fusuma

ubuntu连接ssh后点击或者滚动鼠标都会出现乱码

SSH终端鼠标点击滚动出现乱码字符

输入reset回车即可

kubuntu通过lxd安装kali桌面版虚拟机

安装dbus-x11,否则会打不开xfce4-panel

sudo apt-get install dbus-x11

.bashrc 添加

export DISPLAY=:0
cd ~
export $(dbus-launch)

宿主机直接运行即可 lxc exec gkali -- sudo -u kali -i xfce4-panel

Kali Linux LXC/LXD Images | Kali Linux Documentation

devhackrahul/Kali-Linux-LXD

LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Failed to execute child process "dbus-launch" (No such file or directory) while x-forwarding

© 2019 - 2021 fragrant10 的博客

Powered by Hugo with theme Dream.

avatar

fragrant10 的博客
与其感慨路难行,不如马上出发。

About Me

Hi, my nane is Fan Gao.

This is my blog.