- This topic has 18 replies, 7 voices, and was last updated May 26-12:27 am by sybok.
-
AuthorPosts
-
March 25, 2023 at 7:06 pm #103182
DaveForum AdminApp-select has been updated and can be found here:
http://gitlab.com/antiX-Dave/app-select-antix/Looking to have some testing of the app before submitting a merge request to antiX-Linux.
Current major updates:
Updated app-select.conf
– removed hard set items leafpad and mirage (open in text and view image); exchanging them for desktop-defaults-run.
– added add-desktop options (open in add-desktop, send to desktop, send to personal menu). This also requires and updated add-desktop found here: http://gitlab.com/antiX-Dave/add-desktop-antix
– Added a options / context menu button beside the apply / exit buttons
– added mime type associations to the output of the applications, also a filter in the search for mime types.
– added a mime type “editor” to the options / context menu to set the selected application as default for the selected mime types it supports.To “install”:
– clone the repo and enter the directory
git clone http://gitlab.com/antiX-Dave/app-select-antix/ && cd app-select-antix
– remove the already present symlinks (leafpad and mirage) in /usr/lib/app-select/plugins and replace with the symlinks to desktop-defaults-run and add-desktopsudo rm -r /usr/lib/app-select/plugins/leafpad && sudo rm -r /usr/lib/app-select/plugins/mirage sudo cp ./lib-app-select/plugins/* /usr/lib/app-select/plugins– copy the as_mime_editor plugin to /usr/lib/app-select/
sudo cp -r ./lib-app-select/as_mime_editor /usr/lib/app-select/
– remove (or edit) the current copy of app-select.conf and exchange or merge with the new one
rm ~/.config/app-select.conf && cp ./app-select.conf ~/.config/app-select.conf
– replace app-select with the newer version (or run locally with ./app-select)
sudo cp ./app-select /usr/local/bin/app-selectNotes:
– please start app-select from terminal to catch any outputted errors
– there may be issues with the cache file that causes an error. There is a check in app-select to see if the cache file is the older version (without mime types) and should automatically rebuild the cache file to make a newer version (with mime-types). If you receive and error in terminal on first run, please copy it and then runrm ~/.cache/app-selectbefore trying to run it again.
– for the updated add-desktop, downloading the add-desktop script (http://gitlab.com/antiX-Dave/add-desktop-antix/-/blob/master/usr/local/bin/add-desktop) and replacing the version in /usr/local/bin/add-desktop with the newly downloaded version should be enough to have the updated add-desktop options workingComputers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
March 25, 2023 at 8:07 pm #103185
Brian MasinickModeratorDave, I gave it a try on an old Hewlett-Packard product: s5747c desktop and it works fine, didn’t see any errors and I tried several apps after modifying the system with this version. Unless there’s something wrong with a particular app, it looks good. Hopefully a few more people will take a look, but in the meantime the instructions looked good and it worked fine.
Just make sure you’re in the app-select-antix directory; if the cd following the git doesn’t work or you do anything in between, you won’t be in the right place to copy stuff exactly as in Dave’s directions, but if you follow carefully it seems to be fine!
Thanks for your efforts Dave!
--
Brian Masinick
Alternate "Search B":
This search pageMarch 26, 2023 at 3:29 pm #103272
capreaModeratorMany thanks for your efforts, Dave, I tested it on antiX21 and still have problems with the new right-click options, respectively they work now very good and open the applications in add-dektop, but add-desktop does not work.
This is might due to my some years old antiX21 installation where I tinkered and tested a lot.I must say I never used add-desktop before.
The “send to desktop” option from app-select creates an application/.desktop in the /Desktop folder but in none of the window managers it is shown as shortcut/icon on my desktop.The “Send to Personal menu” adds nothing to the personal menu , but if I execute from terminal
desktop-menu --desktop-code="$code" --menu-file='/etc/xdg/menus/TCM-MENU.menu' --write-out --write-out-file='personal'
the added applications appear immediately on the Personal menu.
As already mentioned might caused by my tinkered system. So I will test the above on a clean antiX23 installation later and give feedback.In the above instruction there’s a typo in the second codeblock, one sudo is missing
sudo rm -r /usr/lib/app-select/plugins/leafpad && sudo rm -r /usr/lib/app-select/plugins/mirageMarch 26, 2023 at 4:01 pm #103276
Brian MasinickModeratorCaprea, you’re right about the corrections; I changed sudo rm -r /usr/lib/app-select/plugins/leafpad && sudo rm -r /usr/lib/app-select/plugins/mirage
but forgot to mention it; other than that it works fine and I’ve now tried it on antiX 23 Beta 1 first and today I repeated it on antiX 22.
--
Brian Masinick
Alternate "Search B":
This search pageMarch 26, 2023 at 5:25 pm #103282
DaveForum Admin@Caprea did you copy over the newer add-desktop?
Were there any errors displayed in the terminal?Which app did you use to try to send to desktop or personal menu (and which language)? I would like to try and reproduce the issue.
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
March 27, 2023 at 12:37 pm #103330
capreaModeratordid you copy over the newer add-desktop?
Yes, I renamed the old one to /usr/local/bin/add-desktop.bak and copied the downloaded one to /usr/local/bin/add-desktop, had to change ownership to root and make it executable.
I tried arandr for example,the language is german.Nothing in terminal.- This reply was modified 3 years, 6 months ago by caprea.
March 29, 2023 at 2:08 am #103502
DaveForum Admin@Caprea:
I booted the antiX 23 beta iso with the German language selected and 2 issues I noticed.
1. add-desktop had the path for the desktop directory hard coded as $HOME/Desktop. This has been changed to use $XDG_DESKTOP_DIR to account for the locale change. For the personal menu, there was an extra menu refresh line that was also static/hard coded and not needed. After fixing these items, add-desktop would add the app to the desktop folder if manually running the string from app-select (like: add-desktop -a some|information|about|the|app) but app-select would not work. Which brings up issue number 2.
2. Though the files in lib-app-select/plugins in my gitlab are symlinks to add-desktop and desktop-defaults-run; twice during testing when I copied them over to a fresh boot of the iso the symlinks became copies of the file. This is why app-select acted like it was using an old copy (not working) of add-desktop even though the newer copy was in /usr/local/bin/ as noticed after repairing issue number 1. After removing these files and making new symlinks to /usr/local/bin/ app-select was working for both send to desktop and send to personal.These should be repaired in the newest add-desktop from http://gitlab.com/antiX-Dave/add-desktop-antix/ and by verifying that the file in /usr/lib/app-select/plugins are actually symlinks to /usr/local/bin/(add-desktop|desktop-defaults-run)
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
March 29, 2023 at 4:54 am #103508RJP
Member@Caprea:
I booted the antiX 23 beta iso with the German language selected and 2 issues I noticed.
1. add-desktop had the path for the desktop directory hard coded as $HOME/Desktop. This has been changed to use $XDG_DESKTOP_DIR to account for the locale change. )The same problem is in add-desktop script, which does not work other locales than english. The fix is change FILE_WRITE_LOCATION line as
FILE_WRITE_LOCATION="$(xdg-user-dir DESKTOP)"Attachments:
March 30, 2023 at 2:19 am #103618
DaveForum Admin@RJP,
What is the difference between “xdg-user-dir DESKTOP” and $XDG_DESKTOP_DIR?
As expected (to me) these produce the same result in the random languages I have chosen booting from ISO.
Both reference ~/.config/user-dirs.dirs; “xdg-user-dir DESKTOP” references it when the command is run and $XDG_DESKTOP_DIR is an environment export when the desktop environment is started (in /usr/local/lib/desktop-session/desktop-session-xdg-dirs.sh).Maybe I am missing a reason why “xdg-user-dir DESKTOP” is preferred over an environment variable?
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
March 30, 2023 at 3:58 am #103620RJP
Member@Dave Both of them are working.
July 21, 2024 at 1:23 am #149483
ileMemberHello App-Select
There are “deprecated” items in add-desktop.
“Encoding=”UTF.8 key needs deletion.
(It is default) Item Category $categories “Application” value needs deletion.May 23, 2026 at 2:33 pm #205243anticapitalX
Membertried to run app-select in my super minimal antiX .
$ app-select Traceback (most recent call last): File "/usr/local/bin/app-select", line 45, in <module> missing_icon = icon_theme.lookup_icon("application-x-executable", icon_size, 0).get_filename() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get_filename'I had to edit line 45 of /usr/local/bin/app-select file:
#missing_icon = icon_theme.lookup_icon("application-x-executable", icon_size, 0).get_filename() missing_icon = "/usr/share/icons/Adwaita/symbolic/actions/action-unavailable-symbolic.svg"now app-select works
and shows this output in terminal :Cannot get filename for icon
now app-select works as expected .
I hope this information helps you @Dave , to fix this issue in the future .
thanks
———
app-select version == 2.3- This reply was modified 4 months ago by anticapitalX.
Let's accept antiX as it is
Pure and Elegant by its natureMay 24, 2026 at 6:12 am #205274
sybokMemberMy attempt using version on an antiX 26-ish system (app-select-antix: 2.0.12, fluxbox with papirus-antix 48×48 theme).
Your fix assumes that Adwaita theme is installed, which makes it an assumed dependency.
I also get the “Cannot get filename for icon” message but no traceback; did you modify the script?Anyway, I tried to run pure Python on my antiX install.
from gi.repository import Gtk x = Gtk.IconTheme.get_default() y = x.lookup_icon("application-x-executable", 48, 0) # The-hardcoded string should be modified! y.get_filename()which produced the following message
<python-input-1>:1: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version(‘Gtk’, ‘3.0’) before import to ensure that the right version gets loaded.
and the result of get-filename is ‘/usr/share/icons/papirus-antix/48×48/mimetypes/application-x-executable.png’ is selected and this file is present in my system.
@anticapitalX:
What is the output of the following command?
find /usr/share/icons/ -name '*application-x-executable*'
You could switch theme to one that contains it or you could create a “dummy” file of that name in your current theme.@dave:
A possible fix is to iterate over several options (in order to cover for more themes), icon names and/or sizes, when looking up the icon in the default icon theme.for an_icon_name in ('application-x-executable', ...): # Other options if bool(icon_theme.has_icon(an_icon_name)) is True: # The bool(...) is just for sure since e.g. NumPy bool comparison with pure Python's bool fails. # select and break from the iterationMay 24, 2026 at 12:45 pm #205285anticapitalX
MemberYou could switch theme to one that contains it or you could create a “dummy” file of that name in your current theme.
I suggest adding a non-fatal fallback mechanism.
If a theme or icon set is missing, the script should:
Log a warning (non-fatal error)Not block app-select from running
This improves resilience across minimal or custom antiX installs.
Let's accept antiX as it is
Pure and Elegant by its natureMay 24, 2026 at 12:56 pm #205287
sybokMemberI suggest adding a non-fatal fallback mechanism.
I support that, the text you quoted was merely a workaround.
The fall-back, IMHO, would have to be either
A) an icon image file that is always there in any theme, hence the tuple values iteration to get some flexibility, or some kind of mapping, e.g. dictionary <key = theme>:<value: str = icon image file>, to select an icon image file,
or
B) not using Gtk icon in the case the expected icon image is not there; which I expect not to be practical|feasible in a GUI Gtk-application.BTW, I find it somewhat amusing|ironic that the app-select crashes because the ‘missing_icon’ variable cannot be filled because the expected icon image file is missing.
-
AuthorPosts
- You must be logged in to reply to this topic.