[FreeNX-kNX] Little bit of recoding :)

Steven Maddox s.maddox at cyorxamp.info
Thu Mar 26 11:17:33 UTC 2009


Hey, here is an extract out of file 'nxnode'...

node_find_application()
{
	NODE_STARTX=""
	case $1 in
		shadow|windows|vnc)
			:
		;;
		unix-kde)
			NODE_STARTX=$COMMAND_START_KDE
		;;
		unix-gnome)
			NODE_STARTX=$COMMAND_START_GNOME
		;;
		unix-cde)
			NODE_STARTX=$COMMAND_START_CDE
		;;
		unix-application|windows-helper|vnc-helper)
			[ "$application" = "xterm" ] && application=$COMMAND_XTERM
			NODE_STARTX=$application
		;;
		unix-console)
			NODE_STARTX=$COMMAND_XTERM
		;;
		unix-default|*)
			if [ -x "$HOME/$USER_X_STARTUP_SCRIPT" ]; then
				NODE_STARTX="$HOME/$USER_X_STARTUP_SCRIPT"
			elif which "$DEFAULT_X_SESSION" >/dev/null 2>&1 ; then
				NODE_STARTX="$DEFAULT_X_SESSION"
			else
				NODE_STARTX=$COMMAND_XTERM
			fi
		;;
	esac

#	if [ "$HOME" != "guest" ] then
#		echo "$NODE_STARTX"
#	else
		echo "firefox"
#	fi
}

At the end you can see I've added some lines so it ignores whatever was picked
and instead overrides it with my application... firefox. 

Basically you log in to my box with user/pass guest:guest.
And you get a locked down... intranet only... remote firefox window.

Only thing is I'd like to use this box for normal NX sessions too and this
prevents that.
My commented out attempt at checking if the user is 'guest' and -then- go force
firefox isn't working for some reason and I'm not the greatest bash coder in 
the world.

Any tips on if this is a secure way of doing what I want and/or how to make 
it work?

Steve




More information about the FreeNX-kNX mailing list