Index: grub-customizer-5.1.0/src/main/client.cpp =================================================================== --- grub-customizer-5.1.0/src/main/client.cpp +++ grub-customizer-5.1.0/src/main/client.cpp 2019-01-16 13:45:02.158030742 +0100 @@ -64,7 +64,7 @@ } if (getuid() != 0 && (argc == 1 || argv[1] != std::string("no-fork"))) { - return system((std::string("xhost +SI:localuser:root; pkexec ") + argv[0] + (argc == 2 ? std::string(" ") + argv[1] : "") + " no-fork; xhost -SI:localuser:root").c_str()); + return system((std::string("pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY ") + argv[0] + (argc == 2 ? std::string(" ") + argv[1] : "") + " no-fork").c_str()); } setlocale(LC_ALL, ""); bindtextdomain("grub-customizer", LOCALEDIR);