reading /proc/$PID/environ returns Permission Denied
I am trying to export DBUS_SESSION_
Here is the relevant snippet of shell script code that I am using to attempt to export DBUS_SESSION_
pid_gnome=$(pgrep gnome-session | head -1)
DBUS_SESSION_
export DBUS_SESSION_
I get this error:
grep /proc/$PID/environ PERMISSION DENIED
If I manually try to cat /proc/$PID/environ, I also get permission denied. If I use sudo it works.
Did something change regarding the permissions for gnome-session environ recently?
If so, how can I export the DBUS_SESSION_
Thanks.
Edit: I have managed to get the script running again by setting the DISPLAY variable to DISPLAY=:1
I am confused as to why my DISPLAY is :1 and not :0, but no complaints here and that isn't the topic of the question.
My question still stands because I'm curious about how to export the DBUS_SESSION_
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Snap Deus for more information if necessary.