Novell is now a part of Micro Focus

Run GUI Apps as root

Novell Cool Solutions: Tip

Digg This - Slashdot This

Posted: 3 May 2005

The following tip was pulled from the Novell Support Forums. Visit the forums for help with all of your Novell products. The forums are located at

Question: I downloaded the 30 day trial version of SLES9. The installation went fine but I hit a problem. I am using the default KDE. I log in as a non-root user, open a terminal window, do su to become root. From this window, I try to run any GUI program as root. I always get the error "Can't connect to X server". My DISPLAY environment variable is set to 0.0. I tried setting DIPSLAY=:0.0 but got the same error. If I log in as root, then I can run GUI programs fine. As an example, I could not run /pt/kde3/bin/kate, the GUI text editor. How do I fix this problem?

Answer: Use sux instead of su. sux is a wrapper around the standard su command. sux will transfer all of the X windows credentials to the target user. For more information see

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates