Category: Linux

  • Pi-Hole DNS AdBlocker

    Pi-Hole DNS AdBlocker

    Install

    Run the following script:

    curl -sSL https://install.pi-hole.net | bash

    Update

    Just run the following script:

    pihole -up
  • Running Ubuntu full-screen in Virtualbox

    Running Ubuntu full-screen in Virtualbox

    Install Ubuntu in Virtualbox. It’s not directly possible to run Native full-screen resolution.

    Follow the next steps to solve this problem:

    • Select from ‘Devices’ in the titlebar the option ‘Guest additions’.
    • Reboot the virtual machine.
    • Press the host-key (by default right-CTRL) and F simultainously.

    The screen turns full-screen Ubuntu in native resolution.

  • SSH port change

    SSH port change

    Ubuntu / Debian

    Open the SSH configuration file with your favorite text editor and find the lines that specifies the SSH port.

    nano /etc/ssh/sshd_config

    Default value:

    #Port 22

    Uncomment the relevant line by removing the # sign and change the default port 22 to the one that you want to use. In this article we will use port 1012.

    Port 1012

    Save the changes and exit.

    Restart SSH service

    Restart the SSH service for the changes to take effect.

    service sshd restart
  • OpenVPN Client installation in Ubuntu

    Open the terminal.
    Update the software repositories and install the network manager.

    $ sudo apt-get update
    $ sudo apt-get install network-manager-openvpn

    Copy your VPN files  (*.ovpn and certificate files) to a known location on your computer.

    Open network connections.
    Edit connections
    Load configuration
    Select your  *.ovpn file.

  • Bookmark network share

    Open nautilus explorer.
    Go to network → Connect to server.
    Enter path, for example:

    smb://192.168.0.10

    Enter username, domain and password.
    Rename the bookmark as you wish with right-click → rename.

  • Keepass for Ubuntu

    Add the repository to the software centre. The standard version in software centre is old.

    ppa:jtaylor/keepass

    Search for ‘KeepassX’ and install.

    Auto fill-in

    By default, you can’t fill in the user credantials automatically. To make this possible, you have to install another program called ‘xdotool’.

    $ sudo apt-get install xdotool
  • Ubuntu 14.04 default brightness

    Laptop users still have the backlight issue in Ubuntu 14.04. Every time Ubuntu boots up you get the maximum level of screen brightness.

    Here’s a workaround by adding a startup script which will automatically adjust screen brightness when Ubuntu boots up.

    To get started:

    Preparation: Open your file browser and navigate to “Computer→ sys → class → backlight” directory. You’ll see two or three folders there.

    In each folder there’s a file called actual_brightness, you can see its content (brightness value) through the thumbnail icon.

    actual-brightness

    Remember them and do:

    1.  Change your screen brightness through Fn + Arrow key.
    2. Check out the actual_brightness files in each folder (Re-open each folder to refresh the value).
    3. Does the value change?
    4. Remember the folder name in which the value of actual_brightness changes.
    5. Replace acpi_video0 in below commands with that folder name

    1. Press Ctrl+Alt+T on keyboard to open the terminal. When it opens, run the command below will give you the maximum level of your laptop backlight:

    $ cat /sys/class/backlight/acpi_video0/max_brightness

    Mine is 9, so I can set backlight level from 0 to 9.

    2. Run the command below one by one. You’ll get the super user privilege and open the /etc/rc.local file, a script executed at the end of each multiuser runlevel, with gedit editor.

    $ sudo -i
    $ gedit /etc/rc.local

    Add the line below before the last. Change the number 0 to the brightness level you want.

    $ echo 0 > /sys/class/backlight/acpi_video0/brightness
    

    That’s it. Enjoy!

    (source: http://ubuntuhandbook.org/index.php/2014/04/save-screen-brightness-settings-in-ubuntu-14-04/)

  • ClamAV installation

    ClamAV is by default installed in Ubuntu. You want to be sure that you have the latest version and update.

    Clamav will sometimes have trouble downloading updates for some reason or another. I’ll show you how to fix this in Ubuntu Linux! First, stop clamav and freshclam:

    $ sudo /etc/init.d/clamav-daemon stop
    $ sudo /etc/init.d/clamav-freshclam stop

    Next we are going to manually download the latest signatures from clamav’s website and place them into the proper location in Ubuntu. In Ubuntu Linux, clamav signatures are located in /var/lib/clamav/.

    $ wget http://database.clamav.net/main.cvd && sudo cp main.cvd /var/lib/clamav/
    $ wget http://database.clamav.net/daily.cvd && sudo cp daily.cvd /var/lib/clamav/
    $ wget http://database.clamav.net/bytecode.cvd && sudo cp bytecode.cvd /var/lib/clamav/

    Next, fix some permissions:

    $ sudo chown -R clamav:clamav /var/lib/clamav/

    Finally, start clamav:

    $ sudo /etc/init.d/clamav-daemon start
    $ sudo /etc/init.d/clamav-freshclam start

    Lastly you may want to check the clamav logs to make sure clamav is updating OK.

    $ cat /var/log/clamav/freshclam.log

    Bron: https://scottlinux.com/2012/09/04/clamav-signatures-not-updating-ubuntu-linux/

    ClamTK GUI install

    Many people prefer graphical user interfaces. That’s why we install a GUI.
    Go to the following website, and look for the latest version of the *.deb file:
    https://bitbucket.org/dave_theunsub/clamtk/downloads

    Open the file in Software Centre. Click install.

  • Chirp installation in Ubuntu

    CHIRP is a free, open-source tool for programming your amateur radio. It supports a large number of manufacturers and models, as well as provides a way to interface with multiple data sources and formats.

    This is super quick and easy if you’re running a reasonably new version of Ubuntu. Simply run the following in a terminal:

    $ sudo apt-add-repository ppa:dansmith/chirp-snapshots
    $ sudo apt-get update
    $ sudo apt-get install chirp-daily

    Look for CHIRP under your distribution’s applications menu.

    Serial port permissions

    Note that you may need to adjust permissions on the /dev/tty(something) device, or add your users who want to use Chirp to the “dialout” group in order to let non-privileged users access the serial device.

    This issue is often indicated by an “access denied” error when accessing serial port.

    On Ubuntu, for example, this is accomplished with:

    $ sudo usermod -aG dialout (username)
    
    Home the Chirp project page
  • Canon printer and scanner in Ubuntu

    Canon Printer Driver & ScanGear MP For Ubuntu 14.04
    December 5, 2014

    Canon scangear for Ubuntu 14.04

    Below devices are supported:

    • bjf9000, bjf900, bjs300, bjs500, bjs700 series
    • e500, e510, e600, e610 series
    • i250, i255, i550, i560, i850, i860, i950, i990 series
    • ip100, ip1800, ip1900, ip2200, ip2500, ip2600, ip2700, ip3000, ip3300, ip3500, ip3600, ip4000, ip4200, ip4300, ip4500, ip4600, ip4700, ip4800, ip4900, ip5000, ip5200, ip6600, ip7200, ip7500, ip8500, ip90 series
    • ix6500 series
    • mg2100, mg2200, mg3100, mg3200, mg4100, mg4200, mg5100, mg5200, mg5300, mg5400, mg6100, mg6200, mg6300, mg8100, mg8200 series
    • mp140, mp160, mp190, mp210, mp230, mp240, mp250, mp270, mp280, mp490, mp495, mp500, mp510, mp520, mp540, mp550, mp560, mp600, mp610, mp620, mp630, mp640, mp750, mp780 series
    • mx320, mx330, mx340, mx350, mx360, mx370, mx390, mx410, mx420, mx430, mx450, mx510, mx520, mx710, mx720, mx860, mx870, mx880, mx890, mx920 series
    • pixmaip1000, pixmaip1500 series.
    • pixus250, pixus255, pixus550, pixus560, pixus850, pixus860, pixus950, pixus990 series
    • pixusip3100, pixusip4100, pixusip8600 series

    Install Canon Drivers / ScanGear in Ubuntu 14.04:

    1. To get started, press Ctrl+Alt+T on keyboard to open terminal. When it opens, paste the command below and hit enter to run:

    $ sudo add-apt-repository ppa:inameiname/stable

    Type in your user password when it asks and hit Enter to continue. This will add the PPA repository into your system.

    2. After that, open Synaptic Package Manager from the Unity Dash. If you don’t find it, search for and install it from Ubuntu Software Center.

    Do: Click the Reload button to refresh your system cache.

          To install a printer driver:
              In Quick filter box, type in cnijfilter.
          To install a ScanGear:
              In Quick filter box, type in scangearmp.

    Select a package in the result list that matches your device. Right-click on the package and select “Mark for Installation” Finally click on the “Apply” button to install the driver.

    Once the printer and scanner drivers are installed, connect your device to the computer and start Printers utility test if it works. And launch the Simple Scan utility and select your scanner from app menu Documents → Preferences → Scan Source to test if the scanner works.

    Source: http://ubuntuhandbook.org/index.php/2014/12/canon-driver-scangear-mp-ubuntu-14-04/