无事水,但要好好学习
Nothing else, but still kids.
|

Nolca

园龄:6年9个月粉丝:12关注:9

waydroid+weston折腾

linux mint cinnamon对wayland支持不好,使用weston

waydroid

waydroid_scripts

https://github.com/casualsnek/waydroid_script

git clone https://github.com/casualsnek/waydroid_script
cd waydroid_script
python3 -m venv venv
venv/bin/pip install -r requirements.txt
sudo venv/bin/python3 main.py

smartdock暂时有问题,不要安装,否则无法进入安卓桌面

waydroid没有联网

执行下面指令

sudo sed -i~ -E 's/=.\$\(command -v (nft|ip6?tables-legacy).*/=/g' \
/usr/lib/waydroid/data/scripts/waydroid-net.sh

https://github.com/waydroid/waydroid/issues/143

waydroid挂载文件失败

要在完全启动waydroid后,再mount --bind才行
https://github.com/waydroid/waydroid/issues/1141

ubuntu安装pyclip

ubuntu没有维护pyclip的deb包,直接强制安装。

sudo pip install pyclip --break-system-packages

https://github.com/waydroid/waydroid/issues/981

weston

~/.config/weston.ini

[core]
xwayland=true
[keyboard]
keymap_rules=evdev
# keymap_options from /usr/share/X11/xkb/rules/base.lst
numlock-on=true
[shell]
panel-position=none
#background-color=0x00FFFFFF
#binding-modifier=ctrl
[input-method]
#path=/usr/bin/fcitx5

自用脚本

#!/bin/bash
HOME=/home/n
MNT=$HOME/.local/share/waydroid/data/media/0
declare -a DIR_DROID=(Music Download Pictures Movies Documents)
declare -a DIR_USER=(music download photo video document)
# alias sudo="sudo -E"
share() {
for i in ${!DIR_DROID[@]}; do
if ! sudo mountpoint -q "$MNT/${DIR_DROID[$i]}" ; then
sudo mkdir -p $MNT/${DIR_DROID[$i]}
cmd="mount --bind $HOME/${DIR_USER[$i]} $MNT/${DIR_DROID[$i]}"
sudo $cmd ; echo$cmd
fi
done
# notify-send --app-name=Waydroid "Waydroid ready"
}
share_off() {
for i in ${!DIR_DROID[@]}; do
while sudo umount $MNT/${DIR_DROID[$i]} 2>/dev/null; do
echo -n "x"
done
done
# sudo lsof +D $HOME/document
# notify-send --app-name=Waydroid "Waydroid stopped"
}
share_off
# unset WAYLAND_DISPLAY ; pkill -x weston
[[ -z "$(pidof -x weston)" ]] && weston &
export WAYLAND_DISPLAY=wayland-1 ; waydroid session stop
sleep 1 ; waydroid show-full-ui 2>&1 | while read -r msg; do
if echo "$msg" | grep 'user 0 is ready'; then
share
fi
done &&\
if zenity --question --text="关闭waydroid后台并取消挂载吗?"; then
waydroid session stop && share_off
fi

本文作者:Nolca

本文链接:https://www.cnblogs.com/nolca/p/18390605

版权声明:本作品采用 收益分享revenue sharing 许可协议进行许可。

posted @   Nolca  阅读(198)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起
  1. 1 ⏩intro 山姆精
  2. 2 🎸吉他 马叉
  3. 3 ☁升调 山姆精
  4. 4 🐦Flutter Virtual Riot/Madi
  5. 5 🎶纯律 山姆精
  6. 6 👻yeah~Color Bass! VR
🐦Flutter - Virtual Riot/Madi
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.

Virtual Riot - Flutter

Release me

Take away the fear inside

Sincere time

How it pulls upon my life

You wash out

These thoughts to cloud my head

Won't you try

And make yourself a part of the ride

Cause they might say you'll catch a cold

It could tells right our way we're here

Break away from those tears now

That make us lose who we are

Avoid my mind

And all its shapes and colors

Instead a big day

In all my heart it flutters

In waves cause these pulses

that pull out this ride

Automate

Cause this feels might be too loud

There's a toxic taste

in the atmosphere

It's called surprise but this is

I need to know a good day

What's here and what's there

Cause they might say

you'll catch a cold

It could tells right

our way we're here

Break away from those tears now

Make us lose who we are

Avoid my mind

And all its shapes

and colors

Instead a big day

In all my heart it flutters

Woah woah

Woah woah

Woah woah

Woah woah

Woah woah

Woah woah