error: XDG_RUNTIME_DIR not set in the environment.

  • 1
  • Problem
  • Updated 3 years ago
Following directions to setup a scheduled reboot in Ubuntu (14.04 latest Chrome)
https://help.risevision.com/user/advanced/display/chrome-player-linux

And I get this error trying to Disable Apport and setup the scheduled reboot.

error: XDG_RUNTIME_DIR not set in the environment.

Anybody else run into this and know a solution?

Photo of KrayMitchell

KrayMitchell

  • 776 Points 500 badge 2x thumb
  • confused

Posted 3 years ago

  • 1
Photo of Matthew Fisher

Matthew Fisher

  • 1,420 Points 1k badge 2x thumb
Official Response
Kray,

This is a problem that can occur (sometimes) when elevating privileges and running a GUI application (e.g. gedit).
See here:  https://bugs.launchpad.net/ubuntu/+source/pam-xdg-support/+bug/1330154

They suggest running "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY gedit" instead of "sudo gedit",
but I can't verify that because I'm unable to replicate the problem it is trying to solve.

Thanks,

Matthew