如何在Switch上运行Ubuntu–进阶

发布于 2022-05-16  246 次阅读


进阶:

连接手柄后如何配置键位

步骤:

  1. 打开Terminal(终端)
  2. 输入 sudo apt-get update
  3. 输入 sudo apt-get upgrade
  4. 输入 wget http://pan.dragonrster.top/UbuntuL4T/qjoypad.deb
  5. 输入 sudo apt install ./qjoypad.deb
  6. 安装完成并且没有报错以后继续在终端输入 qjoypad -notray
  7. 此时会出现一个有手柄图标或全黑的小窗口,点击窗口中心会出现手柄配置栏,如果配置窗口没有出现或者报错,则代表手柄没有连接到主机或还未进行连结
  8. 手柄不一定在Joystick 1,2下,一般会默认配置到Joystick 3
    • 手柄键位配置如下
    • axis1--左摇杆左右··························································button8--ZL
    • axis2--左摇杆上下··························································button9--ZR
    • axis3--右摇杆左右··························································button10---
    • axis4--右摇杆上下··························································button11--+
    • button1--B···································································button12--HOME
    • button2--A···································································button13--L摇杆按下
    • button3--X···································································button14--R摇杆按下
    • button4--Y···································································button15--上↑
    • button5--截图键···························································button16--下↓
    • button6--L··································································button17--左←
    • button7--R··································································button18--右→
  9. 修改好以后点击Update即可保存

觉得一条一条输麻烦的可以直接复制下面的代码

sudo apt-get update&&sudo apt-get upgrade&&wget http://pan.dragonrster.top/UbuntuL4T/qjoypad.deb&&sudo apt install ./qjoypad.deb&&qjoypad -notray

设置Swap交换文件(虚拟内存)

步骤:

  1. 打开Terminal(终端)
  2. 输入 sudo wget http://pan.dragonrster.top/UbuntuL4T/swap.sh&&sudo sh ./swap.sh
  3. 输出以下信息并没有报错即代表Swap交换文件设置成功

需要设置开机时自动挂载交换文件的操作如下

  1. 打开Terminal(终端)
  2. 输入 sudo vim /etc/fstab (没有安装vim或不会用vim的可用gedit代替) 如:sudo gedit /etc/fstab
  3. 在末尾添加 /swap/swapfile swap swap defaults 0 0 保存后并退出

在UbuntuL4T上运行Minecraft

步骤:

  1. 打开Terminal(终端)
  2. 输入 sudo wget http://pan.dragonrster.top/UbuntuL4T/Minecraft.sh&&sudo sh ./Minecraft.sh
  3. 脚本运行过后会自动启动HMCL,没有启动的话可以输入:sudo home/你的用户名/.minecraft/JAVA/jdk-16-full/bin/java -jar home/你的用户名/.minecraft/HMCL-3.3.188.jar
  4. 编译好的OpenGL和lwjgl在.minecraft/natives文件夹下,运行自定义库的时候选择此文件夹即可

FAQ

FA:游玩过程中闪退

Q:请设置1G以上虚拟内存

FA:如何加MOD

Q:HMCL自带MOD安装器,安装后把MOD文件放入mods文件夹内即可

FA:游玩时卡顿

Q:虚拟内存调高/游戏内存调高/视距调低/下载Optfine


DragonRSTER