It is good that several of you are using your own Linux boxes for DIC 7370 work. But Linux installations out-of-the-box are typically not "open" enough for our projects. (The suggested solutions on this page do weaken security. This is not disastrous; Linux distros are becoming too paranoid in the wrong places ...)
On this page, I am collecting DIC 7370 related issues and solutions. If you find better solutions, please send them, and I will update this page.
Learn to use sudo
and su
. On Debian/
Ubuntu/ Knoppix/ Kali, apt-get
is the software (un)installer.
Graphical versions: muon, synaptic, adept, kpackage. On RedHat and
Fedora: yum
.
RPC program numbers, network port numbers, ... are system wide resources -- not per user or per process separated entries. Before debugging your WhiteBoard RPC project, it is good idea to freshly reboot the host.
The X11 server runs on the machine that has the screen (and keyboard, and mouse, ...). X11 clients can run on the same host or some where else and network-connect to the server. The host running the clients may or may not have the screen etc.
For DIC 7370, X11 server should have been started without disabling listening to TCP connections. A "good" one may look like this:
/usr/lib/xorg/Xorg -listen tcp -auth /var/run/sddm/{a2320c42-7b0e-483a-b761-44cd4f79e4a6} -background none -noreset -displayfd 17 -seat seat0 vt1
List all processes, and see
what the arguments are to Xorg.
Exactly how it should be
started varies among distributions. Generally speaking, search for
"-nolisten
" keyword or DisallowTCP
among
kdm/gdm/X11 config files and delete it. For gdm,
check /etc/gdm/gdm.schemas, /etc/gdm/custom.conf,
/etc/gdm/gdm.conf
. For kdm,
check /etc/kde4/kdm/kdmrc
.
I had to replace the /usr/bin/Xorg script with my own to accomplish
this. The script originally was this:
#!/bin/sh # # Execute Xorg.wrap if it exists otherwise execute Xorg directly. # This allows distros to put the suid wrapper in a separate package. basedir=/usr/lib/xorg if [ -x "$basedir"/Xorg.wrap ]; then exec "$basedir"/Xorg.wrap "$@" else exec "$basedir"/Xorg "$@" fi
The script /usr/bin/Xorg is now this:
#!/bin/sh # # Execute Xorg.wrap. # This allows distros to put the suid wrapper in a separate package. echo $@ > /tmp/da.txt exec /usr/lib/xorg/Xorg.wrap $(sed -e 's/-nolisten/-listen/g' /tmp/da.txt)
The X11 windows will show up on the screen defined by
$DISPLAY
. The simplest, in bash, is to do: export
DISPLAY=host-name:0.0
BTW, you can instead use IP addresses, as
in "127.0.0.1:0.0
".
Example
problem: client: openxwindow("localhost:0.0", ...) == -1,
failed
; Diagnosis: Disable authentication control over whose
processes can open X11 windows. Solution:
xhost +
For fine grain control, read man xhost
. If you are
using, e.g. ssh -X tunnel, the DISPLAY will have a different value.
Be aware that client.c has a hard-coded display
number: strcat(cd->xdisplaynm, ":0.0");
Install the X11 development libraries. Do the equivalent
of apt-get install libx11-dev
The host name lookups should be correct. This is a combination of
/etc/hosts
and how you set up DNS. E.g., if ":0.0" works
but "localhost:0.0" does not, the problem is with your /etc/hosts
file. Entries in /etc/hosts.deny
cause connections to be
refused. Understand what is in /etc/resolv.conf
You will benefit from installing sshd, smbd, nmap,
traceroute
Learn to log into a remote server without password but with automated authentication and encryption: http://www.cs.wright.edu/~pmateti/ Courses/2350/ Labs/Network/ NetworkLab.html#ssh
rpcgen
program exists on practically all OS. But,
its generated C/C++ code can look very different from what is generated in
Linux.
rpcinfo
as a diagnostic command. On Ubuntu, it
is located in /usr/sbin/
. Before you start any of
WhiteBoard processes, do rpcinfo -p
and make a
note of what is listed. After starting WhiteBoard processes,
check what rpcinfo -p
shows.
"Cannot register service: RPC: Unable to
receive; errno = Connection refused unable to register
(WhiteBoardServer, WhiteBoardServerVersion, ...)."
Diagnosis:
RPC portmapper is missing. Solution:
Install nfs-kernel-server
. This will install NFS, but as
a side-effect installs RPC support.
"Cannot register service: RPC:
Authentication error; why = Client credential too weak unable to
register (registryProg, registryVers, ...)"
Diagnosis: We
need rpcbind to be running in the insecure mode. Solution: List all
processes, and see what the arguments are to rpcbind. If it is
just rpcbind -w
, kill that process and restart it
as rpcbind -w -i
. This solves it for just this session.
Permanent solution: Find the config file(s) for rpcbind, and fix the
options; on Ubuntu, /etc/init/portmap*.conf,
/etc/init/rpc*.conf
.
rpcbind
is the portmapper; a few years ago, its name
was rpc.portmap.