GalliumOS / galliumos-distro

Docs, issues, and artwork sources for GalliumOS
https://galliumos.org/
GNU General Public License v2.0
347 stars 11 forks source link

Running sidequest on GalliumOS #521

Closed raz256 closed 5 years ago

raz256 commented 5 years ago

Not so much as an issue but a discovery that a new linux user stumbled across and was hoping that a more experienced user can answer some questions for me.

I use an Oculus Quest VR headset and have been enjoying it very much. I've been trying to branch out my experience by using my EVE Pixelbook to sideload apps and games on to it. I've been having moderate success until one day alot of the developers of these apps and games started using SideQuest to give users ease of access. Unfortunately SideQuest didn't think of making a version of it for chromebook. One day I discovered that they made a linux version of SideQuest. I learned to dual boot on my Pixelbook and installed GalliumOS. It has been a fun experiment so far and i have been learning alot about WINE and PlayOnLinux and sideloading these apps on GalliumOS. I finally downloaded the Linux version of it and saw the zip file was a tar.xz. I was able archive the file using Xarchiver and extract the files. The one civet that i have with it is that the main run file, simply named sidequest with no suffix, doesn't have an app to run it. I was seeing what i could find in the app store to run such a file but to no avail I turned up empty. I finally turned to the terminal and typed ./sidequest in the directory file it was in and it loaded it up.

How and why does this work? I know the . is for executing a command but how does it know what to do? is there something else i can do to make it easier and more official than just a commandline?(ex. an app or a command that turns the file into an executable)

thank you in advance for any inquires about this and hopefully I have helped someone discover a solution to their problem.

reynhout commented 5 years ago

In fact the sidequest file is an executable. The . is actually just a path component, which means "current directory".

In the Unix shell (command line prompt), you run an executable by typing its name. If the executable is located in a directory which is included in your PATH environment variable, all you need is the filename, e.g. ls. If it is not located in such a directory, you can specify the full path, e.g. /bin/ls.

In this case, the file/executable sidequest is not in a directory which is included in your PATH variable, so you need to tell the shell where to find it. ./sidequest works, and is the simplest, but will only work if you're in the correct directory. Something like /home/raz256/sidequest would also work, from any directory. (I'm making assumptions and simplifying here, but the general idea is correct and usually true).

Anyway, what you probably want to do is set up a launcher on your desktop, launcher menu, or panel, which you can click to run the executable. There are a few ways to do this...the easiest (but still absurd, honestly) is as follows:

And that should be all. You can do other things like add an icon etc, but the above is adequate.

raz256 commented 5 years ago

reynhout,

Thank so much for your quick reply and very useful information, I am learning alot. I want to point out that I had looked extensively in the .../bin files both root and user and to no avail the commandline sidequest doen't show up. on a positive I was able to create the launcher for SideQuest and it works great. Again though in the command input I simply put sidequest in and it didn't work. What did work however was the./sidequest. I would have never come to this conclusion hadn't I seen one forum use this input on something similar. maybe it is duel purposed in commandline to setup a sequence to run it as an executable, but no explanation was given to the reason it does this.

Again thank you so much for your wisdom!

reynhout commented 5 years ago

Without the ./, the shell will only search your configured paths in PATH variable. (Try echo $PATH from the command line, to see your default list).

It makes sense that ./sidequest was necessary in the launcher...sorry for not thinking of that. The launcher will still observe configured paths, just like the shell.

Normally, an installer would put the executables into a conventional location, which would be configured in your PATH. Ubuntu uses /usr/bin. Since you didn't use an installer, the executable was just dropped wherever you expanded the archive. You can move it, but it requires some care, which is why installers are convenient. On the other hand, breaking things and reinstalling the OS is a fine way to learn. :)

Anyway, glad you got it working. Good luck with it, and let us know if you run into any issues. Generally, you'll get more visibility for questions and discussions on the Reddit support forum (https://reddit.com/r/GalliumOS) than here in the issue tracker -- but bug reports always belong here.