You are not logged in.
@Xyne
Thank you
1. The link in the first post of this thread (http://xyne.archlinux.ca/projects/mimeo) doesn't work anymore. The new link seems to be https://xyne.dev/projects/mimeo/.
2. Is there a (git or other VCS) repository for mimeo?
Offline
1. The link in the first post of this thread (http://xyne.archlinux.ca/projects/mimeo) doesn't work anymore. The new link seems to be https://xyne.dev/projects/mimeo/.
Fixed, thanks.
2. Is there a (git or other VCS) repository for mimeo?
It's on the way. I'm working through a TODO list for moving all of my projects to Gitlab and moving the website to Hugo but it's been slow due to limited free time.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Thanks.
How does mimeo infer mimetype?
I have STATA scripts with .do extension. They are text files to be opened with STATA.
Sometimes mimeo infer "text/x-csrc", but sometimes it infer "text/plain"
Offline
It uses Python's built-in MIME-types module and the "file" command, with an optional dependency on the "shared-mime-info" package.
Are you getting different results for the same file on the same system?
You could also try using regular expressions to obtain consistent results via the configuration file. See "mimeo --assoc-help" for details.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Hi @Xyne
Thanks for this amazing piece of software.
I was trying to do the vlc example in the documentation but I don't really understand how to do it.
I do apologize if this questions are too stupid but I don't understand how to configure mimeo properly
In Association File Examples you have this
vlc --one-instance --playlist-enqueue %U
^https?://(www.)?youtube.com/watch\?.*v=
I have added that to ~/.config/mimeo/associations.txt
But still can't open youtube links with vlc. What am I missing?
Last edited by iojeda (2023-01-21 03:06:00)
Offline
What do you expect to happen?
This configuration is only for the mimeo command itself.
If you want to handle clicking a link in another application, then most should work if you replace xdg-open (e.g. install xdg-utils-mimeo from the AUR).
Browsers themselves do not ask the system how to open links, so for those you need to install addons.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
I am reading `mimeo --filepath-help`
> Pass en empty argument to disable the check"
"en" should be "an".
What does it mean to disable the check? That `$HOME/.config/mimeo/associations.txt` is not read even if present?
> --term 'urxvt -e %s' --deprecated"
The double quote at the end should be removed
Offline
What does it mean to disable the check? That `$HOME/.config/mimeo/associations.txt` is not read even if present?
Yes, the empty path will skip reading existing associations files (the previous sentence states that mimeo will check files for associations).
I have changed it to "Pass an empty string to skip existing files." and fixed the errors that you mentioned for the next release. Thanks for the feedback!
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I found a bug when I was trying to use /etc/xdg/mimeo/associations.txt instead of ~/.config/mimeo/associations.txt
in Mimeo.py:1291 the code uses the exception as hint that it shoud try the next config file location, but in Mimeo.py:497 the exception is catched to print a debug message, so mimeo would only ever check the ~/.config location
Offline
I found a bug when I was trying to use /etc/xdg/mimeo/associations.txt instead of ~/.config/mimeo/associations.txt
in Mimeo.py:1291 the code uses the exception as hint that it shoud try the next config file location, but in Mimeo.py:497 the exception is catched to print a debug message, so mimeo would only ever check the ~/.config location
Fixed, thanks. A new version should be up shortly.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
@Xyne
I use mimeo in a zsh shell function, like so:
open () {
mimeo "${@}" &
}
With the previous version (2022.7-3), this used to work, and didn't leave background jobs running (if there were any stderr/stdout output of the commands, it would appear in the shell, but otherwise wouldn't interfere with my usage of that shell).
Now, in version 2023, it keeps the background job running (as if mimeo no longer forks, or whatever its previous behavior was), and at least with mplayer (after using open() to open an MP4 file), it suspends the job. If I bring that job to the forground (e.g. with `fg` or `fg %1`, etc.) I can no longer use that shell. And at least for mplayer, if it gets any input from stdin, it exits MPlayer. From what I can tell, mimeo no longer forks (or whatever the process is called), it runs in the foreground where it used to not do that.
I use mimeo through this open() shell function heavily, to launch GUI programs without having to first fire up the GUI program and navigate to the file I want to open. With version 2023, my usage is completely broken, and it's not clear from the changelog what changed (the changelog on the main mimeo page only has the last updaet from 2021). I don't know where to begin looking for why it appears to be broken. The ampersand in open() appears to suspend the GUI program, which is definitely not what I want.
I've tried inserting nohup in my open() shell function, but that has unsatisfactory results (namely, the shell job is still running). I've also removed the ampersand (for sending the shell command to the background), but that keeps me from using that shell entirely until the program launched through mimeo/open() is closed. Basically, I don't want to be able to kill any programs launched with mimeo via this open() function using standard shell job control. I want to be able to close the window, or find the PID using `ps`, etc., to stop the launched program.
Downgrading to 2022.7-3 seems to fix it, for now. Any ideas?
Offline
Traceback (most recent call last):
File "/usr/bin/mimeo", line 5, in <module>
from Mimeo import run_main
ModuleNotFoundError: No module named 'Mimeo'
The package on your repo needs rebuild. python 3.11 is already out.
Edit: AUR package needs bump too.
Last edited by rEnr3n (2023-05-07 08:17:21)
Offline
xdg-settings get default-url-scheme-handler (<app>) fails:
❯ xdg-settings get default-url-scheme-handler
xdg-settings: default-url-scheme-handler not implemented for mimeo
❯ xdg-settings get default-url-scheme-handler obsidian
xdg-settings: default-url-scheme-handler not implemented for mimeo
I'm trying to run the command because Obsidian gave me the same error message before crashing:
xdg-settings: default-url-scheme-handler not implemented for mimeo
[15956:1012/165324.160987:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[15956:1012/165324.161035:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[15956:1012/165324.161045:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[15956:1012/165324.161051:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[15956:1012/165324.198180:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type:
2023-10-12 14:
Note that I use the xdg-desktop-portal-hyprland package, but I don't think that should affect anything, because the normal xdg-desktop-portal package is one of its dependencies, which leads me to assume that it's just an extension.
Offline
@Xyne could this be uploaded to PyPi? I have problems with Python dependencies and by uploading this on PyPI I could install it in a virtual environment easily
Last edited by raffaem (2024-04-30 13:38:12)
Offline
@Xyne could this be uploaded to PyPi? I have problems with Python dependencies and by uploading this on PyPI I could install it in a virtual environment easily
I'm on the process of cleaning up my projects, properly packaging them and putting them up on GitLab. As soon as that's done I will push everything worthwhile to PyPI.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline