HP Printer install – HP LaserJet Pro MFP M26nw – ubuntu

1. Download and install https://developers.hp.com/hp-linux-imaging-and-printing/gethplip
2. List on terminal the scanner/printer

 scanimage -L

device `hpaio:/net/HP_LaserJet_Pro_MFP_M26nw?ip=′ is a Hewlett-Packard HP_LaserJet_Pro_MFP_M26nw all-in-one
3. scanimage -d “hpaio:/net/HP_LaserJet_Pro_MFP_M26nw?ip=” –format tiff > image.tiff
4. convert to pdf
scanimage -d “hpaio:/net/HP_LaserJet_Pro_MFP_M26nw?ip=” –format png –resolution 600 | convert png:- scan.pdf

Ubuntu dbVis – No suitable Java Virtual Machine could be found on your system


No suitable Java Virtual Machine could be found on your system.
The version of the JVM must be at least 1.8 and at most 9.
Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.


sudo apt update && sudo apt autoremove -y && sudo apt clean && sudo apt dist-upgrade -y && sudo add-apt-repository ppa:webupd8team/java -y && sudo apt update && sudo apt install oracle-java8-installer

Ubuntu 17.10 expo and genymotion errors and solutions


Switched to a LAN URL because the tunnel appears to be down. Only devices in the same network can access the app. You can restart the project to try reconnecting.


Due to some bug you must start xde (expo development environment) before genymotion. Also i needed to run xde from root user login. (not su or sudo ).
UPDATE: The following problem of adb version fixed this problem too.



Couldn’t start project on Android: could not install *smartsocket* listener: Address already in use
ADB server didn’t ACK
* failed to start daemon *
error: cannot connect to daemon


the adb version on your system is different from the adb version on the android sdk platform-tools

1. check sys adb version

# adb version
Android Debug Bridge version 1.0.39

2. check sdk adb version

# cd /root/Android/Sdk/platform-tools
# ./adb version
Android Debug Bridge version 1.0.32

3. copy
# rm /usr/bin/adb
# sudo cp /root/Android/Sdk/platform-tools/adb /usr/bin/adb


Error: EACCES: permission denied, open ‘/tmp/haste-map-react-native-packager-1-8963e41d25a58e25717f5939e5144fc2

Solution: sudo rm /tmp/haste-map-react-native-packager-1-8963e41d25a58e25717f5939e5144fc2

The development server returned response error code: 500

For me this error was resolved running yarn in the project folder. The cause may have been due to the fact that I’d switched branches and some of the packages were not installed.

Reset windows 8 password from Ubuntu – Metadata kept in Windows cache, refused to mount

It was an interesting task to reset windows 8 password on a machine running Ubuntu . When I tried to (re)mount the disk I got the following problem and after googling for a while I found that there was no viable solution but to reinstall windows. However I successfully reset the password by using the following techniques.

I removed hard disk from the windows computer and attached it to my laptop running Ubuntu 17.10. By default Ubuntu mounts new hard disk as read only (or if any error) and therefore I have to remount the disk as read-write but I got the following error during mounting.

Metadata kept in Windows cache, refused to mount. ..

Windows machine had errors or hibernated files and therefore did not allow to mount as read-write. I used the following commands (alternatively, please unmount all partitions if mounted auto by Linux) a couple of times to fix this.

   sudo mount -t ntfs-3g -o remove_hiberfile /dev/sda5  ~/win8/
   sudo ntfsfix /dev/sda5

After this I installed the command line tool by:

  sudo apt install chntpw

Now first list the Windows users and then make password blank by:

   cd ~/win8/Windows/System32/config/
   sudo chntpw -l SAM
   sudo chntpw -u Administratör SAM

The funny part starts now. The administrator user was written with Swedish character ‘ö’ i.e Administratör and it was’nt recognized as in the last command above.

A work around is to use RID which is displayed when listing Windows users ( command : sudo chntpw -l SAM ).

   sudo chntpw -u 0x01f5 SAM

From the menu shown after the above command choose the one with blanking password, press q and (yes) for saving changes.

virtualbox ubuntu boot menu delay and reset password

To increase boot menu delay, first get a list of vms by typing the following in a terminal.

 VBoxManage list vms

You can change the delay by typing:

VBoxManage modifyvm "You virtual machine name from above command" --bioslogodisplaytime 10000

Now start/restart the Ubuntu machine and hold down the left SHIFT key from keyboard unless you get the boot menu. Select ‘root …’ from menu.
We need need to remount the disk in read-write mode:

mount -rw -o remount /

Change the password of the required user, lets say user1:

passwd user1

Install Android Studio 3.0 on Ubuntu 17.10

Use the following steps to install android studio 3.0 on Ubuntu 17.10.

   sudo add-apt-repository ppa:maarten-fonville/android-studio
   sudo apt-get update
   sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
   cd ~/Android/Sdk/emulator/lib64/libstdc++
   sudo mv libstdc++.so.6 libstdc++.so.6.og
   sudo ln -s /usr/lib64/libstdc++.so.6 .