# Running Xorg without SUID



## freemason (Sep 3, 2012)

Is it possible in FreeBSD to execute Xserver without root privileges?

I compile latest Xorg without "SUID" option and kernel is GENERIC 9-STABLE.

After I launch xinit as regular non-root user it gives the following *Fatal server error*:

```
xf86OpenConsole: Server must be suid root
```

xserverrc:

```
exec /usr/local/bin/X -logfile ~/Xorg.log -nolisten tcp
```
Xorg-server works like a charm with root account, but it's not a good practice to run as root and I want to make it run by unprivileged user.


----------



## expl (Sep 3, 2012)

I believe Xorg needs access to /dev/mem if I am not mistaken and that pretty much leaves you with the root access need.


----------



## SirDice (Sep 11, 2012)

freemason said:
			
		

> But why has it gone from ports?


Because it was part of the non-modular pre 7.x versions.


----------



## SirDice (Sep 11, 2012)

Yes, install it with SUID on.


----------

