WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Can't run Xorg as user tc  (Read 5741 times)

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Can't run Xorg as user tc
« on: February 26, 2009, 10:23:13 PM »
I seem to have broken something again.
Using PPI system.
Installed Xorg, graphics-2.6.26, nvidia, and apparently all dependencies for these.
Xorg was extracted into /usr/local, graphics and nvidia are being loaded from tce directory.
bootlocal.sh creates /var/lib/xkb and /etc/X11 directories
I can startx as root, but nvidia doesn't seem to work (no splash, no acceleration).
When trying startx as tc, I get messages about not being able to connect to 0:0

After searching the forum, I see threads concerning Xorg.log, but this is not the issue here.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Can't run Xorg as user tc
« Reply #1 on: February 27, 2009, 12:13:24 AM »
Is it that xorg needs to be suid root?

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: Can't run Xorg as user tc
« Reply #2 on: February 27, 2009, 06:52:51 AM »
That was the first thing I checked (and forgot to mention).
Also forgot to mention that Xorg did not produce any errors.  The errors I received were from applications meant to start from .xsession.  They couldn't open the display.  It is set up so that after the window manager closes, X closes.  At this point I can't be sure if X would eventually load if given more time, but it takes a few seconds between each command so I'm guessing not.  I'll try that out, though.

The only other thing I can think of at the moment that is not typical is that I'm using getty instead of rungetty (manual login with password) I'm not sure if this would have any effect.

I've been on cold medicine the last two days, so that's likely making it more difficult to think properly =o)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Can't run Xorg as user tc
« Reply #3 on: February 27, 2009, 07:17:08 AM »
I think it's because you started it as root first, and so .Xauthority is only root-writable, and thus user tc can't overwrite it. (HOME is set to /home/$USER as root too)
The only barriers that can stop you are the ones you create yourself.

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: Can't run Xorg as user tc
« Reply #4 on: February 27, 2009, 07:49:31 AM »
I didn't first start it as root.  It failed as tc, then I tried "sudo startx" (tc's environment), which worked but had no hardware acceleration. I then deleted .Xauthority and tried again as tc using "nv" and it failed again.  My current .Xauthority file is owned by tc.  I did try once while logged in as root (root's environment) and it tried to use Xvesa instead of Xorg.  For some reason I can't remember what the result of that was.

I wonder if using a startx script from Xorg would produce better results.  I can't see why it would, but it might be worth a try.

I'm in DSL at the moment, but I'll be getting back to TC shortly.  I'm taking garlic for my cold now instead of medicine, so my head's not as cloudy =o)

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: Can't run Xorg as user tc
« Reply #5 on: February 27, 2009, 09:16:13 AM »
Just found something I'd overlooked.  When using Xvesa I had redirected stdout and stderr to a file.  I was still doing that with Xorg, so I didn't see the error.  It is in fact the "can't open Xorg.0.log" message, so I have to go find those threads and learn something =o)

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: Can't run Xorg as user tc
« Reply #6 on: February 27, 2009, 09:31:12 AM »
Most of what I see relates to Xorg not being +s, but after checking it a third time I see that it is.
This thread:  http://forum.tinycorelinux.net/index.php?topic=131.0 has Juanito suggesting to manually load some modules, so I'll try that next.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Can't run Xorg as user tc
« Reply #7 on: February 27, 2009, 10:26:59 AM »
What are the permissions of /var/log and /var/log/Xorg.0.log?

edit. Could you too try this:
http://forum.tinycorelinux.net/index.php?topic=259.new#new
« Last Edit: February 27, 2009, 10:43:28 AM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: Can't run Xorg as user tc
« Reply #8 on: February 27, 2009, 03:17:38 PM »
When I temporarily changed permissions of /var/log (not something I wanted to do), it got further but then failed trying to open the VT.  The resulting log file was created by tc:staff.
I looked at your other post, and it seems like it could work.  Although the file itself is suid, it does not currently run as root.
My present workaround is to run it from .xsession with "sudo /usr/local/bin/Xorg...".  I'm not sure if this is a bad idea, but it seems to work.  Xorg itself runs as root, and X apps run as tc.

Unfortunately one of the reasons why I wanted to get Xorg+nvidia running is so I could play Unreal Tournament in TC (more ram available than in Debian), but apparently it is not compatible with something in TC...I messed around with it for a long time and couldn't get it going at more than about 0.05 fps.  UT2004 seems to be compatible, but my machine is not powerful enough to enjoy it.

But on the plus side, MPlayer will run fullscreen, Blender runs much more smoothly , and hopefully I'll be able to get my wacom working in TC one of these days.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Can't run Xorg as user tc
« Reply #9 on: March 02, 2009, 12:39:58 AM »
I've ran into (all of) these problems before when building XOrg on DSL but never found the cause.  It had these errors when I had the install dir symlinked to my root fs, but worked fine when loaded as an (uci) extension.