Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#1
Fully updated antiX-15 32bit, full edition.

I've never changed the default apps in this installation until now. Recently, I changed the file manager to rox-filer directly rather than the default. I then changed back.

Somewhere during this process, all of the other apps run with desktop-defaults-run -X no longer work. neither the command from the cli nor the shortcuts in the menu (Web Browser, Terminal, etc...).

Looking at"Preferred Applications", the only choice shown is my choice of file manager. All the other entries say (None).

Manually entering other entries for the apps doesn't"stick".

So I'm wondering what happened?

more info:

Code: Select all

dolphin@antix1:~
$ desktop-defaults-run -t
/home/dolphin/.local/share/desktop-defaults/terminal.desktop is not readable or does not exist

Code: Select all

dolphin@antix1:~/.local/share/desktop-defaults
$ ls
editor.desktop        image-viewer.desktop  web-browser.desktop
file-manager.desktop  terminal.desktop

Code: Select all

dolphin@antix1:~/.local/share/desktop-defaults
$ ll
total 4.0K
lrwxrwxrwx 1 dolphin dolphin 32 Jan 19 08:29 editor.desktop -> /home/applications/geany.desktop
lrwxrwxrwx 1 dolphin dolphin 64 Jan 20 08:04 file-manager.desktop -> /usr/share/applications/antix/desktop-defaults-follow-fm.desktop
lrwxrwxrwx 1 dolphin dolphin 33 Jan 19 08:29 image-viewer.desktop -> /home/applications/mirage.desktop
lrwxrwxrwx 1 dolphin dolphin 34 Jan 19 08:29 terminal.desktop -> /home/applications/roxterm.desktop
lrwxrwxrwx 1 dolphin dolphin 36 Jan 19 08:29 web-browser.desktop -> /home/applications/iceweasel.desktop
those symlinks don't look right to me. I deleted them, and then I was able to assign new default apps with"Preferred Applications" in the control center.
Posts: 1,445
skidoo
Joined: 09 Feb 2012
#2
Hmm, can't find the thread, but seems to me we discussed this issue during antix15 betatesting.
Something along the lines of...
sudo xdg-update-defaults

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://wiki.archlinux.org/index.php/Xdg-open"
linktext was:"https://wiki.archlinux.org/index.php/Xdg-open"
====================================

...doesn't handle everything, or ROX looks elsewhere for default apps list?
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#3
I think there is a problem in desktop-defaults-set . I added some"echo" statements and after the dist-upgrade (and then adding the dev version with the broken links fixed) I get this output for the default apps. The gui window also just shows (none) for the various options. However, I think the output below will give a clue as to why the links don't work after creation, as it looks to me that the path statements are all wrong.


Code: Select all

echo $app_dir
/usr/share/applications/antix /usr/share/applications/arandr.desktop /usr/share/applications/asunder.desktop /usr/share/applications/bleachbit.desktop /usr/share/applications/bleachbit-root.desktop /usr/share/applications/ceni.desktop /usr/share/applications/claws-mail.desktop /usr/share/applications/clipit.desktop /usr/share/applications/dillo.desktop /usr/share/applications/dosbox.desktop /usr/share/applications/feh.desktop /usr/share/applications/flash-player-properties.desktop /usr/share/applications/gcolor2.desktop /usr/share/applications/gdebi.desktop /usr/share/applications/geany.desktop /usr/share/applications/gftp.desktop /usr/share/applications/gksu.desktop /usr/share/applications/gnome-mplayer.desktop /usr/share/applications/gnome-ppp.desktop /usr/share/applications/grsync.desktop /usr/share/applications/grub-customizer.desktop /usr/share/applications/gtkam.desktop /usr/share/applications/guvcview.desktop /usr/share/applications/gweled.desktop /usr/share/applications/hardinfo.desktop /usr/share/applications/hexchat.desktop /usr/share/applications/hplj1020.desktop /usr/share/applications/htop.desktop /usr/share/applications/iceweasel.desktop /usr/share/applications/leafpad.desktop /usr/share/applications/libreoffice-calc.desktop /usr/share/applications/libreoffice-draw.desktop /usr/share/applications/libreoffice-impress.desktop /usr/share/applications/libreoffice-math.desktop /usr/share/applications/libreoffice-startcenter.desktop /usr/share/applications/libreoffice-writer.desktop /usr/share/applications/libreoffice-xsltfilter.desktop /usr/share/applications/links2.desktop /usr/share/applications/luckybackup.desktop /usr/share/applications/luckybackup-gnome-su.desktop /usr/share/applications/lxappearance.desktop /usr/share/applications/mc.desktop /usr/share/applications/mimeinfo.cache /usr/share/applications/mirage.desktop /usr/share/applications/mpv.desktop /usr/share/applications/mtpaint.desktop /usr/share/applications/mupdf.desktop /usr/share/applications/ndisgtk.desktop /usr/share/applications/njam.desktop /usr/share/applications/org.gnome.FileRoller.desktop /usr/share/applications/pybootchartgui.desktop /usr/share/applications/python2.7.desktop /usr/share/applications/python3.4.desktop /usr/share/applications/roxterm.desktop /usr/share/applications/rxvt-unicode.desktop /usr/share/applications/searchmonkey.desktop /usr/share/applications/simple-scan.desktop /usr/share/applications/smtube.desktop /usr/share/applications/spacefm.desktop /usr/share/applications/spacefm-find.desktop /usr/share/applications/spacefm-folder-handler.desktop /usr/share/applications/streamtuner2.desktop /usr/share/applications/system-config-printer.desktop /usr/share/applications/Ted.desktop /usr/share/applications/transmission-gtk.desktop /usr/share/applications/umts-panel.desktop /usr/share/applications/unetbootin.desktop /usr/share/applications/vim.desktop /usr/share/applications/wicd.desktop /usr/share/applications/winff.desktop /usr/share/applications/wpa_gui.desktop /usr/share/applications/xarchiver.desktop /usr/share/applications/xfburn.desktop /usr/share/applications/xmahjongg.desktop /usr/share/applications/xpdf.desktop

echo $file_manager
../applications/antix/desktop-defaults-follow-fm.desktop
echo $terminal
../applications/roxterm.desktop
echo $email
../applications/claws-mail.desktop
echo $text_editor
../applications/geany.desktop
echo $web_browser
../applications/iceweasel.desktop
echo $image_viewer
../applications/mirage.desktop
echo $video_player
../applications/gnome-mplayer.desktop
echo $audio_player
../applications/antix/xmms.desktop
echo $Desktop_Prefix
/usr/share/desktop-defaults/

links you set manually will work, but the other defaults will be set to links pointing to /home/applications/...

and since $app_dir is so crazy, opening to select a link also defaults to /home (not even /home/user, just /home)
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#4
interesting...you also get this crazy output if you run off the iso without the dist-upgrade, except that you get full path names for the default apps and the apps show up in the gui window.

Code: Select all

echo $app_dir
/usr/share/applications/antix /usr/share/applications/arandr.desktop /usr/share/applications/asunder.desktop /usr/share/applications/bleachbit.desktop /usr/share/applications/bleachbit-root.desktop /usr/share/applications/ceni.desktop /usr/share/applications/claws-mail.desktop /usr/share/applications/clipit.desktop /usr/share/applications/dillo.desktop /usr/share/applications/dosbox.desktop /usr/share/applications/feh.desktop /usr/share/applications/flash-player-properties.desktop /usr/share/applications/gcolor2.desktop /usr/share/applications/gdebi.desktop /usr/share/applications/geany.desktop /usr/share/applications/gftp.desktop /usr/share/applications/gksu.desktop /usr/share/applications/gnome-mplayer.desktop /usr/share/applications/gnome-ppp.desktop /usr/share/applications/grsync.desktop /usr/share/applications/grub-customizer.desktop /usr/share/applications/gtkam.desktop /usr/share/applications/guvcview.desktop /usr/share/applications/gweled.desktop /usr/share/applications/hardinfo.desktop /usr/share/applications/hexchat.desktop /usr/share/applications/hplj1020.desktop /usr/share/applications/htop.desktop /usr/share/applications/iceweasel.desktop /usr/share/applications/leafpad.desktop /usr/share/applications/libreoffice-calc.desktop /usr/share/applications/libreoffice-draw.desktop /usr/share/applications/libreoffice-impress.desktop /usr/share/applications/libreoffice-math.desktop /usr/share/applications/libreoffice-startcenter.desktop /usr/share/applications/libreoffice-writer.desktop /usr/share/applications/libreoffice-xsltfilter.desktop /usr/share/applications/links2.desktop /usr/share/applications/luckybackup.desktop /usr/share/applications/luckybackup-gnome-su.desktop /usr/share/applications/lxappearance.desktop /usr/share/applications/mc.desktop /usr/share/applications/mimeinfo.cache /usr/share/applications/mirage.desktop /usr/share/applications/mpv.desktop /usr/share/applications/mtpaint.desktop /usr/share/applications/mupdf.desktop /usr/share/applications/ndisgtk.desktop /usr/share/applications/njam.desktop /usr/share/applications/org.gnome.FileRoller.desktop /usr/share/applications/pybootchartgui.desktop /usr/share/applications/python2.7.desktop /usr/share/applications/python3.4.desktop /usr/share/applications/roxterm.desktop /usr/share/applications/rxvt-unicode.desktop /usr/share/applications/searchmonkey.desktop /usr/share/applications/simple-scan.desktop /usr/share/applications/smtube.desktop /usr/share/applications/spacefm.desktop /usr/share/applications/spacefm-find.desktop /usr/share/applications/spacefm-folder-handler.desktop /usr/share/applications/streamtuner2.desktop /usr/share/applications/system-config-printer.desktop /usr/share/applications/Ted.desktop /usr/share/applications/transmission-gtk.desktop /usr/share/applications/umts-panel.desktop /usr/share/applications/unetbootin.desktop /usr/share/applications/vim.desktop /usr/share/applications/wicd.desktop /usr/share/applications/winff.desktop /usr/share/applications/wpa_gui.desktop /usr/share/applications/xarchiver.desktop /usr/share/applications/xfburn.desktop /usr/share/applications/xmahjongg.desktop /usr/share/applications/xpdf.desktop

echo $file_manager
/usr/share/applications/antix/desktop-defaults-follow-fm.desktop
setting a non-default app does lead to creation of symlink desktop files in ~/.local/share/desktop-defaults/, but they actually work and point to the correct paths.
Posts: 3
v3g4n
Joined: 17 Jan 2016
#5
I too have noticed my preferred applications have been cleared out. Also the desktop launcher for file manager does not work along with the four launchers above personal menu in icewm.
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#6
more information:

I believe the root cause of the desktop-defaults issue is that the links made in /usr/share/desktop-defaults in the updated desktop-session package are relative links from the working directory, and the links on the virgin iso are absolute full path links.


looks like if you make a custom link, then all the symlinks try to get created in a nonexisting /home/applications (one level up from the users home folder, which I assume is caused by the".." in the file paths.

the whole process could be simplified by getting rid of the links in /usr/share/desktop-defaults and just using a default set in the user's home folder in the first place. this of course would apply to antiX 16, not 15.


that app_dir line is still screwy though.
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#7
I manually recreated the symlinks in /usr/share/desktop-defaults/ to point to full-path-names instead of the relative-path-name and functionality of desktop-defaults-set was restored.

as to the app-dir variable, perhaps removing the wildcard * from the $app-dir definition line would be a good thing.
Posts: 3
v3g4n
Joined: 17 Jan 2016
#8
Thanks d_o. When I get home I will make these symlinks and it looks like all will be well. __{{emoticon}}__
Posts: 1,062
Dave
Joined: 20 Jan 2010
#9
D.O.,
Could you try the version of desktop-defaults-run from here:

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://github.com/antiX-Linux/desktop-defaults"
linktext was:"https://github.com/antiX-Linux/desktop-defaults"
====================================


I made it test to see if it is running itself before actually running the contents of the Exec line.
If it is itself display an error, if not then run the program.

As to using only the ones in the user dir.
If they are not found there... How should it be handled
1) leave the default applications blank
2) copy from the copy in / etc/skel (or /usr/share/desktop-defaults/ for antiX-15)

EDIT/NOTE:
The double starting of specified folders when file manager is in follow mode should also be fixed now.
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#10
Dave wrote:D.O.,
Could you try the version of desktop-defaults-run from here:

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://github.com/antiX-Linux/desktop-defaults"
linktext was:"https://github.com/antiX-Linux/desktop-defaults"
====================================


I made it test to see if it is running itself before actually running the contents of the Exec line.
If it is itself display an error, if not then run the program.

As to using only the ones in the user dir.
If they are not found there... How should it be handled
1) leave the default applications blank
2) copy from the copy in / etc/skel (or /usr/share/desktop-defaults/ for antiX-15)

EDIT/NOTE:
The double starting of specified folders when file manager is in follow mode should also be fixed now.
1. double-launching of file windows is fixed.
2. infinite loop check works as intended.


Link Locations.

comments

1. Its not really a problem as is as long as the links that are copied in work. A lot of my comments were before I discovered the links were not correctly created in 2.6

2. After going over your script, I now know that you are using the defaults in /usr/share/desktop-defaults/ when the user has not made a choice of their own. I don't see a problem with this really as it stands.

3. My comments about only having one set of links : I was thinking that there would be a predefined set in / etc/skel and in the default demo account. This would eliminate the need for the check for defaults in desktop-defaults-set, allowing a simplier filling of the fields pulling only from the user folder. Again, all this was when I thought the script had a problem, and not the default set of links. The current system already deals with the possibility of removed links from the user folder.

However, the current system does not check for the links, but rather presence of the directory in ~/.local/usr/share/desktop-defaults. it is still possible to break the links by deleting the links there but not the folder. For instance, removing the user version of the web-browser.desktop file will not reset to the default from the end-user perspective (selecting Web Browser from the menu will lead to nothing happening). How likely that scenario is a matter of speculation. And the user can still use"Preferred Applications" to set a new web-browser link.
Posts: 1,445
skidoo
Joined: 09 Feb 2012
#11
a related quirk:

Default apps set via spacefm cause problems with xdg-open

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://github.com/IgnorantGuru/spacefm/issues/618"
linktext was:"https://github.com/IgnorantGuru/spacefm/issues/618"
====================================
Posts: 12
oneleaf
Joined: 27 Jan 2016
#12
Yea, this happened to me after I changed one of the preferred applications (from Iceweasel to Chromium). After that, it disabled all other preferred applications and any attempt to change them does not stick.
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#13
oneleaf wrote:Yea, this happened to me after I changed one of the preferred applications (from Iceweasel to Chromium). After that, it disabled all other preferred applications and any attempt to change them does not stick.
changing them should still work as long as you change ALL of them.
Posts: 12
oneleaf
Joined: 27 Jan 2016
#14
dolphin_oracle wrote:
oneleaf wrote:Yea, this happened to me after I changed one of the preferred applications (from Iceweasel to Chromium). After that, it disabled all other preferred applications and any attempt to change them does not stick.
changing them should still work as long as you change ALL of them.
I got them to stick except for text editor, terminal, and file manager which are still showing as none.
Posts: 12
oneleaf
Joined: 27 Jan 2016
#15
dolphin_oracle wrote:I manually recreated the symlinks in /usr/share/desktop-defaults/ to point to full-path-names instead of the relative-path-name and functionality of desktop-defaults-set was restored.

as to the app-dir variable, perhaps removing the wildcard * from the $app-dir definition line would be a good thing.
Hmm, I just tried this and it still does not work. I cannot get Terminal, File Manager, Text Editor, or Image Viewer to stick.

Here is the output of the before/after screenshots of the symlinks. Did I edit it correctly?