Triggering pamac-manager from website


#21
[tio@tio-pc ~]$ xdg-open x-alpm-package://mc
gio: x-alpm-package://mc: The specified location is not supported

#22

It seems that the system does not see your .desktop file.


#23

The thing is that if i right click a file and open with another application, I can see it there and it seems to work, but that’s the only place i see it. I added the .desktop file to .local/share/applications - where am I doing it wrong? :smiley:


#24

I guess there are some DE or session specific settings, not sure where. It works in bspwm session and AwesomeWM session, but in Xfce session the same error message as you posted.
So, more tweaking is needed, I have no time right now.


#25

Ok thank you very much for the help! I use Gnome btw. Any time you can look into this would be awesome :slight_smile:


#26
xdg-mime default pamac-url-handler.desktop x-scheme-handler/x-alpm-package

??


#27

Oh wow it works in Firefox :smiley: - so after executing this command it works. What has this command done? And does it mean it will work from now on even after I restart the computer?

EDIT: Btw I see it does not work with AUR packages. Is that a limitation or does it need a new kind of “trigger”?


#28

Just found that. Works with xfce and firefox now.


#29

It does. I am still unsure what the command does. So far, to make all of this work, I need to create 2 files, one to add in local/share/applications and one in usr/bin, then punch in this command:

xdg-mime default pamac-url-handler.desktop x-scheme-handler/x-alpm-package

So far could be possible to create a script to do all that, which is encouraging. I am sill wondering about installing AUR in this manner as well. :slight_smile:


#30

IIUC this mime type is used for installing packages as files, like with pacman -U.
Contents of /usr/share/mime/packages/x-alpm-package.xml

<?xml version="1.0"?>
 <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
   <mime-type type="application/x-alpm-package">
   <generic-icon name="package-x-generic"/>
   <comment>Alpm Package</comment>
   <glob pattern="*.pkg.tar.xz"/>
   <glob pattern="*.pkg.tar.gz"/>
  </mime-type>
 </mime-info>

So, if I am right, you could provide packages (files) that could be handled (installed) from pamac. This still is not a repo-compatible/best practice…


#31

#technical-issues-and-assistance:applications is for “any application in the Manjaro repos”


#32

I think that should be done with PKGBUILD, so that the files could be properly installed/uninstalled/updated.


#33

Would you be willing to help me with that? :smiley: And also if you saw my question about AUR if that can also be somehow made to work. I am making this website to serve as a free database of hand-picked recommended software for a custom Manjaro we will release. We make many such free projects: no ads, no profit, nothing of the sort. So, if you would be willing to help us out with this I would be so grateful :smiley: - I can give you any info you want about this project I am trying to do. As a sidenote, it will of course promote Manjaro as well, since it is based on Manjaro, or better said it is a customized Manjaro Gnome :slight_smile:


#34

Thank you and I have to admit I am not knowledgeable enough to understand this. If you are willing to give me more sources where I can start reading about these I would appreciate :slight_smile: - this is very new to me


#35

The discussion is about pamac-manager though and pamac-manager includes AUR. If you think this thread should be moved to another topic feel free to say :smiley: - I don’t mind :wink:


#36

Well, maybe I could try to copy/paste/edit some PKGBUILD from an AUR package that does something similar. But I’m sure you are quite capable to do it yourself. All that is needed is a little research on archwiki and some examples from AUR and maybe a bit of persistance. When you have your draft you can ask on this forum if it is correct. There are package maintainers here with a lot of experience in PKGBUILDS (I’m not one of them).

I don’t know how to made it to work with AUR. It seems pamac-installer accepts only repo packages.


#37

Indeed maybe I can do it myself :smiley: - thank you very much for the help! It is a very interesting approach to be able to click and install through pamac from a website. I am also curious if this method is time-resilient so that I won’t end up relying on it on a website where I may end up recommending thousands of “apps”


#38

I 've just ran into OCS similar apps.
You may want to study their approach.
ocs-url or ocs-store in AUR.

@AJSlye may know more, as he is a contributor/user.


#39

Sounds interesting! Thanks!


#40

Not sure if this is appropriate but we would be willing to pay for the work if anyone is interested in helping us do the same but for AUR :smiley: - we want this tool to be for the greater good of everyone, a proper simple script that would allow people to install “apps” from any website by simply clicking an URL. By “apps” I mean from Manjaro repos and AUR.

We are about to release a custom Gnome Manjaro for our project together with a website where we will recommend many applications. Of course we will always give credit to Manjaro and everything we do is trade-free. Meaning we ask nothing from anyone (data, attention, money, crypto, etc.). We rely on voluntary donations only.

I managed to integrated the script for Manjaro repos into our custom Manjaro iso and this <a href=“x-alpm-package://mc”>Install mc</a> is simply going to allow for installation of software from our website or any website if the script that kainonergon did (thank you) is added to any Manjaro installation.

The reason we are willing to reward for the work is because we really want this to be happening and we understand so well that it is very difficult to find time to do this voluntary. And of course everything that is done, if this script will be done, will be posted on gitlab as open source.

If anyone is interested let me know - our budget is really tiny but well…