Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 20982 - xfree86 fails to load alternative config using an alias as regular user
Summary: xfree86 fails to load alternative config using an alias as regular user
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-13 20:44 UTC by Christopher Rude
Modified: 2003-07-04 00:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Rude 2003-05-13 20:44:17 UTC
I have in /etc/profiles: 
 
alias tv="startx -- -xf86config '/etc/X11/XF86ConfigTV'" 
alias noaccelx="startx -- -xf86config '/etc/X11/XF86Config.noaccel'" 
 
when I type tv, my system loads enabling my svideo out on my nvidia card using Nvidia drivers 
and when I type noaccelx I load the free nv xserver. I have had this config working since I 
bought the card last june (or july).  
 
recently this no longer works as a regular user (I employ the dont use x s root rule) I am not 
sure exactly when it stopped working given I only start x with the alias on rare occasion, but am 
sure that it did work with 4.3. When logged in as root it does work as expected just not as 
regular user. 
 
$ tv (or noaccelx) 
Using authority file /home/phlashback/.Xauthority 
Writing authority file /home/phlasback/.Xauthority 
 
Fatal server error: 
 
Invalid argument for -xf86config 
	For non-root users, the file specified with -xf86config must be 
	a relative path and must not contain any ".." elements. 
	Using default XF86Config search path. 
 
 
When reporting a problem related to a server crash, please send  
the full server output, not just the last messages. 
Please report problems to xfree86@xfree86.org 
 
giving up. 
xinit: No such file or directory (errno2): Unable to connect to X server 
xinit: No such process (errno3): server error. 
$cd /etc/X11 
$startx -- -xconfig 'XF86ConfigTV' (as regular user it works) 
$startx -- -xconfig 'XF86Config.noaccel' (also works as normal user) 
 
Any Ideas as to what has happed... like I said, alias's work when being executed by root, but 
not a regular user, and if (and only if) i change to /etc/X11 first then I can startx (not through 
aliases) in all the modes  want to.. but If I specify a path as a regular user i get the above error 
 
Thanks 
 
 

Reproducible: Always
Steps to Reproduce:
1.type tv or noaccelx as anything but root 
2. 
3. 
Actual Results:  
x does not start 

Expected Results:  
load x the proper way based on alias 

phlashback@phlashback phlashback $ emerge info 
  Portage 2.0.48_pre6 (default-x86-1.4, gcc-3.2.2, glibc-2.3.2-r1) 
================================================================= 
System uname: 2.4.20-gentoo-r5 i686 AMD Athlon(tm) MP 1900+ 
GENTOO_MIRRORS="http://www.ibiblio.org/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo 
http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ 
ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://mirror.iawnet.sandia.gov/pub/gentoo/ 
ftp://ftp.ussg.iu.edu/pub/linux/gentoo " 
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config 
/usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/ 
/usr/share/texmf/tex/platex/config/ /usr/share/config" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" 
PORTDIR="/usr/portage" 
DISTDIR="/usr/portage/distfiles" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR_OVERLAY="/usr/local/portage" 
USE="x86 apm zlib berkdb cjk ntpl mmx 3dnow sse nvidia pda gphoto2 cups slp X dga opengl 
xv fbcon -directfb kde qt qtmt arts gtk -gnome -bonobo -evo -gb -gtkhtml motif tcltk aalib imlib 
ncurses readline sdl svga lcms gif jpeg png tiff avi mpeg quicktime alsa -esd mikmod oss nas 
ggi dvd xmms oggvorbis flash encode snmp pam ssl crypt imap ldap tcpd xface mozilla spell 
truetype xml xml2 pdflib tetex guile java perl python ruby slang libwww libg++ atlas pic mysql 
odbc innodb qd gdbm samba nls doc gpm cdr usb wmf threads" 
COMPILER="gcc3" 
CHOST="i686-pc-linux-gnu" 
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" 
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" 
ACCEPT_KEYWORDS="x86 ~x86" 
MAKEOPTS="-j3" 
AUTOCLEAN="yes" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
FEATURES="sandbox ccache"
Comment 1 John Davis (zhen) (RETIRED) gentoo-dev 2003-06-16 10:37:32 UTC
wrong category
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2003-06-19 04:51:01 UTC
it might be because X is no longer installed setuid -- instead 4.3.0 makes use of the X wrapper.
Comment 3 Christopher Rude 2003-06-19 07:41:12 UTC
any suggestions as  to how to make this work....... 
 
should I right a script that moves config files back and forth, make a change to the wrapper 
(if so the what do I make changes to ;) 
 
Thanks in advance for any suggestions 
Chris 
Comment 4 Rodger Etz-Brown 2003-06-20 07:13:21 UTC
The error you are getting suggests that you might be calling the -xf86config option with the wrong argument. This option expects a relative path to the config file if you are not root (which you do not want to be when running X).

The path in your alias is absolute.

To see if this is it, try the following:

as root (or plashback if he can access it):
# cp /etc/X11/XF86ConfigTV /home/phlashback/
(make sure the user can access the new file)

as phlashback:
# cd
# alias tv="startx -- -xfconfig './XF86ConfigTV'"
# tv

Does it work? If so you know what the problem is. But it really makes it a bit awkward to start with different configs. You could script this (Shell, Perl, Python or whatever flavor people eat these days)
Comment 5 Christopher Rude 2003-06-20 14:35:12 UTC
Rodger, 
 
ok... now I feel like a complete idiot ;) 
 
I followed your instructions, and they worked. So then I said what the hell, and took the 
path completly out of the alias, and trusted x to figure whater to look. Guess what..... It 
worked to. Now my alias's look like: 
 
alias tv="startx -- -xf86config 'XF86ConfigTV'"  
alias noaccelx="startx -- -xf86config 'XF86Config.noaccel'" 
 
And the problem is now gone. 
 
Now the mistery: (disclamer I operate on two modes... document everything, and document 
nothing) When I first set the system up I documented everything, and sifting through notes 
I found that the reason I had the path was because it was the only way to make it work 
(using an alias of course ;) . So the mystery is.... what changed that caused it to work one way 
but not the other, and now back again..... 
 
At any rate, non of that is really importaint, the fact is my puter works as it should again 
with no need to script thanks to the mighty profile 8~). 
 
Thank you 
Chris 
Comment 6 Seemant Kulleen (RETIRED) gentoo-dev 2003-07-04 00:32:32 UTC
thanks Rodger.  closing report.