maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   [Announce] snx: a simple NX client (https://talk.maemo.org/showthread.php?t=60760)

maacruz 2010-08-20 18:29

[Announce] snx: a simple NX client
 
Hi all!

I was tired of how bad qtnx works (Fn key doesn't work, crashes, only can run either gnome or kde sessions, etc), so I decided to have a try at it.
So, here it is: snx, written entirely in shell script (bash syntax), a command line NX client, able to run commands, any desktop, or even funnier things.

Notes:
The package and its dependencies (xmodmap, wmctrlm xbindkeys and x11-utils) are provided in extras-devel repository, for both N8x0 and N900.
In N8x0, you are advised to install Telescope to avoid problems managing NX windows. With the default diablo task switcher, some NX windows can be "lost" if minimized because they do not show an icon in the taskbar, Telescope will show all windows, fixing that problem.
In N900, some remote windows don't receive the input focus (a known problem with the N900 window manager). You can press Ctrl+Return to toggle fullscreen state and give the input focus to the active window.
Although it is a NX client, it won't use nxserver, nxssh protocol or the nx account. It just uses your regular ssh account. It works even if nxserver is not configured, as long as nxagent is installed in the remote server.

Advantages:
Very easy and fast to use. No setup.
Keyboard works fully
You can run single commands in rootless mode (default) and have the remote windows managed locally (to run several programs, launch them from a xterm)
You can run any remote desktop.
You can fullscreen the desktop window and the remote program windows with the fullscreen key

Limitations:
It requires a bash compatible shell in the server's user account (/bin/sh linking to bash is syntax restricted and doesn't work, it must be /bin/bash or /bin/ash...).
Actually you can run just one client session per server. This might be improved in the future.
Actually it doesn't run on desktops because it doesn't manage X cookies. This might be improved in the future.
It doesn't run persistent sessions, disconnecting or closing the NX desktop window will close the remote session. This will be improved in the future.
Only X remote sessions and programs. No vnc. No rdp.

Usage:
Open a xterm and type
snx user@host[:sshport] [command]
Type the ssh account password when asked.
For example: "snx user@host firefox" will open a remote firefox
The command is optional, if none is provided a xterm will open.
The sshport is optional, you can use it if the host ssh server is listening in a non standard port. Standard ssh client file configuration also works with snx.

To run a remote desktop:
snx -d user@host start_desktop_command
For example: "snx -d user@host startkde" will run a remote kde3 desktop

To avoid typing your ssh account everytime, you can set the NXHOST environment variable
export NXHOST=user@host
Then you can just type
snx [-d] [command]

Server side:
snx fails and you can read a message like: Server says: Error: Aborting session with 'Unable to open display 'nx/nx,link=modem,accept=127.0.0.1:1011''. This is due to a bug in your nxagent version. NX 3.4.0-14 binary packages from NoMachine are known to have this bug. You have to install newer packages from your distro to fix it.
Opensuse: Install the NX-3.4.0 package from X11:/RemoteDesktop OBS repository.
Ubuntu:Follow the instructions here https://help.ubuntu.com/community/FreeNX You need to install at least nx-common, nxagent, nxlibs and nxproxy packages (freenx packages are not really needed, but it doesn't hurt to install them either)

maacruz 2010-08-20 18:35

Re: [Announce] snx: a simple NX client
 
4 Attachment(s)
Some screenshots

First one: konqueror window (locally managed)

Second one: konqueror window in fullscreen

Third one: icewm desktop (fullscreen)

Fourth one: having fun, remote kicker integrated in maemo desktop

Mgamerz 2010-08-21 04:48

Re: [Announce] snx: a simple NX client
 
Is this like VNC excpet application only?
Or am I just wanting this... well, not konqueror. I can't stand that browser.

maacruz 2010-08-21 11:03

Re: [Announce] snx: a simple NX client
 
Quote:

Originally Posted by Mgamerz (Post 793674)
Is this like VNC excpet application only?
Or am I just wanting this... well, not konqueror. I can't stand that browser.

Third screenshot shows a complete desktop, like vnc, so this is not application only, but this is not vnc. Also, this is NOT for windows, only X (that is, linux/*nix). If you don't like konqueror... would you prefer a screenshot of lynx in konsole :P ?

maacruz 2010-08-21 13:53

Re: [Announce] snx: a simple NX client
 
Update: Package snx-0.0.1-1_armel.deb did not reflect the compulsory dependency on xmodmap, uploaded snx-0.0.1-2_armel.deb to fix it. If you have the first release installed, please make sure you also have installed xmodmap, otherwise the keyboard won't work as expected.

Mgamerz 2010-08-21 14:21

Re: [Announce] snx: a simple NX client
 
Lulz, I use lynx.

jimbolaya 2010-09-20 20:23

Re: [Announce] snx: a simple NX client
 
The Diablo "Application Manager" complains that both wmctrl_1.07-5_armel.deb and xbindkeys_1.8.2-1_armel.deb are "Incompatable application packages". Do I install these using dpkg or something?

maacruz 2010-09-20 20:40

Re: [Announce] snx: a simple NX client
 
Yes, install them using dpkg, they will work with no trouble.
Btw, I don't understand why Application Manager complains, both packages were built in scratchbox's diablo target.

maacruz 2010-10-10 11:18

Re: [Announce] snx: a simple NX client
 
New release 0.0.2: keyboard fixes. Now the keyboard always works, even with non-latin keyboards.

salinmooch 2010-10-12 04:31

Re: [Announce] snx: a simple NX client
 
Excellent little script. I have been using a hacked jumble of scripts to use my home server over a ssh tunnel and vnc. This is much more efficient for my uses and tons snappier than sending raw X displays over to my tablet. Although I do not have a good screen keyboard option to enter text, I do find it useful for remote and home stuff. Some fun and useful things I've done with it:
  • Send xsane over to the tablet to acquire images from a networked scanner.
  • Used scan2pdf to assemble a document and drop it on my tabler via sshfs
  • Print openoffice docs off my tablet (by using snx to use my server to open docs on my tabler via a sshfs mount
  • Ran VirtualBox with winxp and sent the display over to the tablet (this was for fun but actually worked quite well)
  • Ran picasa3 via wine on the tablet and sorted photos.


All times are GMT. The time now is 20:46.

vBulletin® Version 3.8.8