start a program in it's own x session?

I’ve been trying to run a program on it’s own virtual display without a window manager.
It’s been forever since tried to do this-- I used to do it on AIX all the time. The syntax used to be something like

xhost +;export DISPLAY=8;xinit -- :8 command

Not working anymore. X seems to have changed so much over the past few years. I’m getting the error:

(EE) Cannot open log file “/var/log/Xorg.8.log”

Do I need to change the permissions in /var/log to let a user write to it?

Well, /var/log/ can indeed only be written to by root. So if you want to start Xorg as a user, you have to allow that user to write to /var/log/.
Or, probably better, specify a different location for the logfile via the “-logfile” option.

I haven’t ever tried to do something like you want to though, so I have no idea whether it will work then…

You probably would have to make /usr/bin/Xorg suid root (which would also “fix” the logfile problem), see /etc/permissions.local.

I tried editing /etc/permissions.local and adding a logfile, but neither of these approaches worked.

xinit -logfile resulted in a different error at least.

246.221] (EE) xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)

You can no longer launch X as a normal user, this would work:


sudo xinit /usr/bin/xeyes -- :10

:slight_smile: (if you don’t have xeyes installed, shame on you! :3 )

Did you run “chkstat” (as root) afterwards? This is needed to actually apply the changes.

But please note, that making Xorg suid root is considered a security risk. Normally it is not necessary either, as Xorg is started by the display manager (login screen).

that sort of works, but since I’m running the program as root, don’t have access to the files, directories, and permissions of the normal user.

I guess the answer is that you can’t do this anymore.

Hi
Use Xnest?

Open a terminal;


Xnest :10

Open another terminal and run;


xterm -display :10

Xnest has many options, a peruse on the internet for examples, or man page should get you where you want to be…

It will probably work when Xorg is suid root then.

But again, you have to run “chkstat” after you editied /etc/permissions.local for the changes being applied.

Xorg suid is a really bad idea. Imagine what would happen if a normal user ran X with -logfile pointing to something interesting, like say, I don’t know - /dev/sda.

Bad things will happen :slight_smile:

Hi
There is a small text mode window environment in my Misc repo called ‘twin’ that fires up on the desktop in it’s own virtual world…?

http://thumbnails110.imagebam.com/38866/c30243388650790.jpg](http://www.imagebam.com/image/c30243388650790)

Oh well. There are plenty of other ways to destroy your system.

As I said, having Xorg suid root is considered a security risk, that’s why it isn’t any more since years.
But being able to overwrite your file system or partition table with the Xorg logfile is definitely not the reason for that change I suppose…:stuck_out_tongue: