jerous' ::1

Listing of these articles
2016-12-29 [E] [D]
linux Comments 0

I was trying out to see if I could use my [new tablet](/2016/11/26/lenovo-yoga-pro-tab3 Lenovo Yoga Pro Tab3 10) as an external screen and projector.

The most obvious method to try this is using VNC (I haven't tried anything else yet). The script below will setup everything for you.

On the server I used TigerVNC's x0vncserver. On the host side I used AndroidVNC. For anything that is not moving (like viewing photos and reading text) this approach is doable over wifi, however watching video will require you to either cut in color depth or have a lot of patience :)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

# Source:
# * http://www.hitbits.net/2016/02/26/use-an-android-tablet-as-a-second-monitor-for-linux-pc/

# NOTE if something goes wrong, use next command to reset the screen to the default
# xrandr -s 0

SCREEN_W=1920 # Alternate
W=2560; H=1600; R=60.00 # Lenovo Yoga Tab Pro 3
W=800; H=600; R=60.00 # Lenovo Yoga Tab Pro 3 projector
VIRTUAL_MODE=${W}x${H}_${R}
MODELINE=$(gtf $W $H $R|g\rep Modeline|cut -f4- -d' ')
CUR_SCREEN=$(xrandr|grep ' connected '|cut -f1 -d' ')

xrandr --newmode $MODELINE
xrandr --addmode VIRTUAL1 "$VIRTUAL_MODE"
xrandr --output VIRTUAL1 --mode "$VIRTUAL_MODE" --right-of "$CUR_SCREEN"

IP=$(ifconfig  |grep '192\.168\|10\.0' | awk '{print $2}')
echo foo | vncpasswd -f > /tmp/vncpasswd
echo
echo "Connect from your Android device using a VNC client to "
echo "$IP : 5900 using the password 'foo' (no quotes)"
echo

# Part of tigervnc
x0vncserver --Geometry=${W}x${H}+${SCREEN_W}+0 --PasswordFile=/tmp/vncpasswd

2016-11-26 [E] [D]
hardware Comments 0

My new toy is a Lenovo Yoga Pro Tab3 10. My older tablet's battery was getting flakey, and I accidentally broke the screen (it's still usable though).

A while ago I was pondering about buying a digital projector (rather than a TV), but they seemed quite expensive. This tablet has an internal, simple projector, so it's a good way to see if I would use it a lot.

Some reviews: 1 2 3 4

So far it seems like a pretty nice tablet, and the projector is better than I expected (for my requirements). I only hope it will last as long as my tablet, as I haven't found any data about the lifespan of the projector.

2016-11-20 [E] [D]
books Comments 0

Stephen King

11/22/63 (2011)

11/22/63 cover

read more...

2016-10-31 [E] [D]
hardware,linux Comments 0

Bought a eID & smart card reader, because it seems like something you need urgently at night when all stores all closed.

It works, installing pcsclite, and then starting it using

1
 sudo pcscd --debug --foreground

To use the eID: first install the eID middleware (eid-mw) from http://eid.belgium.be/nl/je_eid_gebruiken/de_eid-middleware_installeren/linux (just a configure && make && make install) and download the eid-viewer.jar.

1
java -jar eid-viewer.jar
should now show the contents of your eID.

To use the eID in firefox: install eID Belgium firefox addon (in firefox), and check if you can open it in e.g. https://certif.iamfas.belgium.be/fasui/login/eidservice.

I was looking for a web-based project that allows one to do CRUD operations in an easy way, without needing a complex GUI such as phpMyAdmin or adminer. A very limited amount of good solutions were found, so I set out to create my own project: PHP MySQL Explorer (PME for short?)

The project is very easy to setup: git clone https://git.jerous.org/php-mysql-explorer or just download the latest version.

Rename the file index.php to something else (or just keep it that way), add a configuration file, which has the same name but the suffix .inc.php instead of .php, and add the following minimal data to the file

1
2
3
4
5
6
<?php

$host='localhost'; // where to connect to -- usually something like localhost
$db=''; // MySQL database name
$user=''; // MySQL username
$pw=''; // MySQL password for the user

Now you can just browse, edit, update and delete rows on all tables. If the database is designed with foreign keys, it will take those into account and create links where necessary.

Features

  • CRUD operations on tables in a basic but function GUI
  • Written in PHP *(dunno if that's a feature?) using PDO
  • Automatically creates links using the foreign key constraints (hence the database must be a InnoDB, and not a MyISAM)
  • Additional user system
  • Permissions for users for any of the CRUD operations on any table using a simple rule system
  • Configurable (and includes a configuration generator)

You can try it out on the demo page, with username demo and password demo.

2016-09-20 [E] [D]
bash,linux,osx,bsd Comments 0

ssh-copy-id is a very useful tool to quickly gain passwordless access to a server. However, it does not always work right away.

I've encountered this problem enough times to have written a script that will check for possible problems.

It requires 1 argument, the host to connect to, and will request for a password on the command line. Then it will check all of the following, which are known to cause some problems:

  • are there public key files?
  • sshd_config at the host
  • permission of .ssh/authorized_keys, ~/.ssh and ~

The source code can be view below, and downloaded on this link.

The requirements:

  • expect
  • ssh (obviously)
  • perl (to obtain permissions in a OS-agnostic way)

If you know other causes of problems, please inform me so I can add them :)

read more...

2016-09-19 [E] [D]
linux,bash Comments 0

Encountered this problem after upgrading my linux system, so I keep this here for future reference, and in case someone else also has this message:

1
bash: have: command not found

(or in Dutch:

1
bash: have: opdracht niet gevonden
)

Quick fix (for me at least): sudo $EDITOR /usr/share/bash-completion/bash_completion, search for "unset -f have", which is somewhere at the end of the file, and comment out the lines that have "unset have" and "unset -f have".

How did I find this out?

1
bash -x
will run bash in debug mode, meaning it will print out every command it executes. Somewhere along the lines it displayed this strange "unset have" line. Going back in the history, I found out that /usr/share/bash-completion/bash_completion was the last include, so it must've been that file!

2016-09-07 [E] [D]
music,live,record,jazz Comments 0

Chick Corea seems to come here quite often (well, he has a busy schedule) I like his playing, so whenever I have the chance to go, I'll be there -- especially if it's in a beautiful and small cosy venue like Openluchttheater Rivierenhof!

Today he was there with famous bass player Avishai Cohen and drummer Marcus Gilmore.

Stream it!

When you can hear a relevant musician, whom your parents have danced to in their youths, then you know you are dealing with a living legend. Like Van Morrison :)

Also at the Lokerse Feesten was Arno, one of Belgian's rock heroes! What a day :)

Obviously, I have a recording for each of them at http://audio.jerous.org/2016-lokerse-feesten! The Arno one is of very lousy quality though.

2016-07-31 [E] [D]
history-pics Comments 0

Never before published (well, now they are ...) photos from National Geographic's archive

http://brightside.me/creativity-photography/25-unpublished-photos-from-the-national-geographic-archives-105605/

Listing of these articles
[printer friendly] [static version] [Post listing] [Page listing] [Tags: music tab jazz travel wdb europe code programming live youtube record ]