--- mcore-src/trunk/mcore-tools/daemon/client/include/network.client.class 2011/02/17 21:42:57 1350 +++ mcore-src/trunk/mcore-tools/daemon/client/include/network.client.class 2011/02/17 21:44:18 1351 @@ -23,12 +23,26 @@ { local value="$1" local CONFIG + local socket + local cookie + local authtype + [[ -z ${value} ]] && help_network_hostname && return 1 CONFIG="/etc/hostname" clearconfig addconfig "${value}" hostname "${value}" + + # check for running x11 and recreate the xauth cookie with the correct hostname + if [[ ! -z $(pidof X) ]] + then + socket="${value}/unix${MCORE_XORG_DISPLAY}" + cookie=$(x11runas "xauth list | sed 's:.*\ \(.*\):\1:'") + authtype="MIT-MAGIC-COOKIE-1" + # add the new hostname to the xauthority file + x11runas "xauth add ${socket} ${authtype} ${cookie}" + fi } help_network_iface() @@ -130,7 +144,7 @@ mecho "get network.nameserver" mecho " displays the current nameserver of the system" mecho - mecho "set network.dns [ip1] [ip2] .. [ipN]" + mecho "set network.nameserver [ip1] [ip2] .. [ipN]" mecho " adds given ips as nameserver to the system" }