Skip to content

Commit c303a3f

Browse files
committed
add: linux run bash
1 parent 48f5848 commit c303a3f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

run.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
sudo chmod 666 /dev/input/*
3+
sudo chmod 666 /dev/uinput
4+
sudo chmod 777 ./deviceShare
5+
if [ -n "$WAYLAND_DISPLAY" ]; then
6+
echo "is wayland"
7+
PACKAGE="wl-clipboard"
8+
echo "installing wl-clipboard"
9+
sudo apt install wl-clipboard
10+
export DISPLAY=:0
11+
NOWUSER=$USER
12+
sudo touch /home/$NOWUSER/.Xauthority
13+
xauth generate :0 . trusted >/dev/null 2>&1
14+
XAUTHORITY="/home/$USER/.Xauthority" ./deviceShare >/dev/null 2>&1 &
15+
else
16+
./deviceShare >/dev/null 2>&1 &
17+
fi

0 commit comments

Comments
 (0)