All Forums |
Register |
Login |
Search |
Subscriptions |
My Profile |
Inbox |
Tool Warehouse |
FAQs |
Resources |
Help |
Member List |
Address Book |
Logout |
|
|
Only root wants to run xdm?
|
Logged in as: Guest |
Users viewing this topic: none |
|
Login  |
|
|
Only root wants to run xdm? - Feb. 3, '04, 9:40:28 AM
|
|
|
suchunghou
Posts: 24
Joined: Feb. 3, '04,
Status: offline
|
Even when i login as Administrator, xdm gives me the message:
Only root wants to run xdm
Any ideas?
|
|
|
RE: Only root wants to run xdm? - Feb. 3, '04, 3:20:22 PM
|
|
|
markfunk
Posts: 673
Joined: Mar. 31, '03,
Status: offline
|
yup. My guess is that Microsoft compiled xdm but did not " port" it to the Interix environment. Looks like they didn' t test it to see if it worked before shipping it.
You can work around this " problem" by specifying " xdm -debug 1" .
Or you can get the source code for X11R6' s xdm and fix the place where it does " if (debugLevel == 0 && getuid() != 0)" in dm.c.
One possibility would be to change " getuid() != 0" to " !__isroot(getuid())
|
|
|
RE: Only root wants to run xdm? - Feb. 4, '04, 11:16:02 AM
|
|
|
suchunghou
Posts: 24
Joined: Feb. 3, '04,
Status: offline
|
hi mark, here is the output of " xdm -debug 1"
DisplayManager.errorLogFile/DisplayManager.ErrorLogFile value /usr/X11R6/lib/X11/xdm/xdm-errors
DisplayManager.daemonMode/DisplayManager.DaemonMode value true
DisplayManager.pidFile/DisplayManager.PidFile value /usr/X11R6/lib/X11/xdm/xdm-pid
DisplayManager.lockPidFile/DisplayManager.LockPidFile value true
DisplayManager.authDir/DisplayManager.authDir value /usr/X11R6/lib/X11/xdm
DisplayManager.autoRescan/DisplayManager.AutoRescan value true
DisplayManager.removeDomainname/DisplayManager.RemoveDomainname value true
DisplayManager.keyFile/DisplayManager.KeyFile value /usr/X11R6/lib/X11/xdm/xdm-keys
DisplayManager.accessFile/DisplayManager.AccessFile value /usr/X11R6/lib/X11/xdm/Xaccess
DisplayManager.exportList/DisplayManager.ExportList value
DisplayManager.randomFile/DisplayManager.RandomFile value /dev/mem
DisplayManager.greeterLib/DisplayManager.GreeterLib value /usr/X11R6/lib/X11/xdm/libXdmGreet.so
DisplayManager.choiceTimeout/DisplayManager.ChoiceTimeout value 15
creating socket 177
xdm error (pid 10957): error 48 binding socket address 177
Nothing left to do, exiting
|
|
|
RE: Only root wants to run xdm? - Feb. 4, '04, 12:19:41 PM
|
|
|
markfunk
Posts: 673
Joined: Mar. 31, '03,
Status: offline
|
Well you still need to " configure" xdm so that it knows
which Xservers to talk to, right ?
Just like on any other UNIX system.
Look at the " -server" option, I think.
|
|
|
RE: Only root wants to run xdm? - Feb. 4, '04, 2:05:37 PM
|
|
|
penguin
Posts: 4
Joined: Jan. 29, '04,
Status: offline
|
seems that ~/.xserverrc should provide this function, but its not clear (to me) how to specify an already running reflectionX or eXceed or whatever. with .xserverrc properly setup, xinit should know what server to talk to.
maybe i' ve just missed it, but i' ve not seen any doc on how xdm/fvwm/xinit and friends should be run in the windoze environment - does such a doc exist?
|
|
|
RE: Only root wants to run xdm? - Feb. 4, '04, 7:00:50 PM
|
|
|
markfunk
Posts: 673
Joined: Mar. 31, '03,
Status: offline
|
I don' t use X much anymore and I' m really rusty on xdm. I assumed that if someone asked about xdm they knew what they wanted it for and how to use it.
If you' re thinking about using Interix' s xdm to manage the local Xserver, I don' t (yet) see any point. You use xdm on UNIX as your graphical login screen. But on Windows you have to use the Windows graphical login screen. Once you login, then you need to follow the instructions/guidance provided by your Windows Xserver that you' ve installed. This is completely independent of the Interix/UNIX environment.
Starting up the Xserver and Xclients is done via the usual way you start Windows apps on login. Or perhaps using facilities provided by your Xserver vendor.
Besides the usual UNIX way of using xdm to start up your graphics console, xdm can be used in other ways. I claim no expertise in this area so I have no advice on how else to use xdm.
|
|
|
RE: Only root wants to run xdm? - Feb. 4, '04, 7:26:32 PM
|
|
|
penguin
Posts: 4
Joined: Jan. 29, '04,
Status: offline
|
just to close this thread...
setting the content of ~/.xserverrc to
/dev/fs/C/Program\ Files/Reflection/Rx.exe
seems to start up the server successfully.
all variations of startx, xinit, fvwm seem to fail with
[FVWM][main]: <<WARNING>> X does not support current locale:C
[FVWM][main]: <<ERROR>> can' t open display :0
waiting for X server to shut down Terminated
x apps (eg., xterm) seem to happily open and work, window mgrs do not.
as for the point, using fvwm/olwm/twm would be a nice alternative to the usual gui, even it it just operated in a fullscreen window. and one assumes the presence of things like startx, xinit, xdm, fvwm, means something like this might be possible.
thanks for the help.
|
|
|
RE: Only root wants to run xdm? - Feb. 4, '04, 9:13:07 PM
|
|
|
markfunk
Posts: 673
Joined: Mar. 31, '03,
Status: offline
|
I haven' t used ReflectionX in a long time, but most Windows Xservers (like XWin32, Exceed) are configurable so that you can choose either their flavour of Xwindows manager, or to default to the Windows style. If it defaults to Windows style, then you, the user, are able to start up your own manager - like twm.
I just tried it on XWin32 and Exceed and I successfully got twm working with both.
|
|
|
RE: Only root wants to run xdm? - Feb. 4, '04, 10:25:14 PM
|
|
|
markfunk
Posts: 673
Joined: Mar. 31, '03,
Status: offline
|
You can get ' startx' to work by
a) creating a symlink named /usr/X11R6/bin/X with the value of your Xserver executable
ln -s /dev/fs/C/PROGRA~1/Reflection/Rx.exe /usr/X11R6/bin/X
b) if your home directory contains spaces (like /dev/fs/C/Documents and Settings/user), you will need to edit the shell scripts /usr/X11R6/bin/startx and /usr/X11R6/lib/X11/xinit/xinitrc. You will need to enclose all shell variable references with double quotes.
|
|
|
RE: Only root wants to run xdm? - Feb. 5, '04, 2:49:02 AM
|
|
|
suchunghou
Posts: 24
Joined: Feb. 3, '04,
Status: offline
|
hi mark, thank you for your information, but I consider myserlf an experienced user and have a dozen way of starting so many brands of X servers :) I don' t need xdm to start any local X server for me, instead i need it to be a daemon accepting incoming queries.
When xdm starts, it " unix-ly" looks into a file named " Xservers" in xdm' s default directory (usually /usr/X11/lib/X11/xdm) to see if there is any X server need to be run. If so, xdm runs them and initiates login processes. After that, it then sleeps in the backgroud waiting for queries. There' s no uncommented lines in my " /us/X11/lib/X11/xdm/Xservers" , so I don' t expect xdm trying to talk to any server.
|
|
|
RE: Only root wants to run xdm? - Feb. 5, '04, 12:39:16 PM
|
|
|
penguin
Posts: 4
Joined: Jan. 29, '04,
Status: offline
|
i' m not sure i understand your question (sorry) -
as i mentioned above,
quote:
setting the content of ~/.xserverrc to
/dev/fs/C/Program\ Files/Reflection/Rx.exe
seems to start up the server successfully.
if my .xinitrc is setup to run twm, X works happily (assuming reflectionX (in my case) is set up correctly), responds to X queries, and " does all the right stuff" .
are you having difficulty getting X to work, or have you gotten twm or fvwm to work? if you' re having difficulty, i' m happy to share my setup with you - if you' ve gotten fvwm to work, perhaps you can share yours :-)
|
|
|
RE: Only root wants to run xdm? - Feb. 6, '04, 12:58:53 AM
|
|
|
suchunghou
Posts: 24
Joined: Feb. 3, '04,
Status: offline
|
hi penguin, I have a batch file in my desktop to start my X server with fvwm. Here it is. If you don' t have cygwin installed, then elimintate xpmroot and cygstart. Without using cygstart, there will be a command window left open.
And xpmroot can be replaced by using something like xsetroot.
*********** cut below ***
@echo off
set DISPLAY=127.0.0.1:0
start /D" C:\Program Files\StarNet\X-Win32 5.4" xwin32
set cyg=c:\cygwin
set PATH=%PATH%;%cyg%\bin;%cyg%\usr\X11R6\bin
c:\cygwin\usr\X11R6\bin\xpmroot ~/.fvwm/mystery-512x384.xpm
set HOME=/home/%USERNAME%
set PATH=/bin:/usr/X11R6/bin:/usr/local/bin
set SHELL=/bin/bash
c:\cygwin\bin\cygstart --hide C:\WINDOWS\system32\POSIX.EXE /u /c /usr/local/bin/fvwm2
********** cut ends here ******
|
|
|
RE: Only root wants to run xdm? - Feb. 8, '04, 2:02:04 PM
|
|
|
suchunghou
Posts: 24
Joined: Feb. 3, '04,
Status: offline
|
After some try-and-error, I finally got xdm to work as a service. Here' s how I did:
Step 1: Login as Administrator.
Step 2: Create /etc/init.d/xdm. (Thank markfunc for the -debug option.)
#!/bin/sh
#
# /etc/init.d/xdm
#
XDM=/usr/X11R6/bin/xdm
PATH=/bin:/usr/X11R6/bin:/usr/contrib/bin
. /etc/init.d/funcs
case $1 in
start)
${XDM} -debug 1 &
[ $? = 0 ] && echo " xdm started"
;;
stop)
killall ${XDM}
[ $? = 0 ] && echo " xdm stopped"
;;
*)
echo " usage: $0 start|stop"
;;
esac
exit 0
Step 3:
$ chmod 774 /etc/init.d/xdm
$ cd /etc/rc2.d
$ ln -s ../init.d/xdm S99xdm
$ ln -s ../init.d/xdm K99xdm
Step 4: xdm will start automatically on bootup. To start it immediately:
$ /etc/init.d/xdm start
Here' s a working example of ~/.xsession file:
#!/bin/sh
export PATH=$PATH:/usr/local/bin
export LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib:/usr/local/lib:/usr/local/ssl/lib
if [[ " $DISPLAY" = :* ]]
then
export DISPLAY=127.0.0.1$DISPLAY
fi
fvwm2 2> ~/.fvwmerr
Since xdm is running in debug mode, it might take a couple of seconds for the login prompt to appear. Once the xdm bug (?) is fixed, the ' -debug 1' option can be removed.
< Message edited by suchunghou -- Feb 8, '04, 2:43:37 PM >
|
|
|
RE: Only root wants to run xdm? - Feb. 10, '04, 7:29:40 PM
|
|
|
suchunghou
Posts: 24
Joined: Feb. 3, '04,
Status: offline
|
It seems easy to complie xdm (in order to fixed " Only root wants to run xdm" ):
Step 1: download X11R6 source code from Interop (56 MB):
ftp://ftp.interopsystems.com/src/X11R6.6/X11R6.6-interix.tar.gz to a directory.
Step 2: copy the following code to a file, say fix.sh, in the same directory: (thank markfunk for __isroot)
#!/bin/sh
gzip -c -d X11R6.6-interix.tar.gz | tar -xvf -
cd xc/programs/xdm
cp dm.c dm.c_orig
sed -e ' s/getuid() \!= 0)/\!__isroot(getuid()))' / dm.c_orig > dm.c
xmkmf
make
Step 3: cd to this directory. Excute:
$ sh fix.sh
The whole source of X11R6 will be un-tar' ed and xdm patched and compiled. Wait a couple of minutes...
Step 4: If everything goes well, login as Administrator:
$ cp xc/programs/xdm/xdm /usr/X11/bin
$ chmod 755 /usr/X11/bin/xdm
|
|
|
RE: Only root wants to run xdm? - Feb. 13, '04, 1:49:59 PM
|
|
|
suchunghou
Posts: 24
Joined: Feb. 3, '04,
Status: offline
|
After using xdm for a couple of days, I suspect that xdm does not pass Windows environment variables to its child process, unlike POSIX.EXE does. The varaibles SFUDIR and WINDIR are needed in /etc/profile to set PATH correctly. Others may be needed in windows commands such as ' dir' . So I had to export them in .xsession. For your informaion, allow me to post my improved version here:
#!/bin/sh
export PATH=/bin:/usr/X11/bin:/usr/local/bin
export LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib:/usr/local/lib:/usr/local/ssl/lib
export SFUDIR=' C:\SFU'
export SYSTEMDRIVE=C:
export SYSTEMROOT=' C:\WINDOWS'
export WINDIR=' C:\WINDOWS'
if [[ " $DISPLAY" = :* ]]
then
export DISPLAY=127.0.0.1$DISPLAY
fi
xsetroot -solid gray10
exec fvwm2 2> ~/.fvwmerr
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
|
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|
|
|