Tiny Core Linux
General TC => Programming & Scripting - Unofficial => Topic started by: Rich on January 27, 2026, 12:19:54 PM
-
I recently wrote a post about adding items to the popup desktop menu.
The example I used invoked "editor /opt/tcemirror":
https://forum.tinycorelinux.net/index.php/topic,27977.0.html
After thinking about it, I felt could create something nicer for altering /opt/tcemirror.
I decided to use Xdialog and came up with what I feel is a pretty nice interface.
If mirrors.tcz is currently installed, it opens up to this:
(https://forum.tinycorelinux.net/index.php?action=dlattach;topic=27986.0;attach=7189)
The titlebar displays the file name (/opt/tcemirror).
The next line shows the current contents (tcemirror=http://repo.tinycorelinux.net/).
The menu window displays the choices for mirrors.
There's also a help page:
(https://forum.tinycorelinux.net/index.php?action=dlattach;topic=27986.0;attach=7195)
If mirrors.tcz is not currently installed, or you use the -m option, it opens up to this:
(https://forum.tinycorelinux.net/index.php?action=dlattach;topic=27986.0;attach=7191)
The titlebar displays the file name (/opt/tcemirror).
The next line shows the current contents (tcemirror=http://repo.tinycorelinux.net/).
There is an inputbox where you can manually enter a mirror URL.
There's also a help page:
(https://forum.tinycorelinux.net/index.php?action=dlattach;topic=27986.0;attach=7196)
Since there is a limit of 4 attachments, I will attach the script in the next post.
-
Here is the script. You need Xdialog.tcz to run it.
-
I just noticed there is already a script called tcemirror.sh.
I've renamed mine to MirrorSelect.sh.
I also found out there is an /opt/localmirrors option, so I
added provisions to scan for that too.