Skip to content

Commit

Permalink
xdg-open: Show Folder fix for chromium
Browse files Browse the repository at this point in the history
  • Loading branch information
bkauler committed May 11, 2023
1 parent ad04a6a commit af4199d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions easyos/easy-code/rootfs-skeleton/usr/local/bin/xdg-open
Expand Up @@ -3,19 +3,30 @@
#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
grep -q "^${WHOIAM}=true" /root/.clients-status
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
Expand Down

0 comments on commit af4199d

Please sign in to comment.