Basic Linux Questions for New Pyra Owners and Others


docbroke

Banned
Joined
Feb 21, 2019
Messages
609
Age
43
Location
India
As a followup of this https://pyra-handheld.com/boards/threads/first-information-for-new-pyra-owners-faq.99302/page-7
This thread is mainly designed to help new pyra owners to start learning basics of linux. Everyone is welcome to ask and reply as long as we focus on the title of this thread.

Here is a copy of my post with some basic information about linux filesystems.

I agree that linux may be intimidating for newcomers but it is much better compared to windows or mac. Let me try to answer some of this.

1. Linux Filesystem:
This may be a surprise for a windows users but in linux everything is a file under "/" . So / is the root of entire filesystem if you run "sudo rm -rf /" everything in your system is gone. ( rm is command for deletion and option -r means recursive -f gives force ).
Let us take an example of "/dev" directory, which has all the devices. Your HDD drive is usually /dev/sda /dev/sdb etc., with partitions /dev/sda1 /dev/sda2 etc. This numbers are decided at boot, so the hdd which is detected first becomes sda, so sometime sda may become sdb. USB drives also appears here as /dev/sdb /dev/sdc etc. However you can not see anything in your Pen drive using /dev/sdc. This folder only lists the devices, to access files in the devices like HDD you need to mount them at some place in filesystem. For example with Pyra, eMMC will be mounted at the root "/", and we may choose to have sdcard mounted at "/home". ( Note: you may backup your entire hdd mounted ate /dev/sdb to another hdd mounted at /dev/sdc using "dd if=/dev/sdb of=/dev/sdc" which will copy even filesystem, so if your /dev/sda is 120 gb hdd, now /dev/sdb will have 120 gb only even if it is 2 Tb hdd )
/home , this is directory for all user data, like your documents, movies, pictures and anything else. Linux being designed as multiuser system, every user may have his own directory under /home. So if your username is bosbeetle,, your directory shall be /home/bosbeetle.
One important thing to note is names of hidden files in linux starts with ".", and usually dotfiles in home directory are user level config files. Most standard linux applications can be configured using a config file in /home/<username>/.config/<appname>/<configfile>.
Another important difference from windows is linux filesystem uses permissions for all files/directories. So usually normal user have full read/write access to his own directory in addition to few other spaces in filesystem. While root user can do anything. In linux filesystem every directory/file have sets of permission to give fine grained control, usually described in the form of (rwx, read/write/execute) for different users (ugo, u=user or file owner, g=group, o=other). Commands like "chown" and "chmod" allows changing the file ownership and permissions.
/etc, this directory has all system wide configuration files. When you install new application, it may add default config file here, which you can copy to your $HOME/.config and edit, so as that application behaves as you desire without changing anything for other users. /etc/fstab is a file which keep information about where to mount which hdd. So this is the config file which tells the system to mount eMMC at / and your sdcard at /home. Note: this file is not for removable devices.
/bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, all these directories are for executable binaries. Different distributions use them differently. In arch all of these (excluding /usr/bin and /usr/local/bin) are symlinks of /usr/bin. So all the application installed with package manager goes into /usr/bin, e.g., /usr/bin/firefox. Note: All files in this locations can be executed by name without using full path, so you can type firefox on command line without needing to type /usr/bin/firefox. The reason is environment variable called PATH. You can type "echo $PATH" in your terminal to see which paths are in the PATH. You can also add more folders to your PATH using config files like .bashrc. I add /home/docbroke/bin to the path and keep all my shell scripts there, so I can execute them without needing to type full path.
/var, var is for variables that keeps changing. For example /var/log contains different log files.
/sys, this directory contains information about devices, drivers, kernel status etc. For example, /sys/class/power_supply/<battery_name>/capacity file will have battery charge status, which can be read using cat or echo commands.
/tmp, contains temporary files, which gets deleted after reboot. I sometimes use it to store screenshots, recordings for temporary use.
/media, /mnt, these directories are for mounting (mainly temporary) drives. On my system I use /media to manually mount usb drives, but when I use automouning scripts they may go to /media or /run/media etc.

2. Ok I am tired now, so I will only tell this
--- Most linux utilities comes with a manual, you can read them using man command, for example "man man" for the manual of man command. So now you know when someone says RTFM, what does he/she means.
--- Most command line utilites have inbuilt help, for help with cat command "cat --help", this is usually short compared to man
--- Some commands have info, try "info info" for info on info
--- For go to guides for most linux applications try archwiki at wiki.archlinux.org
 
Last edited:
I suspect you're only meant to prepopolate your ~/.config with configuration files that live in /etc/xdg. Other apps that supply their default config in /etc but not in /etc/xdg might not work if put in your XDG_CONFIG_HOME.

Personally I've never needed to prepopulate my config files mind you. Everything I've run so far has automatically created it's config file wherever it deems sensible, but I can only imagine one situation where you want to configure an app before first running it, and that's defining proxies for anything online if you want to keep you chatter off the plain internet.
 
How many Bluetooth Devices are usable simulatanisly on the Pyra ? Yesterday i got the Airpods Pro to work which are basically 3 Bluetooth Devices: Airpod L/R and Case, i also have a Keyboard and a Mouse, and maybe a XBOXONE Gamepad..

And how do i get the Emulators from the Debian Repo to work? I ditnt had succes whit GNGB and Mednafen,
Or should i wait until someone portet these as DBP File, because then they are save even when i have to reflash?
 
Thanks for throwing that "and Others" in the Title as I'm sure we'll have a ton of questions that aren't Pyra specific.

For example, I just started the Linux Mint Debian Edition (LMDE4) and I already have some questions. First, I have to say, LMDE is working out of the box for me even with my WiFi. This is all on the same Debian 4.19 kernel I had been test driving with Debian Buster Stable (having tried adding repositories) but failed with WiFi always.
This Cinnamon build is very appealing to me. I type in Dvorak and was happy to see many keyboard options here including programmer Dvorak, another bonus. What I was surprised to find, and haven't seen before, was an option for Japanese Dvorak. This! Every time Windows 10 has a major update it forgets my registry entry to point the Japanese IME keyboard to the Dvorak layout. Did I just stumble upon an operating system that knows of users that type Japanese using an US Dvorak layout and supported them out of the box? Having added that keyboard I discovered however that while yes it was in fact Dvorak, it was not typing Japanese characters or bringing up any type of IME. How unfortunate. Added Japanese keyboard and found roman characters with qwerty layout. No obvious signs of switching to Japanese characters here either.
Added Japanese as a system language and installed necessary language packs but that doesn't seem to have pointed me in the right direction either. Anyone familiar with where I should start digging in the filesystem to setup typing Japanese with a US Dvorak layout?

So, that's my question. Not super important but I thought it would be nice to get the ball rolling. The hype is starting to set in. Its almost been a whole Two Months™ since the Pyra project started and now its nearly finished.
 
I suspect you're only meant to prepopolate your ~/.config with configuration files that live in /etc/xdg. Other apps that supply their default config in /etc but not in /etc/xdg might not work if put in your XDG_CONFIG_HOME.

Personally I've never needed to prepopulate my config files mind you. Everything I've run so far has automatically created it's config file wherever it deems sensible, but I can only imagine one situation where you want to configure an app before first running it, and that's defining proxies for anything online if you want to keep you chatter off the plain internet.
What I have seen is every application is different. As a sane default, applications shall not create config files in $HOME, to avoid overwriting existing config files ( at least in arch). For example, applications like mpv, ncmpc, ncmpcpp,vimb, qutebrowser don't create config file in $HOME, you have to create one. However I am sure there are counter examples where applications may be creating config files in $HOME
 
Thanks for throwing that "and Others" in the Title as I'm sure we'll have a ton of questions that aren't Pyra specific.

For example, I just started the Linux Mint Debian Edition (LMDE4) and I already have some questions. First, I have to say, LMDE is working out of the box for me even with my WiFi. This is all on the same Debian 4.19 kernel I had been test driving with Debian Buster Stable (having tried adding repositories) but failed with WiFi always.
This Cinnamon build is very appealing to me. I type in Dvorak and was happy to see many keyboard options here including programmer Dvorak, another bonus. What I was surprised to find, and haven't seen before, was an option for Japanese Dvorak. This! Every time Windows 10 has a major update it forgets my registry entry to point the Japanese IME keyboard to the Dvorak layout. Did I just stumble upon an operating system that knows of users that type Japanese using an US Dvorak layout and supported them out of the box? Having added that keyboard I discovered however that while yes it was in fact Dvorak, it was not typing Japanese characters or bringing up any type of IME. How unfortunate. Added Japanese keyboard and found roman characters with qwerty layout. No obvious signs of switching to Japanese characters here either.
Added Japanese as a system language and installed necessary language packs but that doesn't seem to have pointed me in the right direction either. Anyone familiar with where I should start digging in the filesystem to setup typing Japanese with a US Dvorak layout?

So, that's my question. Not super important but I thought it would be nice to get the ball rolling. The hype is starting to set in. Its almost been a whole Two Months™ since the Pyra project started and now its nearly finished.
You probably need IME ( try ibus or scim or fcitx or uim). Look at https://wiki.archlinux.org/index.php/Input_method for more details.
 
I decided to give installing LMDE4 a go. UEFI installation. Installation completes but doesn't boot.

Had installed to existing efi partition shared with windows. Booted Live LMDE4 and mounted efi partition. Linux, Windows, OEM, and Debian folders exist there with efi files to boot from. Rearrange boot order in BIOS but boot is just jumping right to my Windows installation.
From LMDE4 Live attempted sudo efibootmgr --bootorder xxxx,yyyy,zzzz and restarted. Still no Grub boot.
Rearranged boot orders in BIOS again but no changes.
Back to the partition table I added a small 200MiB Fat32 and flagged it boot and eps, removing the same from the original efi partition. Then reinstalled LMDE4.
Another successful installation and another failed boot attempt.
Back to the Live LMDE. Mounting the new efi partion shows only a Debian folder with its efi, which seems to be correct, grubx64.efi. Another efibootmgr shows that the new install also has usb, cdrom and Windows booting ahead of Linux. changed --bootorder to only boot linux and restarted.
No boot device found.
LinuxMint/Arch/Debian Wiki and forums search period commences but keeps spitting back the same information at me right now.
Joined IRC for LMDE help but I'm currently waiting out whiny wine users with their installation issues.
Any pointers here would be appreciated. Do I need to look further into the nvram holding efi variables? Maybe that is why my changes are not taking effect?
 
@liveunderwater First thing that comes to mind would be SecureBoot.
Or, anything tricky about your / or /boot partitions, that grub or initramfs as installed may not be prepared for, like a luks or an lvm container or a RAID?
 
@liveunderwater First thing that comes to mind would be SecureBoot.
Or, anything tricky about your / or /boot partitions, that grub or initramfs as installed may not be prepared for, like a luks or an lvm container or a RAID?
Disabled SecureBoot, no luks, containers or RAID. Single hdd 1Tb partitioned to dual boot Windows and other. 100Gb partition for /home, 50Gb for /, a swap twice ram size, and initially I tried using the existing esp/efi partition but failed. So, I tried making my own esp partition and attempted a reinstall using that. Folks on the IRC support channel for Linux Mint brought my attention to a program on the Live OS called Boot Repair. It brought some issues to surface. For example, the ntfs Windows partition was throwing a fit and would not mount properly. Complaining the the Windows partition had cached data open because it was either hibernating or needed a clean shut down. Clean shut downs and restarts did nothing to clear the Boot Repair error. Then I caught something about Windows 8 fast-boot causing partition creation issues back in the day and applied it to Windows 10. After disabling Fast-boot Boot Repair came up clean but wants to use the second installation setup for the newly created esp that only has linux on it.
To cut this short, I'm about to gpart away that new esp, format the installation partions and attempt another fresh installation with the HDD hopefully fully under my control at this point.
 
Here we Go! Live from LMDE4 Cinnamon! Super excited to have overcome the beast that is UEFI :mad: Honestly, it wasn't that bad. So there were a few things left out from the prep section of the installation manual that applied to me. Fast-boot ntfs cache causing unchangeable partition tables for one. The big one was this giant oversight I had with the Security tab of my BIOS. This is my first time going Linux UEFI you see. The newly installed efi files have to be added to the trusted efi variable on the Security tab so that you may provide boot options on the boot tab.
And Bob's your uncle.
I think that's how you use that
Post automatically merged:

Now to get Japanese input working with an IME and Dvorak keyboard layout. (typically a problem) The main purpose of this machine is studying Japanese after all. Now with a side purpose of developing in C and helping out with Pyra.
 
As a followup of this https://pyra-handheld.com/boards/threads/first-information-for-new-pyra-owners-faq.99302/page-7

1. Linux Filesystem:
This may be a surprise for a windows users but in linux everything is a file under "/" . So / is the root of entire filesystem if you run "sudo*********" everything in your system is gone. ( rm is command for deletion and option -r means recursive -f gives force ).

You might consider not to post such a „dangerous“ terminal statement in a Linux beginners how-to-post.

Eager students could prematurely use it before finishing to read the whole sentence or might just not be aware of the hard results when executing it.


Gesendet von iPhone mit Tapatalk
 
How do whe know when the OpenGL Driver is working and Implemented in the current Update?
Only over the Mailing List?
Or will ED make a big News whit "OpenGL is now working, lets the Portings begin?"
 
Maybe ED will make a post, or maybe Ptitseb/Wally will notice first and the first indication we get is when true 3D apps start appearing on the repo.

Edit: Seems I was late in making my prediction but my prediction was right. Wally had already released his build of Mupen64 including gles support.
 
Last edited:
  • Like
Reactions: rSl
Why are you kee saying that 3D is not working???
It is working, and you can use gl4es to get OpenGL funcitonnality, exactly the same way it's working on the Pandora.
The only thing that is not working for now is SDL 1.2 Fullscreen, which anoying because many old emulator and games use that.
 
Maybe because some of us ditnt boot up theyre Pyra the last few days, when you say 3D is working, than whe believe you, i only have used the Drastic Emulator so far which whas Compiled at the time when the first 25 - 50 Pyra Owners got theyre Unit, so OpenGL wasnt working at this time..
 
You can build gl4es yourself and try glxgears to prove it works:
Code:
sudo apt update
sudo apt install build-essential cmake git libx11-dev
git clone https://github.com/ptitSeb/gl4es
cd gl4es
cmake -DPYRA=ON
make -j2
And it should build
Then to try glxgears:
Code:
LD_LIBRARY_PATH=lib/ glxgears
or to check version:
Code:
LD_LIBRARY_PATH=lib/ glxinfo -B
(remove the LD_LIBRARY_PATH to have info from mesa default driver, so software).
 
Wouldnd it be for me as a Linux Shell Legastinic to just wait for the Muppen64.dbp so i have something to test?
But whit the Pyra able to surv the Internet, and Copy and paste working, it might be easy to put this in on my Pyra..
 
Once gl4es is built and somewhere in the system (like "~/gl4es/lib" if you followed my previous instruction), it get easy to use.
You can for example use it with foobillard++:
Code:
sudo apt install foobillardplus
and then use
Code:
LD_LIBRARY_PATH=~/gl4es/lib foobillardplus
It will be slow at first, because it use too high settings: so go in settings / video and change the Ball reflection to "spheremap" (because "render" is too much: it calculate the cube reflection for each balls, with many textures copy, that mobile chip doesn't like.) You can also reduce ball geometry from veryhigh to just high, and remove anti-alias (gl4es doesn't support antialias on GLES2 backend for now).

Works fine after that
1612359371483.png

But that's jst an example, there are other 3D games on debian repo that can be played like that.
 
Last edited:
And how do this GLES work whit DBPs? is there something someone can put in the DBP that tells it to use GLES?
Shure i will try your Script once i got some time to do, but for now im still on the Counter of our shop..
 
Back
Top