Need help with a Bash scripting issue in Bazzite

I'm brand new here on Stack Exchange, and new to Linux. I'm currently on the Bazzite KDE Plasma 6.6 distro, and so far am pleased with it, as I'm a gamer.

I have created a script, well, actually Google AI created it, I just told it what I wanted. After a few revisions, I got it working decently, but not perfectly.

The purpose of the script is to occasionally move the mouse so a game (Star Citizen) won't logout due to AFK when I'm in the bathroom.

I'm having to create my own solution since the other solutions Ive found by googling seem to only support X11 and Bazzite is now Wayland.

The script itself runs fine from the Terminal, no issues at all. When I turn it into a desktop icon that's where the problem is. When i double-click the desktop icon, it runs and generates the main menu. When I click 'Ok' to 'Start Jiggler' (I call the script 'Mouse Jiggler') it tries to start it, but ends up back at the main menu.

I suspect that the issue may have something to do with the fact that the actual mouse movement code has to run in a distrobox, as per Bazzite limitations. I suspect this because the app menu loads fine, the problem doesn't start until you click for the mouse movement part to run.

I've spent many, many hours trying to resolve this with the help of Google AI (since I am new to Linux/Bash). The only way to get it to work is to tell the Desktop icon to "Run in Terminal" via the menu editor. It works fine that way but loads the terminal screen when run. Its kinda annoying, but it works.

I'm trying to figure out how to get it to run properly without loading the terminal screen.

The script code is below, hope I place it in here correctly.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论