Posts: 4
paius1
Joined: 28 Aug 2015
#1
Using Antix Control Center, I am trying to Set Default Application for"Web Browser" and"Video Player"
I select the firefox.desktop and vlc.desktop from /usr/share/applications.
When I check again both listings show"(None)"
Posts: 1,445
skidoo
Joined: 09 Feb 2012
#2
You found a bug!
For this task, controlCentre launches the bash script"desktop-defaults-set" which apparently requires root permission to function correctly.

Changes will be successfully applied if you launch the script via gExec (Alt+F2) or from a roxterm commandline

gksu /usr/local/bin/desktop-defaults-set

note: After applying changes, if you relauch default-defaults-set to verify the changes have been applied
and unchanged selections are displayed... exit (Cancel) and wait a few seconds, then relaunch.

============

To fix the controlCenter launcher:
gksu geany /usr/local/bin/antixcc.sh
edit @line212 <action>desktop-defaults-set &</action>
change to
<action>gksu desktop-defaults-set &</action>
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#3
well, there is a bug somewhere, however, desktop-defaults is designed to work on the user level. The app is working perfectly fine for me (I set Web Browser to google-chrome and Video Player to vlc without any issue or modifications to scripts).

So something else is likely going on with the OP's setup.
Posts: 1,062
Dave
Joined: 20 Jan 2010
#4
dolphin_oracle wrote:well, there is a bug somewhere, however, desktop-defaults is designed to work on the user level. The app is working perfectly fine for me (I set Web Browser to google-chrome and Video Player to vlc without any issue or modifications to scripts).

So something else is likely going on with the OP's setup.
Right. Likely the directory under .local does not exist. Best off to run from terminal to see what errors are displayed when running as regular user. Then post back whatever the terminal output is.
Posts: 1,445
skidoo
Joined: 09 Feb 2012
#5
My report was specific to the bolded script, below:
/usr/local/bin/desktop-defaults-run
/usr/local/bin/desktop-defaults-set
/usr/share/desktop-defaults

If nothing else, this fn atop the script is wierd. The script doesn't source any other scripts... and I've never noticed an antix script which sets $CANOK env var.

Code: Select all

function checkcancel {
    CANOK="$?";
    if ["$CANOK" !="0" ]; then
    exit;
    fi
}
run from terminal to see what errors are displayed when running as regular user. Then post back whatever the terminal output is.
Hello?
No errors when desktop-defaults-set is run directly (launched via gExec or"run from terminal as regular user").
Error occurs when launched via controlCentre.
FWIW, if antixcc is launched from terminal, then the"Preferred Applications" button is clicked... no error is displayed to terminal.
Last edited by skidoo on 01 Sep 2015, 16:10, edited 1 time in total.
Posts: 4
paius1
Joined: 28 Aug 2015
#6
gksu /usr/local/bin/desktop-defaults-set Solved the problem thank you
Posts: 1,062
Dave
Joined: 20 Jan 2010
#7
skidoo wrote:
run from terminal to see what errors are displayed when running as regular user. Then post back whatever the terminal output is.
Hello?
No errors when desktop-defaults-set is run directly (launched via gExec or"run from terminal as regular user").
Error occurs when launched via controlCentre.
FWIW, if antixcc is launched from terminal, then the"Preferred Applications" button is clicked... no error is displayed to terminal.
No errors as in it is working if run directly? Or no errors and still has the problem when run directly?

Did anything show up under ~/.local/share/desktop-defaults or ~/.local/share/applications to reflect the choices as regular user?