General TC > Programming & Scripting - Unofficial

minimalistic approach to MIME types / filetype associations

<< < (2/5) > >>

GNUser:
Hi, aus9. All you need (including  mimeapps.list  and a script that sets up everything for you) is here now:
https://github.com/bdantas/tinyopen

GNUser:
Please note that on TCL the  mime-links  script needs to be run at every boot (e.g., via a job in ~/.X.d/). Also, obviously, the  mime  directory needs to be somewhere with persistence (e.g., in /opt or /home) or added to your backup via  .filetool.lst  and  filetool.sh -b.

aus9:
sorry for the delay. Just downloaded it

Some questions if you do not mind?

1) Was this script originally designed for a prefix=/usr type distro?
2) If so, is that the reason why mime-links appears to want to link
tinyopen to /usr/bin/xdg-open? (and similar pathways)
and
sudo mkdir -p /usr/share/applications

When AFAIK, anyone running a WM or Gnome are likely already have
/usr/local/share/applications

3) AFAIK TC64 desktops are perm 644. Why do we need to change to 755?

--- Quote ---chmod a+x $mime_dir/mimeapps-open.desktop
--- End quote ---

4) what am I supposed to define for "_TINYOPEN_CFGARG=" please?

I am sorry if this looks picky....but I need your script to fix up a mess caused by me running a certain package that breaks pristine state that  re-creates .config/mimeapps.list
It is a web browser....and I prefer to keep it

I am hoping you will  work out my issues and then you can submit a TCE if interested?

GNUser:

--- Quote from: aus9 on July 25, 2020, 02:25:05 AM ---I am sorry if this looks picky....

--- End quote ---

No worries. I'm happy to help.

1) No, I designed the script for my personal use on TCL.

2) I did everything in a distro-agnostic way. /usr is a more common prefix than /usr/local, so that's why I chose /usr. But it honestly makes no difference--you can change every /usr in the tinycore "suite" to /usr/local if you prefer. The only important thing is that when you run which xdg-open in a terminal, the result you get is the link to tinyopen and not the "real" xdg-open (if it's installed).

Every  mkdir  in the script is there just to be safe. Because of the distro-agnostic nature of the script, I didn't want to make any assumptions.

3) If a .desktop file isn't marked executable, applications and desktop environments will ignore them. Try it and you'll see what I mean.

4) Nothing. You can leave it blank. I'll edit the script on github to clarify that.

Please go ahead and give it a try. It's hard to break a TCL system because rebooting performs a "factory reset" (plus customizations via bootcodes, onboot.lst, mydata.tgz, and startup jobs in /opt/boot*.sh and ~/.X.d/).

aus9:
thanks spotted another one for you maybe?

--- Quote ---_TINYOPEN_CFGRC="$HERE/tinyopenrc"
_TINYOPEN_CFGSYS="/etc/tinyopen.conf" # this does not have to exist (just $HOME/.config/tinyopenrc is sufficient))
--- End quote ---

It looks to me you are saying if someone has a system wide config, they could rename and place the rc file under etc/ as tinyopen.conf....CHECK
if not found....the home config rc file is at our pwd.....but above it appears to me you are suggesting that is
.config/

but I understand your README differently as you appear to say

--- Quote ---1. Put the attached `mime` directory with its 4 files anywhere on your system
--- End quote ---
and that rc file unpacks to a dir called mime.

And sorry to be anal....that means it can not be .config but somewhere else?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version