diff --git a/easyos/easy-code/rootfs-skeleton/usr/local/bin/xdg-open b/easyos/easy-code/rootfs-skeleton/usr/local/bin/xdg-open index 88dd318e..352de65f 100755 --- a/easyos/easy-code/rootfs-skeleton/usr/local/bin/xdg-open +++ b/easyos/easy-code/rootfs-skeleton/usr/local/bin/xdg-open @@ -3,6 +3,7 @@ #110115 xdg-open used to be a symlink to defaulthandler. #20220916 if running as a non-root client, restrict access to other apps. ref: /usr/local/clients/setup-client #20221023 may be running as zeus super-user. +#20230511 allow non-root app to open folder with rox. WHOIAM="$(whoami)" if [ "$WHOIAM" != "root" -a "$WHOIAM" != "zeus" ];then #20220916 20221023 @@ -10,12 +11,22 @@ if [ "$WHOIAM" != "root" -a "$WHOIAM" != "zeus" ];then #20220916 20221023 if [ $? -eq 0 ];then #whatever has called here is running as non-root client. case "$1" in + file://*) #20230511 + exec rox -U "$1" + ;; *://*) if [ -d /home/${WHOIAM}/.mozbare ];then #app is allowed to run this html viewer. + #ref: variable TEMPLATE_ACCESS_MOZBARE, script setup-client exec mozbare "$1" fi ;; + *@*.*) #20230511 + true + ;; + *) #20230511 + exec rox "$1" + ;; esac exit fi