2014-06-13

Linux for ChromeBook #link

UPDATE: 03:04EDT : This site — http://chromeos-cr48.blogspot.mx/2012/12/so-you-want-chrubuntu-on-external-drive.html — has info about how to install a bootable Linux for the Chromebook to a USB stick.

UPDATE: 02:30 EDT : This site has the same info as the OP, but is more readable: http://www.makeuseof.com/tag/install-linux-chromebook/

OP: How to Install Linux on a Chromebook

vncconfig for Xvnc4

Starting with the current Xvnc4, there is a helper app available:  vncconfig

pdw@zipper:~$ man -P cat vncconfig 
vncconfig(1)               Virtual Network Computing              vncconfig(1)



NAME
       vncconfig - configure and control a VNC server

SYNOPSIS
       vncconfig [parameters]
       vncconfig [parameters] -connect host[:port]
       vncconfig [parameters] -disconnect
       vncconfig [parameters] [-set] Xvnc-param=value ...
       vncconfig [parameters] -list
       vncconfig [parameters] -get Xvnc-param
       vncconfig [parameters] -desc Xvnc-param

DESCRIPTION
       vncconfig  is used to configure and control a running instance of Xvnc,
       or any other X server with the VNC extension.  Note that it  cannot  be
       used to control VNC servers prior to version 4.

       When run with no options, it runs as a kind of "helper" application for
       Xvnc.  Its main purpose when run in this mode is to  support  clipboard
       transfer  to  and  from the VNC viewer(s).  Note that without a running
       instance of vncconfig there will be no clipboard support.  It puts up a
       window  with  some  checkboxes  which  can be used to disable clipboard
       transfers if required (in the future there may be more functions avail‐
       able from this window).  The -nowin flag can be used if you always want
       clipboard support but don't wish to clutter the desktop with this  win‐
       dow - alternatively the -iconic option can be used to make it iconified
       by default.

       When run in any other mode, vncconfig is a  one-shot  program  used  to
       configure  or control Xvnc as appropriate.  It can be used to tell Xvnc
       to connect or  disconnect  from  listening  viewers,  and  to  set  and
       retrieve Xvnc's parameters.

       Note  that the DISPLAY environment variable or the -display option must
       be set as appropriate to control Xvnc.  If you run it on an ordinary  X
       server  (or  on  a version 3 Xvnc) you will get an error message saying
       that there is no VNC extension.


OPTIONS
       -connect host[:port]
              Tells an Xvnc server to make a "reverse" connection to a listen‐
              ing  VNC  viewer  (normally  connections  are made the other way
              round - the viewer connects to the server).  host  is  the  host
              where  the listening viewer is running. If it's not listening on
              the default port of 5500, you can specify host:port instead.


       -disconnect
              This causes Xvnc to disconnect from all viewers so that the  VNC
              desktop is not displayed anywhere.


       [-set] Xvnc-param=value
              Sets  an  Xvnc  parameter to the given value.  Note that some of
              Xvnc's parameters are read only once at startup so that changing
              them in this way may not have any effect.


       -list  Lists all the parameters supported by Xvnc.


       -get Xvnc-param
              Prints the current value of the given Xvnc parameter.


       -desc Xvnc-param
              Prints a short description of the given Xvnc parameter.


PARAMETERS
       vncconfig  also  has parameters of its own which can be set on the com‐
       mand line.  These should not be confused with Xvnc's  parameters  which
       are manipulated with the -set, -get, -list and -desc options.

       Parameters  can be turned on with -param or off with -param=0.  Parame‐
       ters which take a value can be specified as -param value.  Other  valid
       forms  are param=value -param=value --param=value.  Parameter names are
       case-insensitive.


       -display Xdisplay
              Specifies the Xvnc server to control.


       -nowin When run as a "helper" app, don't put up a window.


       -iconic
              When run as  a  "helper"  app,  make  the  window  iconified  at
              startup.


SEE ALSO
       vncpasswd(1), vncviewer(1), vncserver(1), Xvnc(1)
       http://www.realvnc.com


AUTHOR
       Tristan Richardson, RealVNC Ltd.

       VNC  was  originally  developed  by  the RealVNC team while at Olivetti
       Research Ltd / AT&T Laboratories Cambridge.  It is now being maintained
       by RealVNC Ltd.  See http://www.realvnc.com for details.



RealVNC Ltd                       03 Mar 2005                     vncconfig(1)
pdw@zipper:~$ date -u
Fri Jun 13 03:50:16 UTC 2014

2014-06-12

VNC for ChromeOS

https://bitbucket.org/saljam/vnc &nash; Overview
This is a VNC viewer Chrome app. It uses Chrome's sockets API to talk to the VNC server directly.
The RFB rendering is based on NoVNC[0]. The icon is based on "Computer" from the Noun Project[1].
[0] http://kanaka.github.com/noVNC/
[1] http://thenounproject.com/noun/computer/#icon-No115
Note the use of markdown style links in the page content shown above.
HACK.md



Make sure:
  1. vncserver is installed on the Debian machine
  2. user account on the remote host is configured to allow ssh public key login
  3. vnc client app is installed on local host
  4. ssh private key (key pair) is installed on local host
  • Using VNC Viewer for Chrome OS to connect to a Debian server running Xvnc4 server.


Xvnc4server Startup Error: hidden lock files in /tmp

Xvnc4server creates two (2) lock-files in the /tmp directory when it starts up.

If the VNC server shuts down normally (e.g. with vncserver -kill :$NN (where $NN is the VNC display port number), these files are removed.

Xvnc4servev checks for the existence of these files on start-up, and exits with an error message if either exists.

Debian Linux Xvnc4server creates lockfiles in /tmp/. The lock-files are:

  • /tmp/X{nn}-lock
  • /tmp/.X11-unix/X{nn}

where {nn} is the port number of the display. Note that these files are hidden, and that the naming can be confusing if the VNC server in question was started on display port :11 (since 11 is also the version part of X11, and the : is dropped from the display spec when the file name is constructed by xvncserver at startup.

Also: while VNC is running there may be other user-owned lock-files in /tmp that appear during VNC server operation. The ones listed here are the ones controlled by the VNC server itself.

If Xvnc4server has died and left these lock-files in place, VNC connection attempts (via SSH tunnel) will report network connection failed errors on the client-side, and open failed: connect failed: Connection refused channel errors on server-side console during connection attempts.

This condition can be confirmed using the following command from the shell prompt on the server:

    ps ax | grep `cat /tmp/.X$NN-lock`

Where $NN is the number of the display you're looking for.

If the command returns a process table entry for a running VNC server at with the PID stored in the lockfile, then there is some other problem - if the command returns nothing, or only the proc table entry for e.g. the grep process itself, then the lockfiles may be safely removed, and the VNC server for the port restarted.

2014-06-11

#blogref: Jay’s Technical Talk on #pan #dun #samsung #android #linux

Jay’s Technical Talk — Using Bluetooth™ PAN / DUN on Samsung Blackjack with Linux:

'via Blog this'

*Working with Samsung Galaxy & Linux Mint*

Command hcitool & friends — _see also_: apropos hci

mint@t42 ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:11:25:45:cd:7c  
          inet addr:192.168.4.42  Bcast:192.168.4.255  Mask:255.255.255.0
          inet6 addr: fe80::211:25ff:fe45:cd7c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17527 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18172 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2179601 (2.1 MB)  TX bytes:8487958 (8.4 MB)

eth1      Link encap:Ethernet  HWaddr 00:0e:35:f1:28:94  
          inet addr:192.168.15.103  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::20e:35ff:fef1:2894/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:109895 errors:52 dropped:3075 overruns:0 frame:0
          TX packets:86753 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:114067221 (114.0 MB)  TX bytes:11494701 (11.4 MB)
          Interrupt:11 Base address:0x8000 Memory:c0210000-c0210fff 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:13127 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13127 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1255696 (1.2 MB)  TX bytes:1255696 (1.2 MB)

pan1      Link encap:Ethernet  HWaddr 46:fd:d4:16:43:d5  
          inet addr:10.87.148.1  Bcast:10.87.148.255  Mask:255.255.255.0
          inet6 addr: fe80::44fd:d4ff:fe16:43d5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:87 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:13674 (13.6 KB)

mint@t42 ~ $ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.15.1    0.0.0.0         UG    100    0        0 eth1
10.87.148.0     *               255.255.255.0   U     0      0        0 pan1
link-local      *               255.255.0.0     U     1000   0        0 eth0
192.168.4.0     *               255.255.255.0   U     0      0        0 eth0
192.168.15.0    *               255.255.255.0   U     0      0        0 eth1
mint@t42 ~ $ hci
hciattach  hciconfig  hciemu     hcitool    hcitrace   
mint@t42 ~ $ hcitool 
hcitool - HCI Tool ver 4.98
Usage:
 hcitool [options]  [command parameters]
Options:
 --help Display help
 -i dev HCI device
Commands:
 dev  Display local devices
 inq  Inquire remote devices
 scan Scan for remote devices
 name Get name from remote device
 info Get information from remote device
 spinq Start periodic inquiry
 epinq Exit periodic inquiry
 cmd  Submit arbitrary HCI commands
 con  Display active connections
 cc   Create connection to remote device
 dc   Disconnect from remote device
 sr   Switch master/slave role
 cpt  Change connection packet type
 rssi Display connection RSSI
 lq   Display link quality
 tpl  Display transmit power level
 afh  Display AFH channel map
 lp   Set/display link policy settings
 lst  Set/display link supervision timeout
 auth Request authentication
 enc  Set connection encryption
 key  Change connection link key
 clkoff Read clock offset
 clock Read local or remote clock
 lescan Start LE scan
 lewladd Add device to LE White List
 lewlrm Remove device from LE White List
 lewlsz Read size of LE White List
 lewlclr Clear LE White list
 lecc Create a LE Connection
 ledc Disconnect a LE Connection
 lecup LE Connection Update

For more information on the usage of each command use:
 hcitool  --help
mint@t42 ~ $ 


#NOTE:  Issue 1416: Bluetooth DUN/PAN Tethering support

#12 pde...@gmail.com
According to this FAQ, it shouldn't be too hard to make it work :
http://sites.google.com/a/android.com/opensource/projects/bluetooth-faq

$ ls ~/workspace/mydroid/external/bluez/utils/dund/
Android.mk  dun.c  dund.1  dund.h  lib.h  main.c  Makefile.am  Makefile.in  msdun.c 
sdp.c

Aug 6, 2009 

#13 dola...@gmail.com
In the worst case, you can still install this :
https://code.google.com/p/android-wifi-tether/

wifi and bluetooth tethering. But I still think it would be great to be integrated in
the OS by default :)

Debia Etch Bluetooth PAND How-To

2014-06-10

RaspiCam Docs TBD

In the section describing the --exposure parameter to the raspicam programs (raspistill, raspivid, etc), the rPiCamDoc contains the following statement

Note that not all of these settings may be implemented,
depending on camera tuning.

TBD

How can it be determined which of the --exposure options are supported by a given camera?

Detail

--exposure, -ex     Set exposure mode
    Possible options are:
        off
        auto        Use automatic exposure mode
        night       Select setting for night shooting
        nightpreview
        backlight   Select setting for back lit subject
        spotlight
        sports      Select setting for sports (fast shutter etc)
        snow        Select setting optimised for snowy scenery
        beach       Select setting optimised for beach
        verylong    Select setting for long exposures
        fixedfps,   Constrain fps to a fixed value
        antishake   Antishake mode
        fireworks   Select settings

Note that it states else where in the document that the antishake mode is NOT currently implemented (as of 2014-06-10 || the date of publication of the document).

TBD

What are the "date of publication" and "last modified" dates for RaspiCamDocs.pdf?

2014-06-09

m3bb3 NSFW

Haz fownd thiz heer URL in my logfiles has been visiting my site, yew? lmao....

http://pitera-prostitutki.ru/

These are the top visitors to my blog, it sez. 3 page views each. lmao here's another

http://pitera-prostitutki.ru/

Ohai yew Russhunz yew!!

SSH-client for ChromeOS


Using Secure Shell version 0.8.27 app for ChromeOS.

The only text in the Secure Shell app that shows what it is, where it came from, or promises any information about how to use the app is printed in the Terminal window when the app is opened:

Welcome to Secure Shell version 0.8.27.
Answers to Frequently Asked Questions: http://goo.gl/TK7876

The goo.gl URL above expands to https://chromium.googlesource.com/apps/libapps/+/master/nassh/doc/faq.txt  which is a pointer into the Secure Shell app source code libraries at the Google Git repository:  
    https://chromium.googlesource.com/apps/libapps/+/master/

Cloud9

Install Cloud9 on local or remote computer, server, or raspberry pi --

2014-06-08

Internet Connection Sharing (ICS) using IPTABLES

Internet Connection Sharing - Simple iptables Example

#!/bin/sh 
# 
# internet connection sharing wlan0 is the gate way 
# eth0 is the lan port this might use a straight ethernet cable to a router wan port or a switch or a single PC
# 192.168.2.2 is the port that is being used by the lan for access I changed it to 192.168.2.254 and set fixed
# addresses for the wan and router
#
# change wlan0 to ppp0 and you can use this for mobile broadband connection sharing
#
ip link set dev eth0 up
ip addr add 192.168.2.1/24 dev eth0
sysctl net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o wlan0 -s 192.168.2.0/24 -j MASQUERADE
iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 3074 -j DNAT --to-destination 192.168.2.2
iptables -t nat -A PREROUTING -i wlan0 -p udp -m multiport --dports 88,3074 -j DNAT --to-destination 192.168.2.2
iptables -A FORWARD -i wlan0 -d 192.168.2.2 -p tcp --dport 3074 -j ACCEPT
iptables -A FORWARD -i wlan0 -d 192.168.2.2 -p udp -m multiport --dports 88,3074 -j ACCEPT

The article goes on to say...

If things go wrong, the following script should save you when things get badly messed up.

#!/bin/sh
# 
# rc.flush-iptables - Resets iptables to default values. 
# 
# Copyright (C) 2001 Oskar Andreasson 
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program or from the site that you downloaded it
# from; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
#
# Configurations
#
IPTABLES="/usr/sbin/iptables"
#
# reset the default policies in the filter table.
#
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -P OUTPUT ACCEPT
#
# reset the default policies in the nat table.
#
$IPTABLES -t nat -P PREROUTING ACCEPT
$IPTABLES -t nat -P POSTROUTING ACCEPT
$IPTABLES -t nat -P OUTPUT ACCEPT
#
# reset the default policies in the mangle table.
#
$IPTABLES -t mangle -P PREROUTING ACCEPT
$IPTABLES -t mangle -P POSTROUTING ACCEPT
$IPTABLES -t mangle -P INPUT ACCEPT
$IPTABLES -t mangle -P OUTPUT ACCEPT
$IPTABLES -t mangle -P FORWARD ACCEPT
#
# flush all the rules in the filter and nat tables.
#
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -t mangle -F
#
# erase all chains that's not default in filter and nat table.
#
$IPTABLES -X
$IPTABLES -t nat -X
$IPTABLES -t mangle -X