How To Mount OneDrive In Linux Using Rclone (Supports Business And Personal Accounts)

Microsoft OneDrive doesn’t have an official client application for Linux, but you can access your OneDrive files from a file manager on Linux thanks to a third-party tool called Rclone. This article explains how to mount OneDrive in Linux using Rclone.

OneDrive mounted Linux
Continue reading “How To Mount OneDrive In Linux Using Rclone (Supports Business And Personal Accounts)”

Gnome On Xorg 配置多功能鼠标侧键

1. 安装xbindkeys、xdotool

sudo pacman -S xbindkeys xdotool

2. 生成默认的xbindkeys配置文件:

$ xbindkeys -d > ~/.xbindkeysrc

3. 编辑~/.xbindkeysrc,定义鼠标侧键功能。增加如下定义:

"xdotool key --clearmodifiers Page_Up"
 b:9
 "xdotool key --clearmodifiers Page_Down"
 b:8

4. 设置xbindkeys自启动。编辑~/.xprofile,内容如下:

#!/bin/bash
xbindkeys &

参考:

https://wiki.archlinux.org/index.php/Xbindkeys

http://zzss.cf/?p=5290

Gnome On Wayland 配置多功能鼠标侧键

参考1:wayland-mouse-mapper

安装libinput、evemu,并下载mousemapper.sh和mousemapper.service。

sudo pacman -S libinput evemu
wget https://github.com/mathportillo/wayland-mouse-mapper/raw/master/mousemapper.sh
wget https://raw.githubusercontent.com/mathportillo/wayland-mouse-mapper/master/mousemapper.service

修改mousemapper.sh默认配置,将鼠标侧键功能改为PAGEUP、PAGEDOWN:

# COMMANDS MAP
# BTN_EXTRA=(KEY_LEFTMETA KEY_PAGEUP)
# BTN_SIDE=(KEY_LEFTMETA KEY_PAGEDOWN)
BTN_EXTRA=(KEY_PAGEUP)
BTN_SIDE=(KEY_PAGEDOWN)

用root权限启动:

chmod +x mousemapper.sh
sudo ./mousemapper.sh

测试发现,按鼠标侧键时,可上下翻页,但浏览器中的网页会切换到上一页或下一页。

参考2:ubuntu 14.04配置多功能鼠标

安装xinput、xev

sudo pacman -S xorg-xinput xorg-xev

然后找到鼠标设备id:

$ xinput list | grep 'id='
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
 ⎡ Virtual core pointer                        id=2    [master pointer  (3)]
 ⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
 ⎜   ↳ xwayland-pointer:17                         id=6    [slave  pointer  (2)]
 ⎜   ↳ xwayland-relative-pointer:17                id=7    [slave  pointer  (2)]
 ⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
     ↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
     ↳ xwayland-keyboard:17                        id=8    [slave  keyboard (3)]

猜测鼠标设备id=6。获取其button-map:

$ xinput get-button-map 6
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
1 2 3 4 5 6 7 8 9 10

获取鼠标侧键的键值:

$ xev |grep button
    state 0x0, button 9, same_screen YES
    state 0x0, button 9, same_screen YES
    state 0x0, button 8, same_screen YES
    state 0x0, button 8, same_screen YES

确定两个侧键键值为:上=9,下=8。

设置button-map,屏蔽8和9两个键,避免浏览器前后翻页:

$ xinput set-button-map 6 1 2 3 4 5 6 7 0 0 10

再次测试,功能正常。

最后按mousemapper主页,将其转为service:

sudo cp mousemapper.sh /usr/bin/mousemapper
sudo cp mousemapper.service /usr/lib/systemd/system/
sudo systemctl enable mousemapper.service
sudo systemctl start mousemapper.service

DONE !

How to Enable Fractional Scaling in Ubuntu 19.10 Eoan

This quick tutorial shows how to enable the fractional scaling in Ubuntu 19.10 for both default X and wayland sessions.

The Display settings only offer two scaling values (100% and 200%) by default. For HiDPI displays, you may want fractional scaling values, like 125% or 150%, and here’s how to do the job.

Continue reading “How to Enable Fractional Scaling in Ubuntu 19.10 Eoan”

用rm递归递归删除子目录下所有.o后缀文件

1. 递归删除文件

find . -name “*.o”  | xargs rm -f


可以通过管道命令来操作,先find出主目录 下想删除的文件,然后通过“xargs”这个构造参数列表并运行命令。

find named/ -name *.bak | xargs rm -f

2. 递归删除目录

目录的话,需要添加 -r

find . -name “Build”  | xargs rm -rf


https://blog.csdn.net/skylin19840101/article/details/75099240

HOW TO DOWNLOAD THE LATEST RELEASE FROM GITHUB

GitHub Releases are a great resource for open source projects to expand on the simple git tag concept. You can add release notes in Markdown format, and you can upload finalized assets – such as compiled executables.

As a user I had the question – how do I script “download the latest release, please?”

Continue reading “HOW TO DOWNLOAD THE LATEST RELEASE FROM GITHUB”

manjaro-xfce使用鼠标侧键

1. 安装xbindkeys和xdotool

pacman -S xbindkeys xdotool xorg-xev

2. 找到鼠标侧键键码

xev

点击两个鼠标侧键,输出为:

ButtonPress event, serial 37, synthetic NO, window 0x4600001,
     root 0x16a, subw 0x0, time 2359097, (105,76), root:(816,450),
     state 0x0, button 9, same_screen YES
 ButtonRelease event, serial 37, synthetic NO, window 0x4600001,
     root 0x16a, subw 0x0, time 2359243, (105,76), root:(816,450),
     state 0x0, button 9, same_screen YES
 ButtonPress event, serial 37, synthetic NO, window 0x4600001,
     root 0x16a, subw 0x0, time 2370571, (105,76), root:(816,450),
     state 0x0, button 8, same_screen YES
 ButtonRelease event, serial 37, synthetic NO, window 0x4600001,
     root 0x16a, subw 0x0, time 2370691, (105,76), root:(816,450),
     state 0x0, button 8, same_screen YES

其中,button 9为上键,button 8为下键。

3. 编辑.xbindkeysrc文件

xbindkeys -d > ~/.xbindkeysrc
vim ~/.xbindkeyrc

在文件中加入:

"xdotool key Page_Up"
  b:9
"xdotool key Page_Down"
  b:8

保存退出,测试:

xbindkeys -p

侧键翻页功能生效。

4. 加入自启动

编辑~/.xprofile文件,加入一行:

xbindkeys


https://forum.manjaro.org/t/how-do-i-set-up-extra-mouse-buttons/59291

Install Optware on DD-Wrt (WNDR3700v2/MIPS)

Please read the following instructions before taking any action. That will be good for you getting used to them.


0. Hardware and Prerequisites

0.0 TP-Link WDR3600-N600 – v1.1: Have DD-WRT Build in between 25408 and 30731, flashed and working .

0.0.1 Also Works with the following devices (not tested, but reported):

  • TP Link WDR4300
  • TP Link Archer C7
  • Netgear WNDR3700

0.1 PuTTY and WinSCP: Google, download and make them ready for use.

0.2 Kingston 16GB – DT101/G2: Create two partitions on the USB thumbdrive, using MiniTool Partition Wizard for example.

0.2.1 First Partition

  • Partition Size : 14 GB (unallocated space)
  • File System : NTFS or EXT3
  • Create As : Primary
  • Partition Label: Data (or whatever label you want to, but Optware)

0.2.2 Second Partition

  • Partition Size : 100 MB
  • File System : NTFS or EXT3
  • Create As : Primary
  • Partition Label: System (or whatever label you want to, but Optware)

0.3 DD-WRT Web Interface

0.3.1 Enable SSH (SSHd): [Services] > [Services] > [Secure Shell]

0.3.2 Enable Samba Sharing: [Services] > [NAS]

0.4 Router: stick the USB thumbdrive on router and reboot it.

0.5 Wait few seconds. Then make sure both [mnt/sda1] and [mnt/sda2] are mounted on the router and shared by Samba (from DD-WRT Web Interface)

Continue reading “Install Optware on DD-Wrt (WNDR3700v2/MIPS)”