Archive

Posts Tagged ‘X’

Accessing a User’s X Session as Root

February 16th, 2010 No comments

This is a very simple thing, but it seems not widely known.

You login to, or start, X as a regular user as you rightly should, but you want to be able to su to root and then run a GUI application as root.

There are a number of ways to do this, some better than others, including using “kdesu”, “xhost” etc; the simplest however is:

# xauth merge ~xuser/.Xauthority
# export DISPLAY=:0.0

… where xuser is the user you are running X as. The export line may not be required depending on how you became root.

The root shell you are in now has full authority to communicate with and manipulate X.

Categories: Linux, Miscellaneous Tags: , , ,

If your keyboard and mouse are not working in X in Slackware 13…

September 22nd, 2009 4 comments

At least once a week I see someone with this issue.

With reference to my earlier post about Xorg + Hal, by default, Xorg in Slackware 13 gets its hardware information from hald instead of an xorg.conf file. If you have no xorg.conf file and hald is not running, your keyboard and mouse will not work when you start X.

  • The Cause: You disabled or broke hal.
  • The Solution: Darwinist Determinism.

Failing the first solution:

chmod a+x /etc/rc.d/rc.hald
/etc/rc.d/rc.hald start

Then restart X or reboot (probably easier to just reboot and it clears any anomalies).

If it still doesn’t work, check that your /etc/rc.d/rc.hald script is not empty (I don’t know how he did it, but I did see someone who’d zeroed his script during an upgrade).

If it still doesn’t work, then you probably actually have a problem rather than just a failure on your part and it’s time to go searching for likely causes. Best place to start would be to google your specific hardware in relation to hal.

Categories: Linux, Slackware Tags: , , , , , ,