Skip to content

Add dtb_selector_bash.sh for Linux Users#191

Open
Juliancillo1310 wants to merge 1 commit intolcdyk0517:mainfrom
Juliancillo1310:main
Open

Add dtb_selector_bash.sh for Linux Users#191
Juliancillo1310 wants to merge 1 commit intolcdyk0517:mainfrom
Juliancillo1310:main

Conversation

@Juliancillo1310
Copy link
Copy Markdown

Created a bash script that copies the the dtbs, logo and Image file for each console

@lcdyk0517
Copy link
Copy Markdown
Owner

Your idea is to use a shell script for copying on Linux, right? It would be better to modify it so that the shell script is generated based on Go code. Otherwise, adding a new model would require maintaining two separate places.

@Juliancillo1310
Copy link
Copy Markdown
Author

Yeah the idea is to use a shell script using basic commands that all distros have, even the ones that are barebones. The idea is to maximize compatibility on every distro. At the start of the script there is a variable called "consoles" that can be modified in the future whenever a new console is added with the path of all the files necessary for it to run and should not need any other intervention

@lcdyk0517
Copy link
Copy Markdown
Owner

If I add new machines in the future, I’ll have to modify the .go code and dtb_selector_bash.sh, which currently requires changes in two different places. This is quite inconvenient from a maintenance perspective.
I’d like to centralize this so that future updates—whether adding or removing entries—can be done in a single place, ensuring consistency across Windows, macOS, and Linux users at the same time.

@Juliancillo1310
Copy link
Copy Markdown
Author

Maybe I can make the script read the table from the readme and with that you shouldn't have to modify 2 scripts

@lcdyk0517
Copy link
Copy Markdown
Owner

It would be best to modify build_dtb_selector.sh to generate dtb_selector_bash.sh.

@Juliancillo1310
Copy link
Copy Markdown
Author

Yeah that could be the solution

@xunicatt
Copy link
Copy Markdown
Contributor

xunicatt commented Jan 25, 2026

I think the best solution for this is to separate the data from the Go program into, let’s say, a JSON file. Then, moving forward, we won’t need to recompile the Go program every time. We can just add new devices by modifying the JSON file. This also allows us to generate a Linux script from the same JSON using build_dtb_selector.sh.

@souza-lb
Copy link
Copy Markdown

I don't know if it would be interesting. But I developed a Python version of dtb_selector for my personal use. I'm also a Linux user. A small drawback would be the issue of permissions for executing .sh files on a FAT32 partition. I believe I wouldn't face this problem using Python. And since this is something that comes pre-installed in most distributions, I took the opportunity to include Portuguese (Brazil) support. To facilitate maintenance, I also separated the list of consoles into a JSON file.

dtb_selector python version
json list console versions

@souza-lb
Copy link
Copy Markdown

I tried to develop this version in a way that it works on both Linux and Windows. Since I don't have a Windows machine to test it on here, I can't guarantee stability. But I noticed the previous comment mentioning the separation of code logic from the console list and remembered that I had already implemented this optimization.

@souza-lb
Copy link
Copy Markdown

souza-lb commented Feb 11, 2026

Here are some screenshots showing how it works. I even generated a modified image for personal use, including dtb_selector.py and some script modifications for PT_BR support.

Version for a personal use

dtb_selector_01_screen dtb_selector_02_screen dtb_selector_03_screen dtb_selector_04_screen dtb_selector_05_screen dtb_selector_06_screen

@kiodo1981
Copy link
Copy Markdown

Works exe with WINE.

@lcdyk0517 lcdyk0517 force-pushed the main branch 2 times, most recently from bc8e095 to d42b67a Compare March 12, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants