Linux

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

0 comments

Ubuntu – update to latest node and npm easily using NVM

curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh -o install_nvm.sh bash install_nvm.sh source ~/.profile nvm ls-remote nvm install 10.1.0 nvm current npm install npm -g npm -v node -v

0 comments

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

Error: 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. Solution: sudo apt update && sudo apt autoremove -y && sudo apt clean && sudo apt dist-upgrade -y && sudo […]

0 comments

Reload fstab – remount shares and devices

sudo mount -a

0 comments

sh: 1: cross-env: Permission denied – Fixed

The following fixes it. npm rebuild

0 comments

Ubuntu 17.10 expo and genymotion errors and solutions

Error: 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. Solution: Due to some bug you must start xde (expo development environment) before genymotion. Also i needed to run xde from root user login. […]

0 comments

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 […]

0 comments

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 […]

0 comments

Trace a process

To trace a process use: sudo netstat -4plunt sudo strace -p 1096

0 comments

PHP Startup: Unable to load dynamic library /usr/lib/php/20151012/mcrypt.so

You need to do the following steps to fix it. You need to change php version and library file name in the following command.   Find the files which is trying to load this library ( or any other ) grep -Hrv “;” /etc/php/7.0 | grep -E “extension(\s+)?=” | grep mcrypt Then comment out the […]

0 comments

Ubuntu PHP 7 install soap

sudo apt-get install php7.0-soap sudo systemctl restart apache2.service

0 comments

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 .

0 comments

Raspberry PI – motion cannot detect camera

Sometimes the camera is not detected even after enabling it via raspi-config. Run the following and then try motion. sudo modprobe bcm2835-v4l2  

0 comments

Fixed yoga 910 screen flicker in Ubuntu 17.10

To fix it, create or edit the file at /usr/share/X11/xorg.conf.d/20-intel.conf as root with the following: Section “Device” Identifier “Intel Graphics” Driver “intel” Option “AccelMethod” “sna” Option “TearFree” “true” Option “DRI” “3” EndSection And add this: GRUB_CMDLINE_LINUX_DEFAULT=”i915.enable_rc6=0″ to: /etc/default/grub cmd: sudo update-grub restart computer. Link

0 comments