Upgrade LibreOffice 7.1.5.2 on Linux Mint

Commands to install LibreOffice 7.1.5.2 from the Terminal in Linux Mint. Get link to most recent version from https://download.documentfoundation.org/libreoffice/stable/

# tip: cache password with "sudo ls"
# uninstall currently installed version
sudo apt-get remove libreoffice-*
sudo apt-get remove --purge libreoffice-*

# download and install LibreOffice
cd ~/Install
wget https://download.documentfoundation.org/libreoffice/stable/7.1.5/deb/x86_64/LibreOffice_7.1.5_Linux_x86-64_deb.tar.gz
tar -xvzf LibreOffice_7.1.5_Linux_x86-64_deb.tar.gz
cd LibreOffice_7.1.5.2_Linux_x86-64_deb/DEBS
sudo dpkg -i *.deb

# download and install offline help files 
cd ~/Install
wget https://download.documentfoundation.org/libreoffice/stable/7.1.5/deb/x86_64/LibreOffice_7.1.5_Linux_x86-64_deb_helppack_en-US.tar.gz
tar -xvzf LibreOffice_7.1.5_Linux_x86-64_deb_helppack_en-US.tar.gz
cd LibreOffice_7.1.5.2_Linux_x86-64_deb_helppack_en-US/DEBS
sudo dpkg -i *.deb

# delete extracted installation files
cd ~/Install
rm -rf ~/Install/LibreOffice_7.1.5.2_Linux_x86-64_deb
rm -rf ~/Install/LibreOffice_7.1.5.2_Linux_x86-64_deb_helppack_en-US

Upgrade LibreOffice 7.1.2.2 on Linux Mint

Commands to install LibreOffice 7.1.2.2 from the Terminal in Linux Mint. Get link to most recent version from https://download.documentfoundation.org/libreoffice/stable/

# tip: cache password with "sudo ls"
# uninstall currently installed version
sudo apt-get remove libreoffice-*
sudo apt-get remove --purge libreoffice-*

# download and install LibreOffice
cd ~/Install
wget https://download.documentfoundation.org/libreoffice/stable/7.1.2/deb/x86_64/LibreOffice_7.1.2_Linux_x86-64_deb.tar.gz
tar -xvzf LibreOffice_7.1.2_Linux_x86-64_deb.tar.gz
cd LibreOffice_7.1.2.2_Linux_x86-64_deb/DEBS
sudo dpkg -i *.deb

# download and install offline help files 
cd ~/Install
wget https://download.documentfoundation.org/libreoffice/stable/7.1.2/deb/x86_64/LibreOffice_7.1.2_Linux_x86-64_deb_helppack_en-US.tar.gz
tar -xvzf LibreOffice_7.1.2_Linux_x86-64_deb_helppack_en-US.tar.gz
cd LibreOffice_7.1.2.2_Linux_x86-64_deb_helppack_en-US/DEBS
sudo dpkg -i *.deb

# delete extracted installation files
cd ~/Install
rm -rf ~/Install/LibreOffice_7.1.2.2_Linux_x86-64_deb/DEBS
rm -rf ~/Install/LibreOffice_7.1.2.2_Linux_x86-64_deb_helppack_en-US

Upgrade LibreOffice 6.4.5.2 on Linux Mint

Commands to install LibreOffice 6.4.5.2 from the Terminal in Linux Mint. Get link to most recent version from https://www.libreoffice.org/download/

# tip: cache password with "sudo ls"
# uninstall currently installed version
sudo apt-get remove libreoffice-*
sudo apt-get remove --purge libreoffice-*

# download and install LibreOffice
cd ~/Install
wget https://download.documentfoundation.org/libreoffice/stable/6.4.5/deb/x86_64/LibreOffice_6.4.5_Linux_x86-64_deb.tar.gz
tar -xvzf LibreOffice_6.4.5_Linux_x86-64_deb.tar.gz
cd LibreOffice_6.4.5.2_Linux_x86-64_deb/DEBS
sudo dpkg -i *.deb

# download and install offline help files 
cd ~/Install
wget https://download.documentfoundation.org/libreoffice/stable/6.4.5/deb/x86_64/LibreOffice_6.4.5_Linux_x86-64_deb_helppack_en-US.tar.gz
tar -xvzf LibreOffice_6.4.5_Linux_x86-64_deb_helppack_en-US.tar.gz
cd LibreOffice_6.4.5.2_Linux_x86-64_deb_helppack_en-US/DEBS
sudo dpkg -i *.deb

# delete extracted installation files
rm -rf ~/Install/LibreOffice_6.4.5.2_Linux_x86-64_deb
rm -rf ~/Install/LibreOffice_6.4.5.2_Linux_x86-64_deb_helppack_en-US

Upgrade LibreOffice 6.2.5.2 on Linux Mint

Commands to install LibreOffice 6.2.5.2 from the Terminal in Linux Mint. Get link to most recent version from https://www.libreoffice.org/download/

# tip: cache password with "sudo ls"
# uninstall currently installed version
sudo apt-get remove libreoffice-*
sudo apt-get remove --purge libreoffice-*

# download and install LibreOffice
cd ~/Install
wget https://download.documentfoundation.org/libreoffice/stable/6.2.5/deb/x86_64/LibreOffice_6.2.5_Linux_x86-64_deb.tar.gz
tar -xvzf LibreOffice_6.2.5_Linux_x86-64_deb.tar.gz
cd LibreOffice_6.2.5.2_Linux_x86-64_deb/DEBS
sudo dpkg -i *.deb

# download and install offline help files 
cd ~/Install
wget http://download.documentfoundation.org/libreoffice/stable/6.2.5/deb/x86_64/LibreOffice_6.2.5_Linux_x86-64_deb_helppack_en-US.tar.gz
tar -xvzf LibreOffice_6.2.5_Linux_x86-64_deb_helppack_en-US.tar.gz
cd LibreOffice_6.2.5.2_Linux_x86-64_deb_helppack_en-US/DEBS
sudo dpkg -i *.deb

# delete extracted installation files
rm -rf ~/Install/LibreOffice_6.2.5.2_Linux_x86-64_deb
rm -rf ~/Install/LibreOffice_6.2.5.2_Linux_x86-64_deb_helppack_en-US

Upgrade LibreOffice on Linux Mint

Commands to install LibreOffice 6.2 from the Terminal in Linux Mint. Get link to most recent version from https://www.libreoffice.org/download/

# tip: cache password with "sudo ls"
# uninstall currently installed version
sudo apt-get remove libreoffice-core
sudo apt-get remove --purge libreoffice-core

# download and install LibreOffice
cd ~/Install
wget https://www.libreoffice.org/donate/dl/deb-x86_64/6.2.3/en-US/LibreOffice_6.2.3_Linux_x86-64_deb.tar.gz
tar -xvzf LibreOffice_6.2.3_Linux_x86-64_deb.tar.gz
cd LibreOffice_6.2.3.2_Linux_x86-64_deb/DEBS
sudo dpkg -i *.deb

# download and install offline help files 
cd ~/Install
wget http://download.documentfoundation.org/libreoffice/stable/6.2.3/deb/x86_64/LibreOffice_6.2.3_Linux_x86-64_deb_helppack_en-US.tar.gz
tar -xvzf LibreOffice_6.2.3_Linux_x86-64_deb_helppack_en-US.tar.gz
cd LibreOffice_6.2.3.2_Linux_x86-64_deb_helppack_en-US/DEBS
sudo dpkg -i *.deb

# delete extracted installation files
rm -rf ~/Install/LibreOffice_6.2.3.2_Linux_x86-64_deb
rm -rf ~/Install/LibreOffice_6.2.3.2_Linux_x86-64_deb_helppack_en-US

Command-line Compression Options

A comparison of command-line options to compress files using 7-Zip and native commands in Windows and Linux.

For testing I created a Word document of Lorem Ipsum and saved it in Word and PDF formats.

Windows Command Prompt

There is no built-in Windows program able to run in a CMD prompt that does what is wanted.* However, the open-source utility 7za.exe can be copied to any Windows folder without installation and be executed from a batch file.


Command: 7z.exe a -t7z target.7z C:\source\folder\

C:\_Tools\7zip\7za.exe a -t7z C:\Temp\Zip\test.7z C:\Temp\Zip\Files\

Changing the archive type to “zip” causes 7Zip to create a slightly larger archive.

Powershell Core on Windows and Linux

Powershell Core can be installed on both Windows and Linux. The following commands will work with Windows Powershell (deprecated) and Powershell Core (open-source).


# Command syntax:
# Compress-Archive -Path C:\source\folder -DestinationPath C:\target\target.zip
  
Compress-Archive -Path C:\Temp\Zip\files -DestinationPath C:\Temp\Zip\powershell.zip


# Command syntax:
# Compress-Archive -Path C:\source\folder -DestinationPath C:\target\target.zip
  
Compress-Archive -Path /home/joey/temp/zip/files -DestinationPath /home/joey/temp/zip/powershell2.zip

Tar command on Linux and Windows 10 BASH

Linux includes the venerable “tar” command, once used to create tape-archives. Installing the Ubuntu Linux subsystem on Windows 10 brngs this feature to Windows as well.


# Command syntax:
# tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
tar -czvf files.tar.gz /mnt/c/temp/zip/files/

Same command run on Linux Mint.


# Command syntax:
# tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
tar -czvf files2.tar.gz /home/joey/temp/zip/files/

Bonus: Windows Compressed Folders

Just to compare how efficient Windows built-in feature is to the command-line options above.

 

Resources:

https://superuser.com/questions/1105516/comparing-7z-exe-and-7za-exe

* There are compression tools built-in to Windows such as compact and makecab that are not covered here.

Move Dropbox files on Linux Mint

I have the Dropbox client installed on my Linux Mint machine and it has worked flawlessly for years. Suddenly, I started getting a notification pop-up telling me to move my Dropbox files as they will stop being synced in November.

A quick search revealed the rather cryptic message is a result of Dropbox’s decision to stop supporting certain file systems across all operating systems. With Linux appearing to be the most impacted as they will only support Ext4 without encryption (unless whole-disk; e.g. LUKS) going forward. Of course, I running Ext4 with my Home directory encrypted.

So, after looking for alternatives I decided to stay with Dropbox and try to work-around the problem. I decided I would create a partition that Dropbox would like. Since my laptop (an old Dell 6250) has an SD card reader I rarely use I decided to use an 16GB SD card (8 times more storage than I have with Dropbox).

First, I formatted an SD card as Ext4:

Then I moved the folder location in the Dropbox client to use the new directory. The client automatically moves the file and deletes the old location folder.


Next step was to create a symlink to make the old location still work for applications/scripts that would look to the old location:


ln -s /media/joey/Sync/Dropbox /home/joey/Dropbox
  

The only real risk is the SD card getting corrupted and losing the files. To address this a simple bash script will backup the files each night:


#!/bin/bash

# Backup Dropbox folder to local disk

# Run from via cron:
# /home/joey/Scripts/backup_dropbox.sh
# ---------- copy ----------
# Backup Dropbox at 1AM each day
# * 1 * * * /home/joey/Scripts/backup_dropbox.sh 1> /dev/null
# ---------- copy ----------

RUNDATE=`date +%Y%m%d`                     # append date to file
FILENAME=Dropbox_backup-$RUNDATE.tar.gz    # name of backup file
SOURCEDIR=/media/joey/Sync/Dropbox         # Dropbox location (real location)
TARGETDIR=/home/joey/Backups               # Destination of backup file

# run archive command
tar -cpzf $TARGETDIR/$FILENAME $SOURCEDIR 

  

Reset LEDE/OpenWRT using Failsafe boot mode

I had just installed OpenWRT and was making changes (of course without reading the documentation) when I had changed the networking settings losing access to the router’s interface.

Fortunately OpenWRT provides a way to recover according to OpenWRT’s website: “LEDE allows you to boot into a failsafe mode that overrides its current configuration. If your device becomes inaccessible, e.g. after a configuration error, then failsafe mode is there to help you out. When you reboot in failsafe mode, the device starts up in a basic operating state, with a few hard coded defaults, and you can begin to fix the problem manually.”

First, thing is to set your computer’s IP address to something like 192.168.1.2. The router will use 192.168.1.1 when booted in Failsafe mode.

Then connect the computer to the router’s WAN port.

Now the hard part. According to the documentation the router’s LEDs will display a moderate 0.1 second blinking rhythm during those two seconds, when router waits for user to trigger the failsafe mode. After plugging in the router I just guessed at when the 2-second window arrived and pressed the QSS/WPS button. After which the SYS LED started blinking rapidly.

Back on the computer I SSH’d to the router using root@192.168.1.1 for the username and address. There is no password for root.

joey@HAVEN-E6520 ~ $ ssh root@192.168.1.1
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
RSA key fingerprint is SHA256:PAkYhCNr1sBDT/ADAn/iPh3ztT1yvlgR+RTHYVM0/fA.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.1' (RSA) to the list of known hosts.

BusyBox v1.25.1 () built-in shell (ash)
     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (17.01.4, r3560-79f57e422d)
    \________\/    -----------------------------------------------------------

================= FAILSAFE MODE active ================
special commands:
* firstboot	     reset settings to factory defaults
* mount_root	 mount root-partition with config files

after mount_root:
* passwd			 change root's password
* /etc/config		    directory with config files

for more help see:
http://wiki.openwrt.org/doc/howto/generic.failsafe
=======================================================

=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@(none):~# 
root@(none):~#

Because I had just installed OpenWRT I decided to just reset the router and start over. To do this I just entered the command firstboot and hit enter.

TP-LINK 300M Wireless N Gigabit Router
Model No. TL-WR1043ND
https://wiki.openwrt.org/doc/howto/generic.failsafe
https://openwrt.org/docs/guide-user/troubleshooting/failsafe_and_factory_reset
https://openwrt.org/toh/tp-link/tl-wr1043nd#installation

Transfer files using Bluetooth in Linux Mint

On Linux computer make sure Bluetooth is enabled and is discoverable. I’m running Linux Mint 18.2 using Blueman package.

From the Bluetooth applet open devices. This is not necessary to pair the device but, is helpful to have open. This will display all the devices already paired with the computer.


On the phone the computer should be listed under Available Devices if the computer is discoverable. If it is not listed press Scan on the phone.

Tap the device that represents the computer. The phone will display a message about confirming the passkey for pairing.

A message will appear on the computer prompting you to confirm. This is not readily apparent and the message is not displayed for long. Click on the word Confirm to allow the pairing. The phone will display the key icon indicating it is paired.

On the phone the computer will be listed under Paired Devices.

On the computer trust the phone to allow receipt of files from the paired device.

Now that the phone and computer are paired we can trasnfer files between them. In this example I am going to transfer pictures from the phone to the computer. Starting the Gallery app select the pictures to transfer and tap Share. The following screen appears where Bluetooth is an option.

After tapping Bluetooth this screen appears where you select the Bluetooth device to receive the files. Tap the paired device that represents the computer.

The phone will start transferring the files to the computer.

In Linux Mint a notification will display stating that a file is being received from the phone.

Bluetooth is configured on my computer to put received files in the Downloads folder. Opening the Downloads folder shows the new files received from the phone.

To change the location where received files are saved click on View in Bluetooth Manager and select Local Services. Then change the location under Incoming Folder.


How to format SD card on Linux Mint

When an SD card is inserted into a computer running Linux Mint the card is automatically mounted and an icon is displayed on the desktop. Using this icon you can view and modify files. It also would appear that you could format the card as well by right-clicking on the icon.

When the option to Format is selected a dialog box to format the card is displayed but, the button to Format is not clickable:

The trick is to use the Disks utility to format the partition on the card. First, open the Disks utility:

Next, select the SD card on the left then click the gear icon under the partition on the SD card:

Then select Format… from the context menu:

Now a dialog box is displayed with the Format button enabled. Provide a name then click the button Format:

The next window is confirming your actions. Click Format to begin formatting the partition on the card:

That’s it!

Note: if you click the single gear icon at the top-right corner (near the SD card’s name) the same dialog box will be displayed. It will appear to format the card but, it doesn’t. You have to format the partition on the card.