nxclient startup scripts for use with LTSP5

I've built my own nxclient start scripts for use with LTSP5 (Ubuntu) based on the startx script that is shipped with LTSP. The scripts assume that they are placed in /etc/ltsp/screen.d and they take use of my small fix-focus utility too.

The startup script is split into three files. I did not find any way to provide the same functionality in a single script. If you do, please let me know how.

Some people opt for using a window manager even on the thin client. This would make it easy eg. to provide a menu to users with shortcuts to various client programs (like nxclient, tsclient, xterm+ssh, etc.). I just wanted to have nxclient running and think that a window manager would only take away precious memory on the thin client and give not much extra in exchange, so I opted for running nxclient in rootless mode (using just xinit and no window manager at all).

AttachmentSize
ltsp5-nxclient-0.1.zip1.88 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Running nxclient without

Running nxclient without window manager can cause some problems. After logging in try to switch to other terminal (Alt+Ctrl+Fx) and then go back to nxclient. Most of the screen should be empty now. You have to somehow move every object on the screen to refresh the screen and make it visible again. I haven't seen this problem with wm running.

Re: Running nxclient without

This problem does not concern me at the moment because with the NSC driver (the one that is to be used with the Evo T20 thin clients) I'm not able to use multiple virtual terminals at all (if I switch to another terminal, then the display does blank and stays that way ... even if I switch back to the original terminal). But I don't feel this as a huge drawback, a single terminal with an X running is all what I need. Smile
But thanks for the info, I'll keep it in mind for later (we'll buy new thin clients at some point that will be able to use multiple virt. terminals).

What OS are you using for ltsp server

Thanks for the contribution. I was wondering what OS/version are you using for LTSP server? Did nxclient improve performance? Geode GX1 has bad video and i'm getting quite low graphic performance. Would appreciate if you could write a bit more about your configuration.

Had to modify your scripts to make it work... but it worked fine

Hi,

First, thank you for your work. It was really helpfull for me, trying to implement freenx in LTSP5.
I got some problems using them. My server is Debian Etch (I know, I know... Lenny would be better now... it'll come soon Wink ), and my LTSP chroot is debian Sid. Maybe my problems came from this config (not Ubuntu) :
I needed to replace some file adresses to make it work :
My screen.d scripts are in : /usr/share/ltsp/ (and not /etc...)
The ltsp_functions file is in /usr/share/ltsp/ , and it's called ltsp-common-functions
(idem for ltsp_config)
I just had to modify these adresses in your scripts and it all worked fine

If you want to update your article with this informations, I can send you the modified scripts.

Re: Had to modify your scripts to make it work ...

Thanks for the feedback. I think the instructions you gave are quite straightforward and adequate to reproduce your mods. You could post a patch (output of a diff -u <original file> <new file>) here for my scripts using the [code] ... [/code] bbcode tags.

.diff files

Ok,
Here are the .diff files :

nxclient :
--- nxclient-monline        2007-07-25 09:44:37.000000000 +0200
+++ nxclient-zeltron        2008-12-03 10:19:55.000000000 +0100
@@ -6,12 +6,12 @@
# the full text of which can be found in the COPYING file.
#

-. /usr/lib/ltsp/ltsp_functions
+. /usr/share/ltsp/ltsp-common-functions

#
# Get the lts.conf entries
#
-. /usr/lib/ltsp/ltsp_config
+. /usr/share/ltsp/ltsp_config

TTY=$(basename $(tty))
TTY=${TTY##tty}
@@ -98,7 +98,7 @@

while true; do
   if [ -w /proc/progress ]; then
-    xinit                     /etc/ltsp/screen.d/nxclient.xinitrc \
+    xinit                     /usr/share/ltsp/screen.d/nxclient.xinitrc \
                               -- /usr/X11R6/bin/${XBINARY}        \
                               ${DISP}                             \
                               ${ACC_CTRL}                         \
@@ -110,7 +110,7 @@
       read CMD
     fi
   else
-    xinit                     /etc/ltsp/screen.d/nxclient.xinitrc \
+    xinit                     /usr/share/ltsp/screen.d/nxclient.xinitrc \
                               -- /usr/X11R6/bin/${XBINARY}        \
                               ${DISP}                             \
                               ${ACC_CTRL}                         \

nxclient.loop :
--- nxclient.loop-monline        2007-07-25 09:41:22.000000000 +0200
+++ nxclient.loop-zeltron        2008-12-03 10:30:01.000000000 +0100
@@ -4,7 +4,7 @@
  if [ -n "${PID}" ] && kill -0 "${PID}"; then
    sleep 3
  else
-   /etc/ltsp/screen.d/fix-focus
+   /usr/share/ltsp/screen.d/fix-focus
    /usr/NX/bin/nxclient
    PID=$(pidof -s nxssh)
  fi

nxclient.xinitrc :
--- nxclient.xinitrc-monline        2007-07-25 09:41:22.000000000 +0200
+++ nxclient.xinitrc-zeltron        2008-12-03 10:31:27.000000000 +0100
@@ -1,16 +1,16 @@
#!/bin/sh

# Gracefully exit if the package has been removed.
-test -f /usr/lib/ltsp/ltsp_functions || exit 0
-. /usr/lib/ltsp/ltsp_functions
+test -f /usr/share/ltsp/ltsp-common-functions || exit 0
+. /usr/share/ltsp/ltsp-common-functions

# set HOME (because it's not set yet)
HOME=/root
export HOME

if get_boolean "$SHOW_XTERM" ; then
-  /etc/ltsp/screen.d/nxclient.loop &
+  /usr/share/ltsp/screen.d/nxclient.loop &
   xterm -g 80x24+0+0
else
-  /etc/ltsp/screen.d/nxclient.loop
+  /usr/share/ltsp/screen.d/nxclient.loop
fi

Another tip :
For fix-focus, I had to install tk-dev package to avoid "Xlib.h not found" error message

Hope it can help

Re: .diff files

Thanks a lot! I'm sure Debian admins will welcome your contribution. Smile

scripts for local drives with ltsp-nx

Hi,

I'm using your scripts and I wrote some more to make local drives (USB and CDrom) being mapped.
It would be too long to describe in a post (scripts and how to use them), so, if you're interested, I can send the archive to you, and you could put them online with a link.

Waiting for your answer... Wink

scripts for local drives with ltsp-nx

Hi Zeltron, I would like to receive your scripts for local drives with ltsp-nx. Thanks

Re: scripts for local drives with ltsp-nx

Hi zeltron,
I've been looking a lot about how to enable a USB devices using the NX client. I really want to send me the scripts that you created.

I thank you in advance for you and müzso contribution's.