Installing tox on Manjaro i3

Tox is an open source secure alternative to the likes of Skype. To install it, you need to install the core package and one of the available GUIs.  You can compare some of the available clients here but personally I like qtox. The below will pull in the required dependencies.

sudo pacman -Sy qtox

If you want the latest Git version, you can install qtox-git from the AUR.

yaourt -S qtox-git

Make sure you run that as a regular user – not root.  This pulls in the core package from the ABS repository also.

To add a contact, you will need their Tox ID – which looks like this:

56A1ADE4B65B86BCD51CC73E2CD4E542179F47959FE3E0E21B4B0ACDADE51855D34D34D37CB5

If that is a bit too annoying for you, you can use a free ToxDNS provider, such as utox.org. This will give you a “username@utox.org” address to give your people.

Windows 7 QEMU Guest

Check your kernel was compiled with support.

zgrep CONFIG_KVM /proc/config.gz
zgrep VIRTIO /proc/config.gz

Check the kvm and virtio kernel modules are loaded.

lsmod | grep kvm
lsmod | grep virtio

I needed to manually load the virtio module:

sudo modprobe virtio

To automatically load the virtio module at boot:

echo "virtio" >> /etc/modules-load.d/virtio.conf

Reboot and check again:

lsmod | egrep 'virtio|kvm'

Install qemu. I also installed qemu-launcher – a GUI front-end.

sudo pacman -S qemu qemu-launcher

Create a working directory:

mkdir vms
cd vms

Create a virtual hard drive the the Windows installation.

qemu-img create -f qcow2 windows.qcow2 40G

Prepare the installation medium. I inserted a Windows 7 installation DVD and created an ISO locally.

sudo dd if=/dev/sr0 of=en-windows-7-professional-x64-dvd.iso

To launch into the Windows installation:

qemu-system-x86_64 -enable-kvm -m 4096 -cdrom en-windows-7-professional-x64-dvd.iso -boot d windows.qcow2

Once installed you don’t need to attach the ISO:

qemu-system-x86_64 -enable-kvm -m 4096 -boot d windows.qcow2 

Update and upgrade to Windows 10 😉

Resources

https://wiki.archlinux.org/index.php/QEMU

https://www.reddit.com/r/archlinux/comments/1fg3y9/guide_to_running_windows_7_in_qemu/

Spotify on Manjaro i3

Spotify is available from the AUR.

Install

yaourt -S spotify

To play local file you will need to also install ffmpeg.

yaourt -S ffmpeg0.10

Issues

For some (currently) unknown reason, launching Spotify crashes when I login. The only fix I have found so far is to change the scale factor from the default 1 to something else. You can do that by launching it at the command line:

spotify --force-device-scale-factor=2

To make this permanent, edit /usr/share/applications/spotify.desktop.

[Desktop Entry]
Name=Spotify
GenericName=Music Player
Comment=Spotify streaming music client
Icon=spotify-client
Exec=spotify --force-device-scale-factor=2
TryExec=spotify
Terminal=false
Type=Application
Categories=Audio;Music;Player;AudioVideo;
MimeType=x-scheme-handler/spotify;

Resources

https://wiki.archlinux.org/index.php/spotify

X2Go on Ubuntu Server 14.04

In a previous post, I talked about my experience using X2Go with XFCE4 and Lubuntu.

XFCE4 via X2Go

Here is how it was achieved…..

On the Server

Here I’m using Ubuntu 14.04 LTS but you can install X2Go on just about any Linux distro.

Create a User Account

Create a regular user to run the desktop session under.

sudo useradd -m -s /bin/bash andrew
sudo passwd andrew

For your own sanity, I recommend you setup password-less key-based authentication as soon as possible……go, do it now!

Configure SSH

Open the main configuration file for the OpenSSH daemon process.

sudo vim /etc/ssh/sshd_config

Ensure X11 forwarding is enabled.


X11Forwarding yes

Don’t forget to test for configuration errors and restart the SSH service.

sudo sshd -t
sudo service ssh restart

Install Lightweight Desktop Environment

Both Lubuntu and XFCE4 work well, out-the-box with X2go. I installed both side-by-side for testing and both worked well together. You can even pause/suspend your Lubuntu or XFCE4 session and come back to it another time.

For XFCE4

sudo apt-get install xfce4

Note, for some reason you will also need to install the following packages or you will have missing icons.

sudo apt-get install gnome-icon-theme-full tango-icon-theme

For Lubuntu

sudo apt-get install lubuntu-desktop

Along with (a load of) other packages, you will now have XOrg installed. This means, as long as X11 forwarding has been enabled on the client side of the SSH connection, you can now test X11 with a program like firefox if you have it installed already.

Install X2Go Server Software

Install the repository package if it’s not already installed.

sudo apt-get install software-properties-common

Add the X2Go repository and install packages. If using Ubuntu 10.04 or 12.04, install python-software-properties instead of the software-properties-common package.

sudo add-apt-repository ppa:x2go/stable
sudo apt-get update
sudo apt-get install x2goserver x2goserver-xsession

For information about other distributions, see the X2Go server installation page.

DE Bindings

If you installed Lubuntu, you may want to install the following package for Desktop Environment bindings. I don’t believe there is currently a desktop bindings package for XFCE4.

sudo apt-get install x2golxdebindings

This is probably a good place to reboot if like me you’ve installed a lot of new packages.

On the Client

Again, you can install the client on just about anything – including Windows! Here I am using Manjaro i3 Community Linux.

sudo pacman -S x2goclient

X2Go also has some other clients that look useful – like a Python one for example.

SSH Client Configuration

Make sure you have at least ForwardX11 yes in /etc/ssh/ssh_config or ~/.ssh/config.


Host *
  ForwardX11 yes
  ForwardX11Trusted yes

Test X11 Forwarding

You can test that X11 is being forwarded correctly by using SSH to log onto the remove server, from your local Linux desktop, and and issue the following.

andrew@loader:~$ firefox &
[1] 2257

You might also want to setup password-less SSH key-based authentication if you’ve not done so already.

Create Sessions

For Lubuntu, select Custom Desktop and enter the below for the command.

lxsession -e LXDE -s Lubuntu

For XFCE4, you can just select XFCE.

Lubuntu XFCE4

I’m using the i3wm – I found the best result in appearance using the Use whole display option under the Input/Output tab, and then select the display (monitor) you want to use.

i3wm compatible

Resources

https://wiki.archlinux.org/index.php/X2Go
https://www.howtoforge.com/tutorial/x2go-server-ubuntu-14-04/
http://wiki.x2go.org/doku.php/doc:installation:x2goserver
https://bugs.launchpad.net/ubuntu/+source/lubuntu-default-settings/+bug/1241958
http://ubuntuforums.org/showthread.php?t=2228137

Minimal Desktop Environment over SSH

So I wanted to install a Java desktop application and have it publicly available on a server somewhere. Using a light weight desktop environment on one of my cloud servers made sense – provided that is, I could find something reasonably secure.

I came across X2Go and decided to give it a try on one of my Rackspace cloud servers. I used a 2 GB General Purpose v1 server and was surprised at how low the resource usage was – and consequentially how quick and responsive it all felt.

X2Go is a remote desktop tool that uses the NX technology protocol and operates entirely over a secure SSH connection. Using SSH keys makes the process of logging in pretty painless too!

I’m using Ubuntu 14.04 LTS for the OS, on the server and Manjaro i3 community edition on my local desktop, as the client. On the server I tried both XFCE4 and Lubuntu as the Desktop Environments.

Lubuntu via X2Go

Personally I think I prefer XFCE4 as it was slightly easier to install and lightning quick to use. When I used Lubuntu, the start menu could take a while (like a minute!) to load. Once it had loaded though, it too was lightning quick. And to be fair to Lubuntu, I didn’t really look into it much further.

XFCE4 using X2Go

As a note to my future self, here’s what you need to do.

Dependency cycle detected

Occassionally when using Arch Linux, you may come across a warning: dependency cycle detected message when trying to update your system using pacman.

[andy@home-pc ~]$ sudo pacman -Syu
[sudo] password for andy: 
:: Synchronising package databases...
 core                                                                                                 121.5 KiB   513K/s 00:00 [############################################################################] 100%
 extra                                                                                               1751.1 KiB   995K/s 00:02 [############################################################################] 100%
 community                                                                                              2.7 MiB  1378K/s 00:02 [############################################################################] 100%
 multilib                                                                                             126.2 KiB  2.46M/s 00:00 [############################################################################] 100%
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: nvidia-utils will be installed before its nvidia-libgl dependency

Packages (82) bind-tools-9.10.2.P3-1  binutils-2.25.1-1  colord-1.2.11-1  dbus-1.8.20-1  device-mapper-2.02.125-1  dhcpcd-6.9.1-1  exiv2-0.25-1  ffmpeg-1:2.7.2-2  gcc-5.2.0-1  gcc-libs-5.2.0-1
              gdk-pixbuf2-2.31.5-1  git-2.5.0-1  gnutls-3.4.3-1  gtk-update-icon-cache-3.16.6-1  gtk3-3.16.6-1  harfbuzz-1.0.1-1  harfbuzz-icu-1.0.1-1  hicolor-icon-theme-0.15-1  i3-wm-4.10.3-1
              kdebase-runtime-15.04.3-4  kdeclarative-5.12.0-2  kfilemetadata-5.9.2-2  kinfocenter-5.3.2-2  kio-extras-5.3.2-2  lib32-acl-2.2.52-2  lib32-curl-7.43.0-1  lib32-gcc-libs-5.2.0-1
              lib32-gdk-pixbuf2-2.31.5-1  lib32-gnutls-3.4.3-1  lib32-libdbus-1.8.20-1  lib32-libldap-2.4.41-1  lib32-libtiff-4.0.4-1  lib32-mesa-10.6.3-1  lib32-nvidia-libgl-352.30-1
              lib32-nvidia-utils-352.30-1  lib32-systemd-224-1  libcups-2.0.4-1  libdatrie-0.2.9-1  libdbus-1.8.20-1  libepoxy-1.3.1-1  libinput-0.21.0-1  libpgm-5.2.122-2  libsecret-0.18.3-1
              libsodium-1.0.3-1  libsoxr-0.1.1-3  libsystemd-224-1  libteam-1.17-1  libthai-0.1.22-1  libtool-2.4.6-3  libunistring-0.9.6-1  libx264-2:148.20150725-1  linux-4.1.4-1
              linux-firmware-20150722.e10097a-1  llvm-libs-3.6.2-2  lvm2-2.02.125-1  man-pages-4.01-1  mercurial-3.5-1  mesa-10.6.3-1  mpfr-3.1.3.p4-1  netctl-1.11-1  npm-2.13.2-1  nvidia-352.30-2
              nvidia-libgl-352.30-1  nvidia-utils-352.30-1  openssh-6.9p1-2  os-prober-1.66-1  pacman-4.2.1-2  pacman-mirrorlist-20150731-1  perl-http-message-6.10-1  perl-net-ssleay-1.70-1  perl-uri-1.69-1
              perl-yaml-tiny-1.69-1  qt4-4.8.7-2  s-nail-14.8.4-1  speech-dispatcher-0.8.3-5  sqlite-3.8.11.1-1  strigi-0.7.8-7  sudo-1.8.14.p3-2  systemd-224-1  systemd-sysvcompat-224-1  talloc-2.1.3-1
              zeromq-4.1.2-3

Total Download Size:    274.19 MiB
Total Installed Size:  1033.57 MiB
Net Upgrade Size:        21.87 MiB

:: Proceed with installation? [Y/n] n

Here we simply need to update the nvidia-libgl package……

[andy@home-pc ~]$ sudo pacman -S nvidia-libgl
resolving dependencies...
looking for conflicting packages...

Packages (1) nvidia-libgl-352.30-1

Total Download Size:   0.00 MiB
Total Installed Size:  0.03 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages ...
 nvidia-libgl-352.30-1-x86_64                                                                        1388.0   B  0.00B/s 00:00 [############################################################################] 100%
(1/1) checking keys in keyring                                                                                                 [############################################################################] 100%
(1/1) checking package integrity                                                                                               [############################################################################] 100%
(1/1) loading package files                                                                                                    [############################################################################] 100%
(1/1) checking for file conflicts                                                                                              [############################################################################] 100%
(1/1) checking available disk space                                                                                            [############################################################################] 100%
(1/1) upgrading nvidia-libgl                                                                                                   [############################################################################] 100%
[andy@home-pc ~]$ sudo pacman -Syu
:: Synchronising package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (81) bind-tools-9.10.2.P3-1  binutils-2.25.1-1  colord-1.2.11-1  dbus-1.8.20-1  device-mapper-2.02.125-1  dhcpcd-6.9.1-1  exiv2-0.25-1  ffmpeg-1:2.7.2-2  gcc-5.2.0-1  gcc-libs-5.2.0-1
              gdk-pixbuf2-2.31.5-1  git-2.5.0-1  gnutls-3.4.3-1  gtk-update-icon-cache-3.16.6-1  gtk3-3.16.6-1  harfbuzz-1.0.1-1  harfbuzz-icu-1.0.1-1  hicolor-icon-theme-0.15-1  i3-wm-4.10.3-1
              kdebase-runtime-15.04.3-4  kdeclarative-5.12.0-2  kfilemetadata-5.9.2-2  kinfocenter-5.3.2-2  kio-extras-5.3.2-2  lib32-acl-2.2.52-2  lib32-curl-7.43.0-1  lib32-gcc-libs-5.2.0-1
              lib32-gdk-pixbuf2-2.31.5-1  lib32-gnutls-3.4.3-1  lib32-libdbus-1.8.20-1  lib32-libldap-2.4.41-1  lib32-libtiff-4.0.4-1  lib32-mesa-10.6.3-1  lib32-nvidia-libgl-352.30-1
              lib32-nvidia-utils-352.30-1  lib32-systemd-224-1  libcups-2.0.4-1  libdatrie-0.2.9-1  libdbus-1.8.20-1  libepoxy-1.3.1-1  libinput-0.21.0-1  libpgm-5.2.122-2  libsecret-0.18.3-1
              libsodium-1.0.3-1  libsoxr-0.1.1-3  libsystemd-224-1  libteam-1.17-1  libthai-0.1.22-1  libtool-2.4.6-3  libunistring-0.9.6-1  libx264-2:148.20150725-1  linux-4.1.4-1
              linux-firmware-20150722.e10097a-1  llvm-libs-3.6.2-2  lvm2-2.02.125-1  man-pages-4.01-1  mercurial-3.5-1  mesa-10.6.3-1  mpfr-3.1.3.p4-1  netctl-1.11-1  npm-2.13.2-1  nvidia-352.30-2
              nvidia-utils-352.30-1  openssh-6.9p1-2  os-prober-1.66-1  pacman-4.2.1-2  pacman-mirrorlist-20150731-1  perl-http-message-6.10-1  perl-net-ssleay-1.70-1  perl-uri-1.69-1  perl-yaml-tiny-1.69-1
              qt4-4.8.7-2  s-nail-14.8.4-1  speech-dispatcher-0.8.3-5  sqlite-3.8.11.1-1  strigi-0.7.8-7  sudo-1.8.14.p3-2  systemd-224-1  systemd-sysvcompat-224-1  talloc-2.1.3-1  zeromq-4.1.2-3

Total Download Size:    274.19 MiB
Total Installed Size:  1033.54 MiB
Net Upgrade Size:        21.87 MiB

:: Proceed with installation? [Y/n] Y

…and then proceed with the system update as normal.

Installing Popcorn Time on Arch Linux

I was looking for a Showbox equivalent that I could easily install on my Arch Linux desktop, when I came across Popcorn Time.

Like Showbox, this program is a free and similar to the likes of Netflix. It is essentially an open source BitTorrent client that uses sequential downloading for streaming. It is available for pretty much all platforms: Linux, Android, Mac OSX….oh, and Windows (I guess some people are still using it).

Popcorn Time was available from the AUR, so I thought I’d give it a go. At the time of writing, there were three packages available, popcorn-time, popcorntime-git and popcorntime-bin. I decided to give the Git-based package a try. If you don’t have a pot of glue, you should probably use the binary package.

Due to the nature of open source, there are two or three forks of Popcorn Time at the time of writing. All three of the packages I am looking at, come from PopcornTime.io.

I use the aura package manager, so installing Popcorn Time is easy!

sudo aura -A popcorntime-git

Not bad!

Popcorn Time

It even has support for Chromecast and AirPlay devices; a Remote Control API and VPN. Sweet!

Related Documents

https://popcorntime.io/
https://aur.archlinux.org/packages/popcorntime-bin/
https://aur.archlinux.org/packages/popcorntime-git/
https://aur.archlinux.org/packages/popcorntime/
http://en.wikipedia.org/wiki/Popcorn_Time
http://en.wikipedia.org/wiki/BitTorrent#Technologies_built_on_BitTorrent

WPS Office on Arch Linux with KDE

WPS Office is a great proprietary Writer, Presentation and Speadsheet package which is available for Linux, Window, iOS and Android. WPS Office is most useful because of its compatibility with Microsoft Office file formats.

I’m running WPS Office on Arch Linux with KDE4. WPS Office is available from the AUR.

If you see a message like this…

System DPI is asymmetric. WPS Office may have display issues

Writer-DPI-Error_001-300x210.png

…you’re missing some fonts that WP Office needs. You can fix this by going to the appearance section of the…

System Settings --> Application Appearance

…system settings and selecting “Fonts” from the left menu, and then ticking the “Force fonts DPI: 96” checkbox.

Fonts – System Settings_001

You may also get a warning to say “Some formula symbols might not be display correctly due to missing fonts: Wingdings, Wingdings 2, Wingdings 3”.

Missing Fonts - Writer_001

To fix this, you will need to download and extract the required fonts. I have saved a copy here.

Once downloaded to your desktop, unzip….

[andy@home-pc wps]$ ls
wps_symbol_fonts.zip

[andy@home-pc wps]$ unzip wps_symbol_fonts.zip 
Archive:  wps_symbol_fonts.zip
  inflating: WEBDINGS.TTF            
  inflating: WINGDNG2.ttf            
  inflating: WINGDNG3.ttf            
  inflating: mtextra.ttf             
  inflating: symbol.ttf              
  inflating: wingding.ttf            

….and copy the contents to /usr/share/fonts/wps-office.

[andy@home-pc wps]$ sudo mv -v WEBDINGS.TTF WINGDNG* mtextra.ttf symbol.ttf wingding.ttf /usr/share/fonts/wps-office
‘WEBDINGS.TTF’ -> ‘/usr/share/fonts/wps-office/WEBDINGS.TTF’
removed ‘WEBDINGS.TTF’
‘WINGDNG2.ttf’ -> ‘/usr/share/fonts/wps-office/WINGDNG2.ttf’
removed ‘WINGDNG2.ttf’
‘WINGDNG3.ttf’ -> ‘/usr/share/fonts/wps-office/WINGDNG3.ttf’
removed ‘WINGDNG3.ttf’
‘mtextra.ttf’ -> ‘/usr/share/fonts/wps-office/mtextra.ttf’
removed ‘mtextra.ttf’
‘symbol.ttf’ -> ‘/usr/share/fonts/wps-office/symbol.ttf’
removed ‘symbol.ttf’
‘wingding.ttf’ -> ‘/usr/share/fonts/wps-office/wingding.ttf’
removed ‘wingding.ttf’
[andy@home-pc wps]$