Forum › Forums › Official Releases › antiX-21/22 “Grup Yorum” › antiX 22: selecting preferred applications
- This topic has 80 replies, 9 voices, and was last updated Nov 24-6:29 pm by Robin.
-
AuthorPosts
-
October 22, 2022 at 10:57 am #91211Member
calciumsodium
antiX 22 x64 base.
I wanted to select chromium as my preferred web browser. I highlight chromium from the list of installed web browser. I click OK. But it does not take it. Instead, I get a –1 in that row. Please see attached screenshot.
$ inxi -b System: Host: antix1 Kernel: 5.10.149-gnu1 arch: x86_64 bits: 64 Desktop: IceWM v: 3.0.1 Distro: antiX-22_x64-base Grup Yorum 19 October 2022 Machine: Type: Desktop Mobo: N/A model: N/A serial: <superuser required> BIOS: American Megatrends v: 080015 date: 05/06/2010 CPU: Info: dual core Intel Pentium D [MCP] speed (MHz): avg: 2903 min/max: 2403/3403 Graphics: Device-1: Intel 4 Series Integrated Graphics driver: i915 v: kernel Display: server: X.Org v: 1.20.11 driver: X: loaded: intel gpu: i915 resolution: 1280x1024~60Hz OpenGL: renderer: Mesa DRI Intel G41 (ELK) v: 2.1 Mesa 20.3.5 Network: Device-1: Realtek RTL810xE PCI Express Fast Ethernet driver: r8169 Device-2: Qualcomm Atheros AR5416 Wireless Network Adapter [AR5008 802.11bgn] driver: ath9k Drives: Local Storage: total: 55.94 GiB used: 2.7 GiB (4.8%) Info: Processes: 143 Uptime: 15m Memory: 3.81 GiB used: 860.4 MiB (22.1%) Shell: Bash inxi: 3.3.19Attachments:
October 22, 2022 at 3:20 pm #91216ModeratorBobC
::Hmmmmm, I’ll need to know what you fed it to figure out what that caused that. The seamonkey entry looks odd, too.
Please make a recursive zip archive file of your /usr/share/applications folder and attach it to your post. I doubt there is anything personal there.
Please make a recursive zip archive file of your ~/.local/share/applications folder and attach that to your post. If there is anything personal there, just change the non-blank characters of it to x’s so I know there was a value there.
October 22, 2022 at 4:20 pm #91218Membercalciumsodium
::Hello @BobC,
When I clicked on web browser, it gave me three options: chromium, dillo and links2. I chose chromium and click OK. Then when I came back into preferred applications, I see the –1 in the web browser section.
Please see attached zip documents. These are essentially what came with the published antiX 22 x64 and then a few other programs.
If it helps any, I did not want seamonkey as a web browser. AntiX 22 x64 base came with seamonkey. So I purged it and then installed chromium.
Thanks for looking into this.
- This reply was modified 6 months, 2 weeks ago by calciumsodium. Reason: added info on web browser options
Attachments:
October 22, 2022 at 5:06 pm #91222ModeratorBobC
::I think the Categories entries are invalid, but they were already selected as your defaults.
I see a few things…
1. The program needs to allow unusual entries to exist, and be selected, but by default, unusual entries should only appear if they are the current selection for that Application unless the “Show all entries” checkbox is checked.
2. The program needs to have a “Show all entries” checkbox, default to unchecked, to allow you to select any .desktop entry, regardless of its Categories entries. This will allow you to select SeaMonkey as your default email client, even though it’s not an Email application according to it’s desktop entry.
3. The program maybe needs to look a bit wider than the Categories entry for clues.October 22, 2022 at 5:43 pm #91223Membercalciumsodium
::Hi @BobC
In layman’s terms, can I get chromium to be chosen as the default web browser in the current configuration of this program? If yes, can you please show me how? Hopefully, this may help others as well.
Thanks.October 22, 2022 at 6:08 pm #91227ModeratorBobC
October 22, 2022 at 7:04 pm #91229ModeratorBobC
::Base!
I never thought of that.
More testing…
So you deleted the default browser and email client?
Do you mean you removed the seamonkey package itself, or do you mean you just removed it as the default?
Go to a terminal, and paste here the results from below
cd ~/.local/share/desktop-defaults ls -la desktop-defaults-setThe program will pop up and could you try just going and selecting claws mail as the email client?
and then see if you can select chromium as the web browser again?
Then click Ok.Now go back to the terminal and paste in this, and when the program pops up, see if it’s ok here the results from
cd ~/.local/share/desktop-defaults ls -la desktop-defaults-setIs it all set Ok now?
If not, take a pic of the window again. The ls -la tells us what your defaults are set to.October 22, 2022 at 7:43 pm #91231Membercalciumsodium
::Hi @BobC,
When I removed seamonkey, I used the command:
sudo apt purge seamonkeyAs you suggested, I tried the following commands. It would not give me the option of Claws as an email client. Its only options was seamonkey. Then I set web browser to chromium:
cd ~/.local/share/desktop-defaults ls -la desktop-defaults-setantix@antix1:~ $ cd ~/.local/share/desktop-defaults antix@antix1:~/.local/share/desktop-defaults $ ls -la total 20 drwxr-xr-x 2 antix antix 4096 Oct 22 11:23 . drwxr-xr-x 7 antix antix 4096 Oct 22 11:23 .. lrwxrwxrwx 1 antix antix 42 Oct 22 11:23 audio-player.desktop -> /usr/share/applications/antix/xmms.desktop lrwxrwxrwx 1 antix antix 37 Oct 22 11:23 editor.desktop -> /usr/share/applications/geany.desktop lrwxrwxrwx 1 antix antix 38 Oct 22 11:23 email.desktop -> ../applications/seamonkey-mail.desktop lrwxrwxrwx 1 antix antix 64 Oct 22 11:23 file-manager.desktop -> /usr/share/applications/antix/desktop-defaults-follow-fm.desktop lrwxrwxrwx 1 antix antix 38 Oct 22 11:23 image-viewer.desktop -> /usr/share/applications/mirage.desktop lrwxrwxrwx 1 antix antix 39 Oct 22 11:23 terminal.desktop -> /usr/share/applications/roxterm.desktop lrwxrwxrwx 1 antix antix 68 Oct 22 11:23 video-player.desktop -> /usr/share/applications/io.github.celluloid_player.Celluloid.desktop -rw-r--r-- 1 antix antix 3687 Oct 18 16:54 web-browser.desktop antix@antix1:~/.local/share/desktop-defaults $ desktop-defaults-set lang=en_US grep: 1: No such file or directory grep: 1: No such file or directory grep: 1: No such file or directory app_info= ROXTerm -- /usr/share/applications/roxterm.desktop|Chromium Web Browser -- /usr/share/applications/chromium.desktop|Session File Manager -- /usr/share/applications/antix/desktop-defaults-follow-fm.desktop|SeaMonkey -- /home/antix/.local/share/applications/seamonkey-mozillabinaries.desktop| Geany -- /usr/share/applications/geany.desktop| Mirage -- /usr/share/applications/mirage.desktop| Celluloid -- /usr/share/applications/io.github.celluloid_player.Celluloid.desktop| XMMS -- /usr/share/applications/antix/xmms.desktop| rm /home/antix/.local/share/desktop-defaults/terminal.desktop ln -s /usr/share/applications/roxterm.desktop /home/antix/.local/share/desktop-defaults/terminal.desktop ln -s /usr/share/applications/chromium.desktop /home/antix/.local/share/desktop-defaults/web-browser.desktop rm /home/antix/.local/share/desktop-defaults/file-manager.desktop ln -s /usr/share/applications/antix/desktop-defaults-follow-fm.desktop /home/antix/.local/share/desktop-defaults/file-manager.desktop rm /home/antix/.local/share/desktop-defaults/email.desktop ln -s /home/antix/.local/share/applications/seamonkey-mozillabinaries.desktop /home/antix/.local/share/desktop-defaults/email.desktop rm /home/antix/.local/share/desktop-defaults/editor.desktop ln -s /usr/share/applications/geany.desktop /home/antix/.local/share/desktop-defaults/editor.desktop rm /home/antix/.local/share/desktop-defaults/image-viewer.desktop ln -s /usr/share/applications/mirage.desktop /home/antix/.local/share/desktop-defaults/image-viewer.desktop rm /home/antix/.local/share/desktop-defaults/video-player.desktop ln -s /usr/share/applications/io.github.celluloid_player.Celluloid.desktop /home/antix/.local/share/desktop-defaults/video-player.desktop rm /home/antix/.local/share/desktop-defaults/audio-player.desktop ln -s /usr/share/applications/antix/xmms.desktop /home/antix/.local/share/desktop-defaults/audio-player.desktop antix@antix1:~/.local/share/desktop-defaults $Then I went back to terminal and tried again:
cd ~/.local/share/desktop-defaults ls -la desktop-defaults-setThis is what I get:
antix@antix1:~ $ cd ~/.local/share/desktop-defaults antix@antix1:~/.local/share/desktop-defaults $ ls -la total 24 drwxr-xr-x 2 antix antix 4096 Oct 22 14:31 . drwxr-xr-x 7 antix antix 4096 Oct 22 14:31 .. lrwxrwxrwx 1 antix antix 42 Oct 22 14:31 audio-player.desktop -> /usr/share/applications/antix/xmms.desktop lrwxrwxrwx 1 antix antix 37 Oct 22 14:31 editor.desktop -> /usr/share/applications/geany.desktop lrwxrwxrwx 1 antix antix 71 Oct 22 14:31 email.desktop -> /home/antix/.local/share/applications/seamonkey-mozillabinaries.desktop lrwxrwxrwx 1 antix antix 64 Oct 22 14:31 file-manager.desktop -> /usr/share/applications/antix/desktop-defaults-follow-fm.desktop lrwxrwxrwx 1 antix antix 38 Oct 22 14:31 image-viewer.desktop -> /usr/share/applications/mirage.desktop lrwxrwxrwx 1 antix antix 39 Oct 22 14:31 terminal.desktop -> /usr/share/applications/roxterm.desktop lrwxrwxrwx 1 antix antix 68 Oct 22 14:31 video-player.desktop -> /usr/share/applications/io.github.celluloid_player.Celluloid.desktop -rw-r--r-- 1 antix antix 3687 Oct 18 16:54 web-browser.desktop antix@antix1:~/.local/share/desktop-defaults $ desktop-defaults-set lang=en_US grep: 1: No such file or directory grep: 1: No such file or directory grep: 1: No such file or directoryPlease see screen shot 4. It still won’t accept chromium as the default browser. Instead, it give a –1 value.
Attachments:
October 22, 2022 at 7:58 pm #91234Membercalciumsodium
::Also, I don’t see this problem in antiX22 x64 full. I only see this in antiX22 x64 base.
October 22, 2022 at 9:29 pm #91239ModeratorBobC
::On base, the web-browser.desktop (and only that one) is a file instead of the link to a file like my code expected.
Ok, to fix the problem on base:
In a terminal paste this in one line at a time, all should be good, but if not, paste a screenshot and the results here:
cd ~/.local/share/desktop-defaults rm -f web-browser.desktop ln -s /usr/share/applications/chromium.desktop web-browser.desktop ls -la desktop-defaults-setThe
October 22, 2022 at 10:15 pm #91242Membercalciumsodium
October 24, 2022 at 1:21 pm #91312ModeratorBobC
::I made changes, but opted not to add a manual override. I also made a point of not changing the line numbers of any translations, to avoid causing additional translation effort. Building a manual override into the program itself would have added significant complexity. A good future possibility would be to add a “Manual override” button which would run the old program, which allows any .desktop file to be selected.
There are inconsistencies in .desktop files. Given they come with the applications, we would hope they would be correct enough to be usable, but it seems many lack translations. I made the program more lenient, for example allowing chromium to be a default browser even though it doesn’t have a semi-colon following each categories entry.
If the current default entry is a link to an existing .desktop file, it should appear. If it’s not, when you change the defaults, it will get replaced by the first valid option.
So the only impact will be to the program itself. I’ll attach a copy for anyone that wants to help test. It needs to be tested on both base and full. Before testing, a backup copy of the ~/.local/share/desktop-defaults folder should be made. If the program has problems, restoring that folder would put things back to the way they were. If you press the cancel button, no changes will be made.
Attachments:
October 24, 2022 at 3:40 pm #91314MemberPPC
::Dear Bob- good news:
I tested the script- it now displays “rox-filer” as an available FM
Even better news: your “fix” for localization failed, but it was an easy fix. the problem was not the line numbers but the fact that the original localizations included the description of the way the text would be displayed (in what kind of box): all the original texts and localizations includ “:FL” at the end.
It’s easier to show you:
The “File Manager” string in the localization files is “File Manager:FL” (in pt-pt localization it displays “Gestor de Ficheiros:FL”)
Example of my fix (basically removing the last 3 characters from each localized variable), to keep the existing localization files and adapt the script to work with them:TransTerminal=$"Terminal:FL"; TransTerminal=${TransTerminal::-3} TransWebBrowser=$"Web Browser:FL"; TransWebBrowser=${TransWebBrowser::-3} TransFileManager=$"File Manager:FL"; TransFileManager=${TransFileManager::-3} TransEmailClient=$"Email Client:FL"; TransEmailClient=${TransEmailClient::-3} TransTextEditor=$"Text Editor:FL"; TransTextEditor=${TransTextEditor::-3} TransImageViewer=$"Image Viewer:FL"; TransImageViewer=${TransImageViewer::-3} TransVideoPlayer=$"Video Player:FL"; TransVideoPlayer=${TransVideoPlayer::-3} TransAudioPlayer=$"Audio Player:FL"; TransAudioPlayer=${TransAudioPlayer::-3}It works ok in my end, in pt-pt, it should work in any language!
Warning!
As I think I reported before, Geany does not come up in the text editor list – if I select “Leafpad” and try to change back to “Geany”, it’s not available in the list! My suggestion to solve that, edit the generated list of available (text editor) apps to include geany, if it’s .desktop file exists in the system…As always, great work, Bob!
P.
- This reply was modified 6 months, 2 weeks ago by PPC.
- This reply was modified 6 months, 2 weeks ago by PPC.
- This reply was modified 6 months, 2 weeks ago by PPC.
Attachments:
October 24, 2022 at 4:21 pm #91321ModeratorBobC
::Sadly, the Web Browser still doesn’t work on base, as it is a file $HOME/.local/share/desktop-defaults/web-browser.desktop rather than a link to a file like all the others, and doesn’t have the “WebBrowser” or “Browser” “Categories=” entry.
I hadn’t noticed the other problems you found. Most .desktop files are Ok, but they just are not absolutely consistent.
October 24, 2022 at 4:40 pm #91324MemberPPC
::@BobC – my “advice”?- You already made life easier for most (newbie) antiX users- keep your script as is (with my localization fix), adding only the check to add geany to the list (if it’s available), add a button to manually launch the old script (keep the script and add -old to it’s name), so users can manually pick an app that is not displayed in your list- unfortunately, as you noticed, there is no real universal standard for .desktop files description…
Can you add a routine to check if antiX base is running and automatically run the commands to correctly access the “WebBrowser” and “Browser” categories, as per https://www.antixforum.com/forums/topic/antix-22-selecting-preferred-applications/#post-91239
Example: check if web-browser.desktop exists, and if so, react accordingly…
Small ramble:
Trust me- I’ am tech minded person, I was an advanced Windows user and used Linux for some 10 years, before coming to antiX, and it still was a pain, learning to deal with .desktop files… Having something that simplifies choosing File Managers, for example, is the best way to tell people to change from rox to ZZZfm- I read many antiX reviews saying something like- “great distro, too bad you have to install a decent FM…”- it’s already there- heck, the zzzfm FT10 adapts is aas fully feature as any FM most people use, with only2 things missing: video thumbnails, that Skidoo (I hope you are doing fine, man! I miss your humor here!) choose to not allow on the default compilation to save system resources, and a way to compress files (I’ll have to add that to the menu, in a future version of FT10, along with better .appimage support)- ZZZfm can have a trash bin, the default favorites, a way to access GDrive (and all other cloud drives., but they have to be manually configured in an “horrible” cli menu), and even explore your network for samba shared files… oh and it has proper Tabs (yeah Windows Explorer, take that!)If you tell newbies- change desktop for a zzz-… one… most will probably think it’s dangerous, messing with the “desktop”! If you say Menu > Control Center > Default apps > File Manager > choose “zzzfm”; click “OK” – most will just say- “wow! easy!” (even if it requires more steps than changing the desktop to a zzz managed one…)
P.
- This reply was modified 6 months, 2 weeks ago by PPC.
- This reply was modified 6 months, 2 weeks ago by PPC.
-
AuthorPosts
- You must be logged in to reply to this topic.


