Set up HP 1020 printer in Linux Mint 18 / Ubuntu

Using open source drivers Follow the instruction from http://foo2zjs.rkkda.com/ or use my clone on git https://github.com/serge-m/foo2zjs.git: Clone the repo git clone https://github.com/serge-m/foo2zjs.git foo2zjs cd foo2zjs Compile: make Get extra files from the web, such as .ICM profiles for color correction, and firmware. Select the model number for your printer: ./getweb 1020 # Get HP LaserJet 1020 firmware file Install driver, foomatic XML files, and extra files: sudo make install Configure hotplug (USB; HP LJ 1000/1005/1018/1020)....

January 9, 2017 · SergeM

Shell commands (page moved)

Page moved here

January 8, 2017 · SergeM

Add service in ubuntu

Create a file for service your-service touch /etc/systemd/system/your-service.service Let’s assume you want to run docker container there. Put following text in the file: [Unit] Description=YourService After=docker.service Requires=docker.service [Service] TimeoutStartSec=0 Restart=always ExecStartPre=-/usr/bin/docker stop %n ExecStartPre=-/usr/bin/docker rm %n ExecStart=/usr/bin/docker run -d -p 8080:8080/tcp --name %n your_docker_image [Install] WantedBy=multi-user.target Here we first stop and delete the docker container. If it doesn’t exist we continue (there is a “-” in before the command). Run...

January 8, 2017 · SergeM

OpenVPN server in cloud using docker

links: How To Run OpenVPN in a Docker Container on Ubuntu 14.04 OpenVPN for Docker Connection via OPenVPN is slow for https Try the following advice The udp connection is perfect with these parameters (in client config): mssfix 1200 tun-mtu 1200 DNS doesn’t work through VPN Symptoms: Openvpn connects, you can ping web sites by IP address, but you cannot ping them by name (like ping google.com) Solution: This is a bug that’s fixed in upstream NetworkManager....

January 7, 2017 · SergeM

Installing java 8 on linux mint 17.3

Download JDK for Java 8 from Oracle’s web-site. Unpack archive to let’s say /usr/lib/jvm/jdk1.8.0/ Update java alternatives: sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0/bin/java" 1 sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0/bin/javac" 1 sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.8.0/bin/javaws" 1 Select alternatives: sudo update-alternatives --config java Select an option corresponding to new path. Do the same for sudo update-alternatives --config javac sudo update-alternatives --config javaws Update JAVA_HOME using gksudo gedit /etc/environment Don’t forget to rerun terminal or reboot....

December 7, 2016 · SergeM

terminal setup in linux mint

Installation sudo apt-get install tmux Commands In tmux, hit the prefix ctrl+b (my modified prefix is ctrl+a) and then: ###Sessions :new<CR> new session s list sessions $ name session ###Windows (tabs) c create window w list windows n next window p previous window f find window , name window & kill window Panes (splits) % vertical split " horizontal split o swap panes q show pane numbers x kill pane + break pane into window (e....

August 7, 2016 · SergeM

Mount yandex webdav on local dir

apt-get install davfs2 mkdir /mnt/yandex.disk mount -t davfs https://webdav.yandex.ru /mnt/yandex.disk/ # check: df -h /mnt/yandex.disk/

July 16, 2016 · SergeM

Mount windows shares in linux

Use sudo if needed Mount mkdir /mnt/share mount -t cifs //windows_machine_ip/share_name -o username=user,password=urPassword /mnt/share To allow write access one has to specify owning user and group: sudo mount -t cifs //windows_machine_ip/share_name -o uid=$(id -u),gid=$(id -g),user=,password= /mnt/share Unmount umount /mnt/shares

June 19, 2016 · SergeM

Autocomplete from the history in terminal

create a file .inputrc in your home directory and put there "\e[A": history-search-backward "\e[B": history-search-forward set show-all-if-ambiguous on set completion-ignore-case on # display possible completions using different colors to indicate their file types set colored-stats On TAB: menu-complete Restart your terminal. Now you can autocomplete from history using Up and Down keys. Source

June 2, 2016 · SergeM

Dropbox in linux mint

Hmm. It doesn’t work. I see the icon when i do dropbox stop dropbox start but I cannot click on it. Installed nemo-dropbox. At least now I have “Copy dropbox link” command in menu. Don’t forget to do $ killall nemo after installation to make it work. Final Solution source Use dropbox stop && dbus-launch dropbox start Or Do: opening ‘Preferences’ -> ‘Startup Applications’ and editing the dropbox entry so the command now reads:...

April 10, 2016 · SergeM