Squoggle

Mac's tech blog

Monthly Archives: November 2019

Citrix Client on Linux Mint

This is my document for attempting to install the Citrix Workspace App on Linux Mint.

Version of Mint is 18.3 Cinnamon 64-bit

Go to Citrix download site:
https://www.citrix.com/downloads/workspace-app/linux/workspace-app-for-linux-latest.html

Near the bottom of the page you will be presented with 3 versions:

  • Full Packages (Self-Service Report)
  • Web Packages (Web Workspace App Only)
  • USB Support Packages

For this I’m going to get the Full Packages. I found the package for my version of Linux. (amd64.deb)

Download that to a directory on your PC then right click on the package and open with the GDebi Package Installer.

Install the package.

Open the URL of your Citrix Implementation and put in your credentials

 

 

Firefox DNS over HTTPS

You can have all of your DNS queries that originate from Firefox go over HTTPS instead of a plain text query as would happen in a normal DNS query.

This only applies to Firefox. This is typically called DoH which stands for DNS over HTTPS.

Enable DoH:

Click the Menu button and then click Preferences

Click General on the left side of the screen then scroll down to the bottom of the screen and find Network Settings and click the Settings button.

Check the Enable DNS over HTTPS checkbox

Use the default provider Cloudflare. Then click OK

Your DNS queries that Firefox does will now be redirected to Cloudflare DNS servers and not your local or ISP DNS servers.

Exceptions:

There are certain web applications that don’t seem to work using DoH. They are somehow smart enough to know you are using DoH and don’t want you to. You can add exceptions to the rules to get around this. Make sure that the exceptions to the rules do not negate your reasons to do DoH in the first place.

To add exceptions:

Type about:config into the address bar of Firefox.

In the search bar type network.trr.excluded-domains to find the setting where you can add exclusions.

Double click the setting. You can now add comma separated domains to this list that will be excluded from doing DoH.

Make sure you remember that you have exceptions or you could get in some trouble.

 

Linux Mint 19.x

Linux Mint 19.x

These are my notes on Linux Mint 19.x. If you find this and think it is useful, leave a comment and say what you like or don’t like. Keep in mind these are my own notes and are not intended to be a HowTo for the general public.

Install the OS from the USB Flash Drive. I chose to simply overwrite the existing version of Mint (19.1) that had already been installed on my laptop. I also chose to encrypt my home directory.

My first order of business is to make the native monitor and external monitor both set to the same resolution of 1920×1080 (16:9). The native laptop monitor supports a higher resolution of 2560×1440 but the screen is so small that it is very hard to see at that resolution so I’m standardizing both monitors at 1920×1080.

Get up and Running:

Here’s what I did to get up and running and customized the way I like it:

Update Everything:

    • The first thing to do is open the Update Manager and update everything. The Update Manager is the little shield icon in the task bar down in the right hand corner. Open that up and click OK to dismiss the initial startup screen.
    • You will be presented with a prompt to take a System Snapshot. I’m going to put this off until I have updated everything.
    • You will see a message that a new version of Update Manager is available. Click the ‘Apply the Update’ button to install it.
    • Once that is installed you will be presented with a list of updates that can be applied.
    • Apply all the updates. It is a good idea to reboot after all the updates.

Video Drivers:

After I rebooted I got a pop up box that said to “Check your video drivers”. I launched the Driver Manager and entered my password. My software cache was updated. Then an NVIDIA Driver Manager opened up. It showed that the nouveau driver was installed, but the recommended driver was nvidia-driver-435 which I checked then “Apply Changes”. You will need to reboot after this.

System Reports:

Down in the bottom right corner of the desktop you may see a little triangular warning icon. This is the ‘System Reports’ application. Go ahead an open this up. You should see a list of detected problems that need to be addressed. Go ahead and resolve the issues. The last item in ‘System Reports’ is to configure the System Snapshot tool Timeshift. See the next section for this.

System Snapshot:

You will be asked to choose between RSYNC and BTRFS. Typically this is going to be RSYNC.

A blurb about BTRFS.

  • First you have to have had installed the base OS with BTRFS file system for this to even be an option. In my case I did not want to use the BTRFS file system.
  • Second the snapshot can only be installed on the same disk from which they are created. If your drive goes bad you’re screwed. Choose RSYNC.

A blurb about RSYNC:

  • RSYNC snapshots are created by creating copies of system files using rsync and hard-linking unchanged files from previous versions.
  • All files are copied when the first snapshot is created. Subsequent snapshots are incremental. 
  • Snapshots can be saved to any disk formatted with a Linux File system which means the snapshot can be external. In my case an attached USB memory stick.

I’m using a USB 3.0 Flash Stick.

When you run the setup wizard you will be asked to select your snapshot levels. I checked off Monthly, Weekly, Daily, Hourly & Boot and kept the default keep levels on each one.
I also included root and my user’s home directories and selected “Include All”.

Sudoers:

Edit the /etc/sudoers file so you don’t have to put your password in each time:

$ sudo visudo

There’s a line that looks like this:

%sudo ALL=(ALL:ALL) ALL

Comment out that line and replace it with a line that looks like this:

%sudo ALL=(ALL) NOPASSWD: ALL

Install openssh server:

Install SSH Server so you can ssh to the host:

$ sudo apt install openssh-server -y

Test ssh to the new host. You may during this process encounter an error regarding an “Offending ECDSA key in ~/.ssh/known_hosts”. This is easily resolved by deleting the referenced line in ~/.ssh/known_hosts.

SSH Keys:

Now that you can ssh to your new host you will want to be able to ssh using your ssh key instead of password. From the remote host do this:

$ ssh-copy-id -i ~/.ssh/id_rsa.pub [newhostname]

The above assumes the user name on the new host is the same as the user on the remote host. If not you can do the command like this:

$ ssh-copy-id -i ~/.ssh/id_rsa.pub [user]@[newhostname]

You will be prompted to enter the password for the New Host. It will copy over your public ssh key from ~/.ssh/id_rsa.pub. This assumes your public ssh key is indeed ~/.ssh/id_rsa.pub.

You should be able to ssh to the new host now without entering your password.

(Optional) Now copy all the ~/.ssh directory contents from your remote host into this host so you have the keys, the known hosts and authorized keys files from your user on the old remote host and now have them on your new host.

From the remote host:

$ cd ~/.ssh
$ scp -r * [new-host-name]:~/.ssh

Copy /etc/hosts to new host:

Now copy the /etc/hosts file from old host to new host. From the old host:

$ sudo scp /etc/hosts [new-host-name]:~

On the new host edit the file and change the local host name on line 2 to the name of your new host.
Now copy the file into place:

$ sudo mv hosts /etc/hosts

Check it like this:

$ cat /etc/hosts

Install Dropbox:

Install Dropbox:

sudo apt install dropbox

Then go to start menu and find Dropbox and run it.

You will get a message that says in order to use Dropbox you must download the proprietary daemon. Click OK

A Web Page will pop up where you enter your credentials. Do so.

 

Install Insync:

Don’t use this. It does not work and sync of files does not happen. Tired of using it.

I want to sync my Google Drive locally. To do that I’m using Insync. 

First, add Insync’s public GPG key to allow apt to authenticate the Insync repository:

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ACCAF35C

You should see something like this that shows that it was successful:

gpg: key A684470CACCAF35C: public key "Insynchq Inc <[email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1

If the previous command did not work, use this instead:

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ACCAF35C

Now create a file /etc/apt/sources.list.d/insync.list with the following content:

deb http://apt.insync.io/mint [CODENAME] non-free contrib

Replace [CODENAME] with the Linux Mint distro codename.

To get the codename of your distro you can find it in the /etc/apt/sources.list.d/official-package-repositories.list file. You can view it like this:

$ grep mint /etc/apt/sources.list.d/official-package-repositories.list | awk '{print $3}'

This is what I see when I run the above command:

tricia

So ‘tricia’ is the codename of this version of Linux Mint. That means the line I need to insert into /etc/apt/sources.list.d/insync.list would be:

deb http://apt.insync.io/mint tricia non-free contrib

Update the apt repository:

$ sudo apt-get update

Install Insync:

$ sudo apt-get install insync

You should see a pop up that says Insync installation has finished and if you want to start it. Go ahead and start it. A wizard will pop up to walk you through setting up Insync to sync your Google Drive to a directory on your host.

Install KeePassXC:

Install KeePassXC:

$ sudo apt install keepassxc -y

Install Chrome:

You’ll need Chrome for certain things. 

Go to https://www.google.com/chrome/

Click the Download Chrome button. Mine automatically downloaded into ~/Downloads. The 64 bit version was automatically selected.

Install it like this:

$ cd ~/Downloads
$ sudo gdebi google-chrome-stable_current_amd64.deb

This will automatically install a repository as well for future updates.

Install Brave

Brave is a browser that automatically blocks trackers and Spam Ads. It is very buggy. I’d probably pass on this but if you insist…

$ sudo apt install apt-transport-https curl
$ curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add -
$ echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list
$ sudo apt update
$ sudo apt install brave-browser

Install Signal:

Go to https://signal.org/en/download/
Click on Download for Linux and follow the instructions that pop up.

Additional Software:

There are other software packages I need. I’ll do them one at a time because I don’t want to confuse error message between one package or another:

$ sudo apt install kwrite -y
$ sudo apt install kate -y
$ sudo apt install terminator -y
$ sudo apt install sshuttle -y
$ sudo apt install vim -y
$ sudo apt install sshpass -y
$ sudo apt install whatsapp-desktop -y
$ sudo apt install nfs-common -y
$ sudo apt install rofi -y
$ sudo apt install gparted -y
$ sudo apt install imagemagick -y
$ sudo apt install whois -y

For Mint 20:

$ sudo apt install warpinator -y

Spoof Mac Address:

Mac Address:
Set your custom mac address to get the IP address you want.
Go to start, search for ‘Network Connections’
Click on Wired connection 1
Click Edit
Put your custom mac address in the ‘Cloned MAC address’ box.

##:##:##:FF:FF:FE

Click Save. You should now get the IP address you are expecting.
You may need to reboot. You should get your IP address.

Mount NFS share:

Create a mount point:

$ cd ~
$ mkdir -p mnt/[nfs-server-host-name]

Edit /etc/fstab and add these lines:

# External Mounts
[nfs-server-host-name]:[path-to-nfs-export] /home/[your-user]/mnt/[nfs-server-host-name] nfs rw,soft,noauto 0 0

Edit /etc/hosts and add the IP address of Serenity

Then mount the NFS share:

$ sudo mount [nfs-server-host-name]:[path-to-nfs-export]

You will need to modify the firewall rule on the NFS server to allow connections from your new host before this will work. 

https://squoggle.wordpress.com/2020/05/04/iptables/

Install Slack:

Go to https://slack.com/downloads/linux
Download the .deb 64 bit package into your ~/Downloads directory.
Then install it:

$ cd ~/Downloads
$ sudo gdebi slack-desktop*.deb

I found a packagecloud.io repo but I have no way of knowing if it is secure. I’ll try to figure out how to create my own local repo for this.

Install Synergy:

Linux Mint 19.2 is based off of Ubuntu 18.04 LTS.

Go to https://symless.com/account and sign in. Go to the download page and get the package for Synergy 2 Beta for Ubuntu 16.04 LTS and save in ~/Downloads

Install it:

$ cd ~/Downloads
$ sudo gdebi synergy_2.*.deb

This is literally the best software in the world. 

There’s a gotcha if you’re trying to install this on Mint 20. Mint 20 is based on Ubuntu 20.04. Ubuntu 20.04 has updated libssl from version 1.0.0 to version 1.1.

If you attempt to install with the above instructions you will get an error regarding a failed dependency. I was able fix the dependency issue by editing the deb package using these instructions:

cd ~/tmp
cp ~/Downloads/synergy_2.0.12.beta_b1705+e5daaeda_amd64.deb .
ar x synergy_2.0.12.beta_b1705+e5daaeda_amd64.deb
tar xzf control.tar.gz

Edit the control file and replace libssl1.0.0 with libssl1.1 and save the file.

Now repackage the tar file and the deb package:

tar --ignore-failed-read -cvzf control.tar.gz postinst postrm prerm md5sums control
ar rcs synergy_2.0.12.beta_b1705+patched_amd64.deb debian-binary control.tar.gz data.tar.xz

You should now have a “patched” version of synergy 2.0.12.beta. Save that in your software store so you don’t have to do this part again.

Now you can install it with the gdebi command listed above.

The package installed fine it just does not work. I get a “There was a problem connecting to the background service.” Error.

Look at this page:
https://members.symless.com/forums/topic/6465-ubuntu-2004-support/
Near the end of the post. There might be some stuff there that helps

 

Fix your Profile:

Edit ~/.bashrc and change

alias ll='ls -alF'

to

alias ll='ls -lF'

Directories:

Delete extra directories you don’t like

$ cd ~
$ rm -rf Videos Templates Public

Create a symlink for mount

$ ln -s /home/mac/mnt/Serenity/ mac

Fix up your bin dir:

Set up your ~/bin directory:

$ cd ~
$ mkdir bin

Copy your scripts over from your other system.

Set your $PATH to include ~/bin

Edit ~/.bashrc and change. Add this to the bottom of the file:

# Set your path to inclue $HOME/bin
PATH="$HOME/bin:$PATH"

Date & Time:

Click on the Date in the bottom right corner.
Turn off 24 hour clock
Turn on the date

Hot Keys:

Go to System Settings > Keyboard > Shortcuts

Set up your custom hot keys:
Launchers:
    Launch Terminal = Super+T
    Launch Nemo = Super+E
    Close Window = Super+Shift+C
    Log out = Super+Shift+Q
    rofi -show run = Super+R
    rofi -show window = Super+Tab

Other resources:

InfinitelyGalactic