瀏覽代碼

Permissions on mesh desktop notifications

Bob Mottram 8 年之前
父節點
當前提交
4a4a9f84ca
沒有帳戶連結到提交者的電子郵件
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      src/zeronetavahi

+ 1
- 1
src/zeronetavahi 查看文件

@@ -132,7 +132,7 @@ function detect_new_tox_users {
132 132
                     # get the nick of the user
133 133
                     toxuser="$(echo "$line" | awk -F ' ' '{print $1}')"
134 134
 
135
-                    notify-send $"$toxuser" $"has joined the mesh" --icon=dialog-information
135
+                    export DISPLAY=:0.0 && export XAUTHORITY=/home/$MESH_USERNAME/.Xauthority && sudo -u MESH_USERNAME /usr/bin/notify-send $"$toxuser" $"has joined the mesh" --icon=dialog-information
136 136
                 fi
137 137
             fi
138 138
         done < "$CURRENT_USERS_FILE"