最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

迷你觸屏電腦安裝klipper用于3D打印上位機(jī)

2022-12-25 22:48 作者:Samuel-0_0  | 我要投稿


前面發(fā)了視頻安裝過程,現(xiàn)在將命令內(nèi)容發(fā)布在此。


2023.2.16更新,以下步驟中的部分方法經(jīng)過更新,可能和視頻有所出入,按文本為準(zhǔn)。

步驟一

Debian鏡像下載地址

https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current/multi-arch/iso-cd/

制作好系統(tǒng)的安裝U盤后,下載

http://mirrors.ustc.edu.cn/debian/pool/non-free/f/firmware-nonfree/firmware-realtek_20210315-3_all.deb

放到安裝U盤的firmware目錄下。


插上U盤和網(wǎng)線,引導(dǎo)進(jìn)安裝初始界面,選擇第二個(gè),install,根據(jù)提示安裝系統(tǒng)。

最后一步不選擇安裝桌面,只選擇SSH server和標(biāo)準(zhǔn)系統(tǒng)工具。


重啟后在設(shè)備上執(zhí)行命令

ip address

查看IP地址。


步驟二

使用SSH工具,用root用戶遠(yuǎn)程登陸設(shè)備。

執(zhí)行命令

nano /etc/network/interfaces

如果使用WiFi連接,復(fù)制下面的內(nèi)容增加到最后面,使用網(wǎng)線的不需要操作

auto wlan0

iface wlan0 inet dhcp

? wpa-ssid 777

? wps-psk 1122334455

? #WiFi隱藏時(shí)取消下面這行前面的#

? #wpa-scan-ssid 1

按鍵盤 CTRL+O,回車,CTRL+X


完整復(fù)制下面的命令到SSH客戶端執(zhí)行,替換源:

cat > /etc/apt/sources.list << EOF

#清華大學(xué)鏡像站

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free

EOF

分別執(zhí)行下面2行命令,安裝依賴程序

apt-get update

apt-get install firmware-linux-free firmware-linux-nonfree firmware-misc-nonfree firmware-myricom firmware-netronome firmware-netxen firmware-qcom-soc firmware-qlogic firmware-realtek firmware-samsung firmware-siano firmware-sof-signed firmware-ti-connectivity firmware-zd1211 hdmi2usb-fx2-firmware intel-microcode? amd64-microcode atmel-firmware bluez-firmware dahdi-firmware-nonfree firmware-amd-graphics firmware-ath9k-htc firmware-atheros firmware-b43legacy-installer firmware-bnx2 firmware-bnx2x firmware-brcm80211 firmware-cavium firmware-intel-sound firmware-intelwimax firmware-ipw2x00 firmware-ivtv firmware-iwlwifi firmware-libertas fonts-wqy-zenhei git sudo unzip net-tools wireless-tools -y

為用戶samuel添加sudo權(quán)限,samuel替換為你自己的新用戶名

usermod -a -G sudo samuel

執(zhí)行下面命令,將用戶添加到dialout用戶組和tty用戶組

gpasswd --add samuel dialout && gpasswd --add samuel tty && gpasswd --add samuel input

重啟系統(tǒng)

reboot

步驟三

在SSH客戶端使用自己新建的用戶遠(yuǎn)程登陸


添加國(guó)內(nèi)PIP源,先執(zhí)行命令

mkdir ~/.pip

然后復(fù)制下面全部執(zhí)行

cat > ~/.pip/pip.conf << EOF

[global]

index-url = http://mirrors.aliyun.com/pypi/simple


[install]

trusted-host=mirrors.aliyun.com

EOF

安裝klipper依賴

sudo apt install python3-virtualenv python3-dev libffi-dev build-essential libncurses-dev libusb-dev avrdude gcc-avr binutils-avr avr-libc stm32flash dfu-util libnewlib-arm-none-eabi gcc-arm-none-eabi binutils-arm-none-eabi libusb-1.0-0?

git拉取klipper

cd ~ && git clone https://github.com/KevinOConnor/klipper

安裝klipper

cd ~ && virtualenv -p python3 ./klippy-env && ./klippy-env/bin/pip install -r ./klipper/scripts/klippy-requirements.txt

添加klipper服務(wù)

sudo /bin/sh -c? "cat > /etc/systemd/system/klipper.service" << EOF

#Systemd Klipper Service

[Unit]

Description=Starts Klipper and provides klippy Unix Domain Socket API

Documentation=https://www.klipper3d.org/

After=network.target

Before=moonraker.service

Wants=udev.target


[Install]

Alias=klippy

WantedBy=multi-user.target


[Service]

Type=simple

User=$USER

RemainAfterExit=yes

ExecStart= /home/$USER/klippy-env/bin/python /home/$USER/klipper/klippy/klippy.py /home/$USER/printer_data/config/printer.cfg -l /home/$USER/printer_data/logs/klippy.log -a /tmp/klippy_uds

Restart=always

RestartSec=10

EOF

啟用klipper服務(wù)

sudo systemctl enable klipper.service

拉取moonraker

cd ~ && git clone https://github.com/Arksine/moonraker.git

安裝moonraker

cd ~/moonraker/scripts && ./install-moonraker.sh

修復(fù)policykit

cd ~ && ./moonraker/scripts/set-policykit-rules.sh

啟動(dòng)klipper服務(wù)

sudo systemctl start klipper

啟動(dòng)moonraker服務(wù)

sudo systemctl start moonraker

步驟四

安裝nginx

sudo apt install nginx

完整復(fù)制下面內(nèi)容并復(fù)制到SSH客戶端執(zhí)行:

sudo /bin/sh -c? "cat > /etc/nginx/conf.d/upstreams.conf" << EOF

# /etc/nginx/conf.d/upstreams.conf

upstream apiserver {

? ? ip_hash;

? ? server 127.0.0.1:7125;

}

upstream mjpgstreamer1 {

? ? ip_hash;

? ? server 127.0.0.1:8080;

}

upstream mjpgstreamer2 {

? ? ip_hash;

? ? server 127.0.0.1:8081;

}

upstream mjpgstreamer3 {

? ? ip_hash;

? ? server 127.0.0.1:8082;

}

upstream mjpgstreamer4 {

? ? ip_hash;

? ? server 127.0.0.1:8083;

}

EOF

完整復(fù)制下面內(nèi)容并復(fù)制到SSH客戶端執(zhí)行:

sudo /bin/sh -c? "cat > /etc/nginx/conf.d/common_vars.conf" << EOF

# /etc/nginx/conf.d/common_vars.conf

map \$http_upgrade \$connection_upgrade {

? ? default upgrade;

? ? '' close;

}

EOF

完整復(fù)制下面內(nèi)容并復(fù)制到SSH客戶端執(zhí)行:

sudo /bin/sh -c? "cat > /etc/nginx/sites-available/mainsail" << EOF

# /etc/nginx/sites-available/mainsail

server {

? ? listen 80 default_server;

? ? access_log /var/log/nginx/mainsail-access.log;

? ? error_log /var/log/nginx/mainsail-error.log;

? ? # disable this section on smaller hardware like a pi zero

? ? gzip on;

? ? gzip_vary on;

? ? gzip_proxied any;

? ? gzip_proxied expired no-cache no-store private auth;

? ? gzip_comp_level 4;

? ? gzip_buffers 16 8k;

? ? gzip_http_version 1.1;

? ? gzip_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript application/json application/xml;

? ? # web_path from mainsail static files

? ? root /home/samuel/mainsail;

? ? index index.html;

? ? server_name _;

? ? # disable max upload size checks

? ? client_max_body_size 0;

? ? # disable proxy request buffering

? ? proxy_request_buffering off;

? ? location / {

? ? ? ? try_files \$uri \$uri/ /index.html;

? ? }

? ? location = /index.html {

? ? ? ? add_header Cache-Control "no-store, no-cache, must-revalidate";

? ? }

? ? location /websocket {

? ? ? ? proxy_pass http://apiserver/websocket;

? ? ? ? proxy_http_version 1.1;

? ? ? ? proxy_set_header Upgrade \$http_upgrade;

? ? ? ? proxy_set_header Connection \$connection_upgrade;

? ? ? ? proxy_set_header Host \$http_host;

? ? ? ? proxy_set_header X-Real-IP \$remote_addr;

? ? ? ? proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;

? ? ? ? proxy_read_timeout 86400;

? ? }

? ? location ~ ^/(printer|api|access|machine|server)/ {

? ? ? ? proxy_pass http://apiserver\$request_uri;

? ? ? ? proxy_set_header Host \$http_host;

? ? ? ? proxy_set_header X-Real-IP \$remote_addr;

? ? ? ? proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;

? ? ? ? proxy_set_header X-Scheme \$scheme;

? ? }

? ? location /webcam/ {

? ? ? ? proxy_pass http://mjpgstreamer1/;

? ? }

? ? location /webcam2/ {

? ? ? ? proxy_pass http://mjpgstreamer2/;

? ? }

? ? location /webcam3/ {

? ? ? ? proxy_pass http://mjpgstreamer3/;

? ? }

? ? location /webcam4/ {

? ? ? ? proxy_pass http://mjpgstreamer4/;

? ? }

}

EOF

完成配置更新

mkdir ~/mainsail && sudo rm /etc/nginx/sites-enabled/default && sudo ln -s /etc/nginx/sites-available/mainsail /etc/nginx/sites-enabled/ && sudo systemctl restart nginx

下載mainsail文件

cd ~/mainsail && wget -q -O mainsail.zip https://github.com/mainsail-crew/mainsail/releases/latest/download/mainsail.zip && unzip mainsail.zip && rm mainsail.zip

步驟五

安裝KlipperScreen

cd ~ && git clone https://github.com/jordanruthe/KlipperScreen.git && cd ~/KlipperScreen && ./scripts/KlipperScreen-install.sh

提示需要重啟,確定重啟

問題處理

重啟后屏幕不顯示KlipperScreen界面,執(zhí)行(samuel為用戶名,自行修改)

cat /home/samuel/.local/share/xorg/Xorg.0.log

如果日志里有類似錯(cuò)誤

(EE) xf86OpenConsole: Cannot open virtual console 2 (Permission denied)

執(zhí)行

sudo nano /etc/X11/Xwrapper.config

在末尾添加一行

needs_root_rights=yes

然后執(zhí)行

sudo dpkg-reconfigure xserver-xorg-legacy && sudo reboot

重啟后,屏幕顯示轉(zhuǎn)了90度,需要永久化屏幕旋轉(zhuǎn)

sudo /bin/sh -c? "cat > /usr/share/X11/xorg.conf.d/90-monitor.conf" << EOF

Section "Monitor"

? ? Identifier "DSI-1"

? ? Option "Rotate" "left"

? ? # Valid rotation options are normal,inverted,left,right

? ? #Option "PreferredMode" "1920x1080"

? ? # May be necesary if you are not getting your prefered resolution.

EndSection

EOF

重啟KlipperScreen服務(wù)

sudo service KlipperScreen restart

如果試了還是不翻轉(zhuǎn),將前面的Identifier "DSI-1"修改為Identifier "DPI-1"后,再重復(fù)上面2步操作。


此時(shí)觸摸還未旋轉(zhuǎn),執(zhí)行下方命令測(cè)試觸摸旋轉(zhuǎn)

DISPLAY=:0 xinput set-prop "pointer:Goodix Capacitive TouchScreen" 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1

測(cè)試沒有問題,修改成永久化觸摸旋轉(zhuǎn)

sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf

在有touchscreen的里面添加一行 Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1"

修改后如下:

Section "InputClass"

? ? ? ? Identifier "libinput touchscreen catchall"

? ? ? ? MatchIsTouchscreen "on"

? ? ? ? MatchDevicePath "/dev/input/event*"

? ? ? ? Driver "libinput"

? ? ? ? Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1"

EndSection



迷你觸屏電腦安裝klipper用于3D打印上位機(jī)的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
依安县| 松江区| 文登市| 台南市| 霍林郭勒市| 南阳市| 皋兰县| 凌源市| 临沂市| 莱芜市| 汉中市| 徐闻县| 台南市| 安国市| 仙居县| 德庆县| 六枝特区| 江源县| 苍梧县| 宜兴市| 大邑县| 晋宁县| 金华市| 高州市| 罗甸县| 钦州市| 大连市| 大姚县| 饶阳县| 肥乡县| 上饶市| 札达县| 五华县| 合作市| 米脂县| 呼和浩特市| 牙克石市| 邮箱| 佳木斯市| 天台县| 武汉市|