WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Xorg.tce ok as /tce but on /tclocal Can't open /var/log/Xorg.0.log message.  (Read 6639 times)

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
I am trying Xorg.tce on /tclocal and it is giving:
Fatal server error:
Can't open /var/log/Xorg.0.log

although it works on /tce.

I tried "sudo chown -R tc:staff /var/log" it fails on next step:

Fatal server error:
xf86EnableTOPorts: failed to set IOPL for I/O (Operation not permitted).

$ cd /usr/local/bin
$ ls -l | grep Xorg
-rwsr-xr-x     1     root   root Xorg

I also tried adding +w to tc and others same error.

I think for using Xorg on /tclocal some thing else needs to be changed.

kagashe
« Last Edit: December 17, 2008, 07:46:46 AM by kagashe »

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Some tce applications apparently don't install everything into /usr/local.  If you install the application you get everything, but if you try to use it with /tclocal you lose whatever was not in /usr/local.  That might have something to do with your trouble, but just guessing.

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Some tce applications apparently don't install everything into /usr/local.  If you install the application you get everything, but if you try to use it with /tclocal you lose whatever was not in /usr/local.  That might have something to do with your trouble, but just guessing.
I can see that /tclocal is a sort of hard disk install and /tclocal is getting mounted at /usr/local. I know that xorg.conf is not present in /tclocal but I have put it in .filetool.lst and it is getting loaded and Xorg is using it (from Xorg.0.log). In addition graphics-2.6.26.tcem is not getting installed on /tclocal and I am installing it on every boot before trying Xorg on /tclocal.

If you look at the error:
Quote
xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted).
It is saying "not permitted" and not saying "not found".

kagashe
« Last Edit: December 17, 2008, 09:20:06 PM by kagashe »

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Attaching Xorg.0.log

kagashe

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Quote
I tried "sudo chown -R tc:staff /var/log" it fails on next step
BTW - I only suggested this as a quick and dirty means to check if Xorg was suid, I was not at all suggesting it as any kind of standard procedure (just in case that was not clear).

Quote
$ cd /usr/local/bin
$ ls -l | grep Xorg
-rwsr-xr-x     1     root   root Xorg
This shows that /usr/local/bin/Xorg is suid, but if the quick and dirty trick above got rid of the Xorg.0.log error then it seems "startx" is using a version of Xorg that is somewhere other than /usr/local/bin and not suid??

If you try this, what do you get:
Code: [Select]
$ which Xorg

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
kagashe,
Did you try the /usr/local approach for graphics modules listed in this thread?

http://forum.tinycorelinux.net/index.php?topic=152.0

They should stay installed after reboot with this method.  I tried it for the graphics-2.6.26.tcem and it works here.

JW

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
If you try this, what do you get:
Code: [Select]
$ which Xorg
/usr/local/bin/Xorg
Even normal Xorg gets installed in /usr/local/bin so how it can be different. Anyway I have checked it.and it is ok.
kagashe,
Did you try the /usr/local approach for graphics modules listed in this thread?

http://forum.tinycorelinux.net/index.php?topic=152.0

They should stay installed after reboot with this method.  I tried it for the graphics-2.6.26.tcem and it works here.

JW

I have done it now and the modules are installed in /usr/local/lib

But I am getting:
Quote
can't open /var/log/Xorg.0.log
inspite of /usr/local/bin/Xorg is suid.

Please note that the partition as a whole is getting mounted at /mnt/hdx (for backup) and again /tclocal which is on same partition is getting mounted at /usr/local

Could it make any difference?

kagashe

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
I have googled for the error:
Quote
xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
and got many pages. One page is DSL Tips and Tricks :: A quick guide on compiling XOrg 7.0 on DSL which looks related to our Xorg.

This is a long page and if you search for the error "xf86EnableIOPorts" on the page you can see the mail.

kagashe

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Just now revisiting this, I felt struck by lightning :p
Pretty sure I know where the fault is.

Could you try to apply this patch to /etc/init.d/tc-config? It's against TC 1.1.
Quote
--- tc-config   2009-02-27 17:34:08.000000000 +0200
+++ tc-config.new   2009-02-27 17:37:30.000000000 +0200
@@ -235,18 +235,18 @@
    wait $fstab_pid
    if [ -n "$LOCAL" ]; then
       LOCAL_DEVICE="${LOCAL%%/*}"
-      mount /mnt/"$LOCAL_DEVICE"
+      mount /mnt/"$LOCAL_DEVICE" -o suid
       if [ "$?" == 0 ]; then
          [ -d /mnt/"$LOCAL_DEVICE"/tclocal ] && mount --bind /mnt/"$LOCAL_DEVICE"/tclocal /usr/local/ && LOCAL_READY=1
-         [ -z "$LOCAL_READY" ] &&  [ -f /mnt/"$LOCAL_DEVICE"/tclocal ] && mount -o loop /mnt/"$LOCAL_DEVICE"/tclocal /usr/local/ && LOCAL_READY=1
+         [ -z "$LOCAL_READY" ] &&  [ -f /mnt/"$LOCAL_DEVICE"/tclocal ] && mount -o loop,suid /mnt/"$LOCAL_DEVICE"/tclocal /usr/local/ && LOCAL_READY=1
          [ -z "$LOCAL_READY" ] &&  mkdir /mnt/"$LOCAL_DEVICE"/tclocal && mount --bind /mnt/"$LOCAL_DEVICE"/tclocal /usr/local/
       fi
    else
       LOCAL_DEVICE="$(autoscan 'tclocal' 'd')"
       if [ -n "$LOCAL_DEVICE" ]; then
-        mount /mnt/"$LOCAL_DEVICE" && mount --bind /mnt/"$LOCAL_DEVICE"/tclocal /usr/local
+        mount /mnt/"$LOCAL_DEVICE" -o suid && mount --bind /mnt/"$LOCAL_DEVICE"/tclocal /usr/local
      else LOCAL_DEVICE="$(autoscan 'tclocal' 'f')"
-        [ -n "$LOCAL_DEVICE" ] && mount /mnt/"$LOCAL_DEVICE" && mount -o loop /mnt/"$LOCAL_DEVICE"/tclocal /usr/local
+        [ -n "$LOCAL_DEVICE" ] && mount /mnt/"$LOCAL_DEVICE" && mount -o loop,suid /mnt/"$LOCAL_DEVICE"/tclocal /usr/local
      fi
    fi
    # Final test for /usr/local mount and call setup routines for libraries, modules, and menu.
Downloadable version:
http://www.ziddu.com/download/3663010/tclocal.patch.gz.html

I think the cause is that by default the SUID bit is not honored, this should force it on with the tclocal mounts.
The only barriers that can stop you are the ones you create yourself.