SliTaz GNU/Linux official and community documentation wiki.
.png
Translations of this page:

This is an old revision of the document!


Conspy : tiny screen or VNC

Slitaz core provides the 10Kb conspy to get remote control of Linux virtual consoles. See http://ace-host.stuart.id.au/russell/files/conspy/

Slitaz opens 6 virtual consoles which you can access with Ctrl-Alt-F1 to Ctrl-Alt-F6. You can connect to console 1 with conspy 1 and console n with conspy n or the current active console with conspy (root user only).

To exit from conspy (and the virtual console) press the escape key three times in quick succession.

Conspy as screen (session manager)

Linux supports up to 63 virtual consoles. You can have up to 62 (63 - X11 on console 7) sessions. Six sessions are already opened by Slitaz. You can open a new console / new session (say console 28) with openvt -c 28 /bin/login or openvt -c 28 /bin/ash. You can free this virtual console with deallocvt 28.

Example:

home$ ssh tux@slitazbox
box$ su
box# openvt -c 28 /bin/ash
box# conspy 28
# some commands
...
# <ESC><ESC><ESC>
box# exit
box$ exit

With a recent busybox (see below) you can skip the openvt step:

home$ ssh tux@slitazbox
box$ su
box# conspy -cs 28
# some commands
...
# <ESC><ESC><ESC>
box# exit
box$ exit

Later:

home$ ssh tux@slitazbox
box$ su
box# conspy 28
# more commands
...
# <ESC><ESC><ESC> 
box# exit
box$ exit

To close the session:

home$ ssh tux@slitazbox
box$ su
box# conspy 28
# exit
<ESC><ESC><ESC>
box# deallocvt 28
box# exit
box$ exit

With a recent busybox (see below) you can skip the deallocvt step:

home$ ssh tux@slitazbox
box$ su
box# conspy 28
# clear; exit
<ESC><ESC><ESC>
box# exit
box$ exit

If you prefer to use screen, see http://www.gnu.org/software/screen:

# tazpkg get-install screen
$ screen -S MySession

Conspy as VNC (shared console)

You can share a virtual console between two or more users. Say RemoteUser wants to show some commands to SlitazUser using SlitazBox. RemoteUser selects SlitazUser's console with chvt:

home$ ssh SlitazBox
SlitazBox$ su
SlitazBox# chvt 1
SlitazBox# conspy 1

Now both users show the same terminal. A third user can do conspy 1 too.

If you prefer to share the X11 display, install x11vnc (VNC server) and x11vnc-extra (java VNC client) see http://www.karlrunge.com/x11vnc/:

SlitazBox# tazpkg get-install x11vnc
SlitazBox# tazpkg get-install x11vnc-extra
SlitazBox# /etc/init.d/x11vnc start
home$ su
home# get-java-jre
home# exit
home$ firefox http://SlitazBox:5800/ultrasigned.vnc

X11VNC Autostart

If you'd like to start automatically the X11VNC you must edit /home/$USER/.xinitrc with

#nano /home/tux/.xinitrc

# ~/.xinitrc: Executed by slim login manager to startx X session.
# You can use F1 with Slim to chage your window manager or configure
# it permanently with your personnal applications.conf file.
#
. $HOME/.config/slitaz/applications.conf

############################################################
## ATTENTION!!! INSERT THE LINE BELOW AFTER .conf FILE CALL
/etc/init.d/x11vnc start &

case $1 in
	e17|enlightenment*)
...

DO NOT USE the Autostart Programs option under OpenBox or Daemon tricks, it will start X11VNCserver before X11server and crash the VNC after first client connection. So you'll only connect once the server and it's not desirable in support environments.

Conspy and slow connections

Launch a very verbose command into a conspy and the output is displayed at full speed in the virtual console whatever your connection speed to the remote box is (even if your connection is broken).

Conspy and Busybox

Conspy is a busybox applet since busybox 1.17.0. It adds 2.5Kb to busybox, has better terminal support and supports some new options:

  • -c to create missing devices (/dev/vcsaXX and /dev/ttyXX)
  • -d for screen shot
    # conspy -nd 28 > screen28.txt
  • -s to launch a shell
    # conspy -cs 28

    (no more openvt/deallocvt)

  • -x COL -y LINE upper left corner position
  • -f follow cursor with automatic scrollings

The conspy applet is enabled in the busybox package. The conspy package is no longer more useful than the recent busybox and will be removed from the packages database.



Page Review Section
Quality Good
Review Minor Updates
Priority Medium
Problems add a forum post link
OR add a lab issue tracker link
How to Improve Suggest briefly



 
en/guides/conspy.1334686114.txt.gz · Last modified: 2012/04/17 20:08 by t0n1