Sep 19, 2016

How to activate the telnet client on Windows 8.1

PuTTY supports the telnet protocol, but there is also a telnet client directly from Windows 8.1
available.
The useful link for me was here: https://support.microsoft.com/de-at/kb/2801292.


<Windows>-<X> -> Control Panel -> Programs -> "Turn Windows features on or off". In the
upcoming list you can activate the telnet client:


Sep 16, 2016

Touchpad on Dell Lattitued E7450 always moved cursor during typing

After getting a new Laptop "Dell LATTITUDE E7540" with Windows 8.1 PRO, I had very often
a problem when coding in an IDE or writing text in an editor or using Word.

During Coding the hand hit somehow the touchpad and the mouse cursor moved and a
typed somewhere in a completely different place. ( Ctrl-Z for Undo was always a great help ;-)

After a little bit searching for deactivating the touchpad ( which is not my favorite, because of
using the laptop without a mouse ), I found the Settings:



Start the Control-Panel and select "Hardware and Sound" in the next window select the link for
the mouse ( see step 1 above ) after this selct 2 - the Dell Touchpad settings and then on the slider,
I moved to the max ( 3 ) and now the touchpad doesn't react so far on my typing.

Sep 15, 2016

Visual Studio Code editor opens a new instance window on every double click on a file

Visual Studio Code is an Editor similar to the whole Visual Studio IDE, but just an editor with a
lot of plugins.

When VS Code is assigned as an editor to an extension, you can double-click on a file in an explorer
or other file manager and the file will be opened in the editor.

Per Default a new window instance is opened for every file you click.
The VS Code supports tabbed editing and to activate this also for opening files via the explorer you
have to set a user option.

The helpful link for me was found here
 https://code.visualstudio.com/docs/customization/userandworkspace

Open the User Settings via File->Preferences->User Settings and insert the following configuration:

    "window.openFilesInNewWindow": false,

After this all files are opened in a single instance window with tabbed display:


Sep 2, 2016

automatic regular Backup of directories in Windows

On my former Fedora 23 Laptop I used backhttp://backintime.le-web.org/intime to do a regular backup on an external USB drive.

Now I had to switch over to Windows 8.1 and was searching for a backup tool, which does it's job
without any manual intervention.

My current tool is Areca Backup.

The tool provides after the download a GUI to configure the backup job:


This is the overview of the workbench with a defined Backup scenario.

The Dialog window shows the path to do the backup and allows to set the source directories to backup and so on.
I disabled the ZIP-Function for the backup to have direct access to the backup files.

By using the context menu you can create a Script, which can be used to automate the backup:

In the following dialog you can configure the backup and the name of the script to be created.



This generated script can be used to create a scheduled task:
In the Task Scheduler add a new task and configure the generated script to be executed:

After some runs of the task you see in the backup folder each backup.



Aug 21, 2016

Mounting a host directory into a docker container when you are using docker-machine on windows

I used docker before on my Fedora 23 laptop having some images for doing Development tests.

Now I have to use Windows 8.1 on my laptop. The docker toolbox is here a great help, to get a
docker engine on the windows host.

Docker Toolbox creates a Linux host in a VirtualBox VM.

To access the docker host, you have to set the environment in the shell:
docker-machine.exe env <Machine-Name> --shell powershell

This shows hints,on how to set the environment in a PowerShell to directly talk to the docker daemon.

Everything else on interacting with the container works like talking to a remote docker host.

The Docker Hub is a docker registry providing prebuilt images.
From there I used the MySQL-Image, which is providing a full MySQL DB. The data of the database
is stored in the container if you just start the image:

docker run -d --name mysql_local mysql
docker inspect mysql_local

shows you the configuration of the container. Somewhere in the output, you find, that the image
defines a volume, where you can redirect the content of the database to a local folder.


            "Image": "mysql",            "Volumes": {                "/var/lib/mysql": {}

On Fedora, I just used the '-v' option to mount a local directory of the laptop and I had the persistent
store, even on rebuilding the container, when using e.g. docker-compose.

With docker-machine from the Docker Toolbox, the data would be stored in the VM of Virtualbox.
When recreating the VM, the data would be lost.

There is one directory, the VM from the Docker Toolbox mounts automatically into the VM Linux:
C:\Users is mounted to /c/Users


Using e.g.:

docker run -d --name mysql -e MYSQL_ROOT_PASSWORD=db -e MYSQL_USER=spring -e MSQL_USER_PASSWORD=spring -e MYSQL_DATABASE=spring -P -v /c/Users/eer/docker_volumes/mysql_db:/var/lib/mysql mysql

allows you to mount a local Windows directory into the container and store the database.

You can also mount other directories, but  this needs manual steps in configuring the VirtualBox VM to share the directory and configure the VM Box Linux to mount it.


Mounting a host directory into a docker container when you are using docker-machine on windows

I used docker before on my Fedora 23 laptop having some images for doing Development tests.

Now I have to use Windows 8.1 on my laptop. The docker toolbox is here a great help, to get a
docker engine on the windows host.

Docker Toolbox creates a Linux host in a VirtualBox VM.

To access the docker host, you have to set the environment in the shell:
docker-machine.exe env <Machine-Name> --shell powershell

This shows hints,on how to set the environment in a PowerShell to directly talk to the docker daemon.

Everything else on interacting with the container works like talking to a remote docker host.

The Docker Hub is a docker registry providing prebuilt images.
From there I used the MySQL-Image, which is providing a full MySQL DB. The data of the database
is stored in the container if you just start the image:

docker run -d --name mysql_local mysql
docker inspect mysql_local

shows you the configuration of the container. Somewhere in the output, you find, that the image
defines a volume, where you can redirect the content of the database to a local folder.


            "Image": "mysql",            "Volumes": {                "/var/lib/mysql": {}

On Fedora, I just used the '-v' option to mount a local directory of the laptop and I had the persistent
store, even on rebuilding the container, when using e.g. docker-compose.

With docker-machine from the Docker Toolbox, the data would be stored in the VM of Virtualbox.
When recreating the VM, the data would be lost.

There is one directory, the VM from the Docker Toolbox mounts automatically into the VM Linux:
C:\Users is mounted to /c/Users


Using e.g.:

docker run -d --name mysql -e MYSQL_ROOT_PASSWORD=db -e MYSQL_USER=spring -e MSQL_USER_PASSWORD=spring -e MYSQL_DATABASE=spring -P -v /c/Users/eer/docker_volumes/mysql_db:/var/lib/mysql mysql

allows you to mount a local Windows directory into the container and store the database.

You can also mount other directories, but  this needs manual steps in configuring the VirtualBox VM to share the directory and configure the VM Box Linux to mount it.


Mounting a host directory into a docker container when you are using docker-machine on windows

I used docker before on my Fedora 23 laptop having some images for doing Development tests.

Now I have to use Windows 8.1 on my laptop. The docker toolbox is here a great help, to get a
docker engine on the windows host.

Docker Toolbox creates a Linux host in a VirtualBox VM.

To access the docker host, you have to set the environment in the shell:
docker-machine.exe env <Machine-Name> --shell powershell

This shows hints,on how to set the environment in a PowerShell to directly talk to the docker daemon.

Everything else on interacting with the container works like talking to a remote docker host.

The Docker Hub is a docker registry providing prebuilt images.
From there I used the MySQL-Image, which is providing a full MySQL DB. The data of the database
is stored in the container if you just start the image:

docker run -d --name mysql_local mysql
docker inspect mysql_local

shows you the configuration of the container. Somewhere in the output, you find, that the image
defines a volume, where you can redirect the content of the database to a local folder.


            "Image": "mysql",            "Volumes": {                "/var/lib/mysql": {}

On Fedora, I just used the '-v' option to mount a local directory of the laptop and I had the persistent
store, even on rebuilding the container, when using e.g. docker-compose.

With docker-machine from the Docker Toolbox, the data would be stored in the VM of Virtualbox.
When recreating the VM, the data would be lost.

There is one directory, the VM from the Docker Toolbox mounts automatically into the VM Linux:
C:\Users is mounted to /c/Users


Using e.g.:

docker run -d --name mysql -e MYSQL_ROOT_PASSWORD=db -e MYSQL_USER=spring -e MSQL_USER_PASSWORD=spring -e MYSQL_DATABASE=spring -P -v /c/Users/eer/docker_volumes/mysql_db:/var/lib/mysql mysql

allows you to mount a local Windows directory into the container and store the database.
You can also mount other directories, but  this needs manual steps in configuring the VirtualBox VM to share the directory and configure the VM Box Linux to mount it.


Mounting a host directory into a docker container when you are using docker-machine on windows

I used docker before on my Fedora 23 laptop having some images for doing Development tests.

Now I have to use Windows 8.1 on my laptop. The docker toolbox is here a great help, to get a
docker engine on the windows host.

Docker Toolbox creates a Linux host in a VirtualBox VM.

To access the docker host, you have to set the environment in the shell:
docker-machine.exe env <Machine-Name> --shell powershell

This shows hints,on how to set the environment in a PowerShell to directly talk to the docker daemon.

Everything else on interacting with the container works like talking to a remote docker host.

The Docker Hub is a docker registry providing prebuilt images.
From there I used the MySQL-Image, which is providing a full MySQL DB. The data of the database
is stored in the container if you just start the image:

docker run -d --name mysql_local mysql
docker inspect mysql_local

shows you the configuration of the container. Somewhere in the output, you find, that the image
defines a volume, where you can redirect the content of the database to a local folder.


            "Image": "mysql",            "Volumes": {                "/var/lib/mysql": {}

On Fedora, I just used the '-v' option to mount a local directory of the laptop and I had the persistent
store, even on rebuilding the container, when using e.g. docker-compose.

With docker-machine from the Docker Toolbox, the data would be stored in the VM of Virtualbox.
When recreating the VM, the data would be lost.

There is one directory, the VM from the Docker Toolbox mounts automatically into the VM Linux:
C:\Users is mounted to /c/Users


Using e.g.:

docker run -d --name mysql -e MYSQL_ROOT_PASSWORD=db -e MYSQL_USER=spring -e MSQL_USER_PASSWORD=spring -e MYSQL_DATABASE=spring -P -v /c/Users/eer/docker_volumes/mysql_db:/var/lib/mysql mysql

allows you to mount a local Windows directory into the container and store the database.
You can also mount other directories, but  this needs manual steps in configuring the VirtualBox VM to share the directory and configure the VM Box Linux to mount it.


May 20, 2016

creating a link in windows for a directory

The apache cxf maven plugin does not completely honor the maven structure for generated sources.

Netbeans gives a hint in the project properties that generated sources should be placed under

target/generated-sources/<plugin>

The cxf-codegen-plugin places the sources for the customer projecct under generated and therefore
netbeans shows errors in the code.

Now windows also has the functionality to create links, but the command is only in cmd.exe and not
in the powershell.

Why????


mklink /J cxf ..\generated\cxf

My source for the mklink is from here.
In a cmd.exe does the trick and netbeans doesn't show any errors in the source code.

How to get the focus into a window without raising it into the front on windows 8

On my linux Gnome-Desktop I had the focus moving with the mouse ( no clicking ) and also not
raising the window.

E.g. you have a console in the background  and a window in front and just to type something in
the console without raising it was a simple example I used often.

There is a trick for windows, with some registry editing:

see here: http://winaero.com/blog/turn-on-xmouse-active-window-tracking-focus-follows-mouse-pointer-feature-in-windows-8-1-windows-8-and-windows-7/

May 18, 2016

Accessing the Registry from the Powershell

With powershell it is possible to access the window registry directly from the commandline
with the default commands:

e.g:

PS C:\Users\eer> cd HKLM:
PS HKLM:\> cd SOFTWARE
PS HKLM:\SOFTWARE> Get-ChildItem


    Hive: HKEY_LOCAL_MACHINE\SOFTWARE


Name                           Property
----                           --------
7-Zip                          Path : C:\Program Files\7-Zip\

setting environment variables in a powershell session

The powershell is the new replacement for cmd.exe.

To set variables you have multiple options:


setting the variable ew:

 Set-Item env:ew 'hallo'

or to set in an other way:

PS C:\Users\eer> $env:ANDROID_HOME='C:\DevTools\Android\sdk'
PS C:\Users\eer> $env:target='ewald'