LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-06-2006, 06:32 PM   #1
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,290

Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
unable to connect to X server


[background]
here's what i did: my old hardrive had a 10 G partition for linux (20 G m$ windoze). I bought a 100 G hardrive to be dedicated to linux. (i initially put fc5 on it - didn't like it so i'm back to rh9). i just wanted the same os i had with more space without having to update any preferences or install existing programs so instead of using the install cd's i booted up the new hd as hdb...

fdisk hdb
delete each (fc5) partition - i just dont like lvm
make a new liux partion for /
make a new partition for /boot
make a new swap partition
mkfs.ext3 hdb1
mkfs.ext3 hdb2
mkswap hdb3
cp -R /boot /mnt/hdb1 (remember to update grub.conf)
cp -R each dir under / to /mnt/hdb2
[/background]

here's where the problem starts:
i forgot to use option -p for cp to preserve mode/owner/permissions so everything had root as owner and group. (it was easy enough to chmod/ chgrp/ chown -R /home/schneidz)

now when i start my pc the graphical login screen doesnt come up and only root can startx. when schneidz does startx i get a grey screen with an x-mouse curser but the desktop doesnt come up.

i did startx >& xlog.txt

and here are the results:

Code:
[schneidz@hyper schneidz]$ cat xlog.txt
/usr/X11R6/bin/startx: line 134: cannot create temp file for here document: Permission denied
/usr/X11R6/bin/startx: line 134: cannot create temp file for here document: Permission denied

_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/hyper:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

X Window System Version 6.8.2
Release Date: 9 February 2005
X Protocol Version 11, Revision 0, Release 6.8.2
Build Operating System: Linux 2.4.20-8 i686 [ELF]
Current Operating System: Linux hyper 2.4.20-31.9 #1 Tue Apr 13 18:04:23 EDT 2004 i686
Build Date: 24 August 2005
        Before reporting problems, check http://wiki.X.Org
        to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Aug  6 17:55:20 2006
(==) Using config file: "/etc/X11/xorg.conf"
(WW) fglrx: No matching Device section for instance (BusID PCI:1:0:1) found
(EE) fglrx(0): === [R200DALSetDisplayConfig] === CWDDC DisplaySetConfig failed: 6
modprobe: Can't locate module fglrx
[drm] failed to load kernel module "fglrx"
(EE) fglrx(0): DRIScreenInit failed!
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Error:            Cannot open "/var/tmp/server-0.xkm" to write keyboard description
>                   Exiting
(EE) Couldn't load XKB keymap, falling back to pre-XKB keymap
Could not init font path element /usr/X11R6/lib/X11/fonts/local/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
AUDIT: Sun Aug  6 17:55:24 2006: 7900 X: client 1 rejected from local host
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified


waiting for X server to begin accepting connections .
AUDIT: Sun Aug  6 17:55:26 2006: 7900 X: client 1 rejected from local host
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

..
AUDIT: Sun Aug  6 17:55:28 2006: 7900 X: client 1 rejected from local host
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

..
AUDIT: Sun Aug  6 17:55:30 2006: 7900 X: client 1 rejected from local host
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

..
giving up.
xinit:  Connection refused (errno 111):  unable to connect to X server
xinit:  No such process (errno 3):  unexpected signal 2.
[schneidz@hyper schneidz]$
does anyone have any ideas how other users can use X short of me doing 'chmod -R 777 /' as root?

thank you so much...
 
Old 08-06-2006, 07:42 PM   #2
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
The X server itself (/usr/X11R6/bin/Xorg on my machine) needs to be suid root. If you didn't specify -p with cp, all of your suid executables (ping, Xorg, su, sudo, and so on) will have their suid bits cleared...

I don't know if this will solve the problem completely, but you should probably chmod u+s /usr/X11R6/bin/Xorg.

Also, /tmp and /var/tmp need to be world writable.
 
Old 08-07-2006, 12:59 AM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,290

Original Poster
Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
thx,

'chmod 777 /tmp and /var/tmp' worked.

i also had to 'chown/ chgrp gdm /var/gdm'

i think i got a recipe for a disk mirroring process.
 
Old 08-07-2006, 01:05 AM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by schneidz
i did startx >& xlog.txt
Just FYI, you didn't need to do that, as there is a server log in /var/log (it's Xorg.0.log usually).
 
Old 08-08-2006, 10:29 AM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,290

Original Poster
Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
not really an 'x' quesiton anymore but my gnome-terminal only brings up a white box with no prompt to enter commands. seems like another perms issue; how can i get it to work properly (works fine for root).

fyi: to get evolution to get past its splash-screen, i had to chown schneidz /tmp/orbit-schneidz (i found that out by doing 'evolution --debug=FILENAME' from gnome-menu-button -> 'run command'

i know that my process isnt ideal and that is why i am getting arbitrary software hiccups but i think if we can get it repeatable we can sourceforge it into something usable for others.
 
Old 08-08-2006, 02:37 PM   #6
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
Does xterm work?
 
Old 08-09-2006, 10:18 AM   #7
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,290

Original Poster
Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
yes xterm works but i prefer gnome-terminal because of the scroll bar.
(not a major issue).
 
Old 08-09-2006, 02:22 PM   #8
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
I was wondering if it might be a device permissions problem, but if other terminals work, I suppose that's not the case. You could use strace to see if and where gnome-terminal is being given permission denied errors:

Code:
strace gnome-terminal 2>&1 | grep EACCES
strace will list system calls used by the specified program (such as open or write) to stderr, including their arguments and any error codes. EACCES happens to be the name of the constant for the permission denied error code. If gnome-terminal can't open a file because of permissions, you'll see a line like:
Code:
open(THE_FILENAME, SOME_OPTIONS)  = -1 EACCES (Permission denied)
Given the current situation, I suppose this might have to be done in xterm...

Last edited by zhangmaike; 08-09-2006 at 02:23 PM.
 
Old 08-18-2006, 10:13 AM   #9
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,290

Original Poster
Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
thanks zhangmaike.

sorry i've been away so i didn't have time to try this.

i just got the latest firefox. (it's a weird download; no install; just extract and install - no ./configure; make; make install)

amways, schneidz isn't able to run it but root can no problem.

i'll post the actual error message when i get home.
 
Old 08-18-2006, 11:30 AM   #10
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,290

Original Poster
Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
Quote:
Originally Posted by schneidz
[background]
here's what i did: my old hardrive had a 10 G partition for linux (20 G m$ windoze). I bought a 100 G hardrive to be dedicated to linux. (i initially put fc5 on it - didn't like it so i'm back to rh9). i just wanted the same os i had with more space without having to update any preferences or install existing programs so instead of using the install cd's i booted up the new hd as hdb...
fyi, i could've used 'dd' to do this.

i love learning of stuff after the fact.
 
Old 08-18-2006, 01:06 PM   #11
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
dd could have been used to image the drive/partition into another file/drive/partition, yes.

Another good thing to remember is to use the -a option of cp rather than only -R. From the cp manpage:
Code:
       -a, --archive
              Preserve  as much as possible of the structure and attributes of
              the original files in the copy (but do  not  preserve  directory
              structure).  Equivalent to -dpPR.
I've used it myself every time I've ever needed to use a bigger drive/partition or when I've decided to try a different filesystem.

What happened with strace?

Last edited by zhangmaike; 08-18-2006 at 01:08 PM.
 
Old 08-19-2006, 02:22 PM   #12
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,290

Original Poster
Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
here is my strace output:

257 lines of this:
Code:
open("/dev/ptmx", O_RDWR)               = -1 EACCES (Permission denied)
open("/dev/ptyp0", O_RDWR)              = -1 EACCES (Permission denied)
open("/dev/ptyp1", O_RDWR)              = -1 EACCES (Permission denied)
open("/dev/ptyp2", O_RDWR)              = -1 EACCES (Permission denied)
open("/dev/ptyp3", O_RDWR)              = -1 EACCES (Permission denied)
...
i fixed it by doing
Code:
 chmod 775 /dev/pt*
thanks.
 
Old 08-19-2006, 02:27 PM   #13
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,290

Original Poster
Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
this is my firefox output:
Code:
[schneidz@hyper schneidz]$  /usr/local/firefox/firefox

/usr/local/firefox/firefox-bin
running...
 
/usr/local/firefox/run-mozilla.sh: line 428:  6401 Segmentation fault      "$prog" ${1+"$@"}
exit code = 139
works ok for root. not sure what the error means (google wasnt very descriptive).

i edited the script to see how far it gets.

i did an strace. here is the output around the segfault:
Code:
access("/home/schneidz/.mozilla/firefox/init.d/S*", X_OK) = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [33], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [33], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [33], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [33], 8) = 0
rt_sigprocmask(SIG_SETMASK, [33], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [33], 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [33], 8) = 0
_llseek(255, -91, [5156], SEEK_CUR)     = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|0x11, <ignored>, <ignored>, 0x4003c0c8) = 6457
rt_sigprocmask(SIG_SETMASK, [33], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [33], 8) = 0
rt_sigprocmask(SIG_SETMASK, [33], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [33], 8) = 0
rt_sigaction(SIGINT, {0x8075dc0, [], SA_RESTORER, 0x420277b8}, {SIG_DFL}, 8) = 0
wait4(-1, /usr/local/firefox/firefox-bin
running...

/usr/local/firefox/run-mozilla.sh: line 428:  6462 Segmentation fault      "$prog" ${1+"$@"}
exit code = 139
[WIFEXITED(s) && WEXITSTATUS(s) == 139], 0, NULL) = 6457
rt_sigprocmask(SIG_SETMASK, [33], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, 0xbfffd934, WNOHANG, NULL)    = -1 ECHILD (No child processes)
sigreturn()                             = ? (mask now [])
rt_sigaction(SIGINT, {SIG_DFL}, {0x8075dc0, [], SA_RESTORER, 0x420277b8}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [33], 8) = 0
read(255, "exitcode=$?\n\n## Stop addon scrip"..., 5247) = 91

thanks

Last edited by schneidz; 08-19-2006 at 02:50 PM.
 
Old 08-19-2006, 03:26 PM   #14
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
A segmentation fault is a memory-related error - the program is trying to access memory it doesn't have rights to (for example, accessing a block of memory that it hasn't allocated, or accessing a block of memory that it allocated but previously freed).

What is on line 428 of your run-mozilla.sh?

Does firefox work for your normal user, if you have it start fresh with no .mozilla directory? Try renaming .mozilla to something like old.mozilla. Firefox will recreate the directory when it is run again.
 
Old 08-20-2006, 12:35 AM   #15
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,290

Original Poster
Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
good idea, i tried deleting .mozilla. when i ran it it created a new one but still seg-faulted.

this is the end of my run-firefox.sh:
Code:
423:if [ $moz_debug -eq 1 ]
424:then
425:	moz_debug_program ${1+"$@"}
426:else
427:	moz_run_program ${1+"$@"}
428:fi
429:
430:exit $exitcode
thanks,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to connect to a server in Chatzilla dr_zayus69 Linux - Software 0 06-18-2005 07:19 AM
Unable to connect to remote server Suresh Chowta Linux - Networking 1 02-13-2005 06:29 AM
CUPS : unable to connect to server lefevre2 Linux - General 1 05-24-2004 03:25 PM
Suddenly unable to connect to my web server and my ftp server. HELP! Silly22 Linux - Software 4 05-23-2004 04:42 PM
unable to connect to server thru vnc... marvc Linux - Software 0 05-25-2003 06:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration