Sunday, July 4, 2021

How to run Chrome web apps in background

Chrome stops web apps when there is another full screen app in the foreground. To fix go to chrome://flags and disable #calculate-native-win-occlusion.

Chrome also suspends non-active tabs. Extension The Great Suspender should remedy that, however it did not work for me.

Wednesday, June 26, 2019

How to force full screen on Huawei for some stubborn apps (might work on other Android devices too)

Go to Settings -> Display -> More Display Settings -> Notch -> Custom -> find your app and change Auto to Show notch.

Friday, March 15, 2019

My personal HTPC server setup v2

  • Ubuntu
  • Vino
  • SSH
  • Samba + NFS maybe
  • Dropbox (nautilus-dropbox)
  • Kodi + sudo adduser $USER dialout for Kodi to be able to access CEC adapter
  • Kodi plug-ins:
  • Docker + post-installation steps
  • Docker compose
  • Docker packages, using /opt/appdata/package_name/ for config and /var/package_name/ for data storage:
    • Letsencrypt + reverse proxy, should switch to SWAG
    • Portainer
    • Emby
    • Nextcloud, if online update timeouts these commands can be used to update manually:
      • docker exec -it nextcloud /bin/bash
      • sudo -u abc php7 /config/www/nextcloud/updater/updater.phar
    • MariaDB
    • WebGrab+Plus, should change <timespan> and <update> values to default, also change downloads folder to `/Downloads` instead of `/root/Downloads`. To update manually exec into the container and run s6-setuidgid abc /bin/bash /defaults/
    • Deluge - run it in bridge mode and assign port 8112 for reverse proxy to work 
    • Jackett
    • Sonarr, needs adjustments in Settings -> Download Client -> Remote Path Mappings
    • Duplicati
  • Secure Apache + PHP Nginx webserver bundled with Letsencrypt container is used instead
  • Steam + Xbox One S controller fix

Sunday, September 2, 2018

My personal Xubuntu htpc/server setup

1. Install Xubuntu

Enable auto login
Install Chrome
Install Chrome Remote Desktop + make it use same windows server...
Using Vino instead

2. Install Emby

Mount my external HDD for Emby to have full control: and,
also some bonus information for possible future use:

Autostart Emby
service file location /etc/systemd/system/
config /etc/emby-server.conf
ExecStartPre=/bin/sleep 30

3. Install Kodi

Fix libcec

4. Install Dropbox

Fix Dropbox...

5. Install Docker and a few containers

sudo docker run -d --name portainer --restart=always -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer

Get the containers and some instructions from and

sudo docker run -d --name sonarr --restart=always -p 8989:8989 -e PUID=1000 -e PGID=1000 -e UMASK=022 -e VERSION=image -v /etc/localtime:/etc/localtime:ro -v /home/docker/sonarr/config:/config -v /mnt/my_passport/TV\ Series:/tv -v /home/docker/sonarr/downloads:/downloads hotio/suitarr:sonarr

Important: Sonarr needs adjustments in Settings -> Download Client -> Remote Path Mappings

sudo docker run -d --name jackett --restart=always -p 9117:9117 -e PUID=1000 -e PGID=1000 -e UMASK=022 -e VERSION=image -v /etc/localtime:/etc/localtime:ro -v /home/docker/jackett/config:/config hotio/suitarr:jackett

sudo docker run -d --name radarr --restart=always -p 7878:7878 -e PUID=1000 -e PGID=1000 -e UMASK=022 -e VERSION=image -v /etc/localtime:/etc/localtime:ro -v /home/docker/radarr/config:/config -v /mnt/my_passport/Movies/Other:/movies -v /home/docker/radarr/downloads:/downloads hotio/suitarr:radarr

6. And finally the web server
Required for WordPress:

Tuesday, April 11, 2017

Ubuntu + Kodi + IPTV + Exodus + Dropbox + Deluge cheatsheet

I have a very old laptop and want to use it as a HTPC, so I decided to install some light Ubuntu distribution and Kodi on it, accompanied by Deluge to download stuff using web interface, Dropbox for IPTV playlist and program guide and Exodus for VOD. Bellow I listed important terminal commands and other notes important for this setup to have them all in one place:
  1. First install Lubuntu or Xubuntu.
  2. Next add Kodi and Deluge repositories and update packages index:
    sudo add-apt-repository ppa:team-xbmc/ppa (Ubuntu repository has own version so this might be skipped)
    sudo add-apt-repository ppa:deluge-team/ppa (Ubuntu repository has own version so this might be skipped)
    sudo apt-get update
  3. Upgrade stuff:
    sudo apt-get upgrade
  4. Install stuff:
    sudo apt-get install kodi
    sudo apt-get install kodi-pvr-iptvsimple
    sudo apt-get install nautilus-dropbox (or download Ubuntu package from dropbox and install it with gdebi)
    sudo apt-get install deluged
    sudo apt-get install deluge-web
  5. Remove residual stuff:
    sudo apt-get autoremove
  6. Fix Dropbox:
    dropbox stop
    dbus-launch dropbox start
    Go to Dropbox preferences and disable "Start Dropbox on system startup"
    Open Autostart settings (in Lubuntu it is in "Default applications for LXSession", is Xubuntu it is in "Session and Startup") and add new item with command dbus-launch dropbox start
  7. Setup Deluge services:
    sudo leafpad /etc/systemd/system/deluged.service (in Xubuntu replace leafpad with mousepad, or any other text editor You like)
    sudo leafpad /etc/systemd/system/deluge-web.service
    Copy new files content from
    To use same account: in [Service] section change User line, remove line Group=deluge and add line Password=your_password. UMask line should also be removed.
    systemctl enable /etc/systemd/system/deluged.service
    systemctl enable /etc/systemd/system/deluge-web.service
    systemctl start deluged
    systemctl start deluge-web
    To auto-connect web UI to daemon:
    systemctl stop deluge-web
    sudo leafpad ~/.config/deluge/web-ui.conf
    Set default daemon to
    systemctl start deluge-web
  8. Set Kodi to auto start:
    sudo leafpad /etc/lightdm/lightdm.conf
    Add line autologin-session=kodi
    I had some issues here, after starting this way only laptop screen would work and TV connected over HDMI would be blank, so instead I added kodi to Autostart (in Lubuntu it is in "Default applications for LXSession", is Xubuntu it is in "Session and Startup")
  9. Add source to Kodi to install Indigo: Then use Indigo to install Exodus.
    Exodus is dead, use google to install Covenant or similar add-on instead.
    This might be good time to create folders Movies and TV Series in home folder and add them to Kodi and to Deluge.
    Also if using Exodus Covenant I would recommended to add Video Database Cleaner (direct link), otherwise library cleaning might take forever.
  10. Keep Ubuntu running when idle:
    There should be some options in Power Manager.
  11. Keep Ubuntu running when lid is closed:
    There should be some options in Power Manager, if not or they do not work then:
    sudo leafpad /etc/systemd/logind.conf
    Set HandleLidSwitch=ignore
    sudo leafpad /etc/UPower/UPower.conf
    Set IgnoreLid=true
  12. Set unattended upgrades:
    There should be options for that in Software & Updates, if not here are some resources to read:

Monday, November 14, 2016

Ghost in the Shell anime chronological order

There are three independent stories that should not be mixed:

Arise, set in 2027:
  1. GitS: Arise - Ghost Pain (ova) or GitS: AAA - Ghost Pain, Part 1-2 (tv series ep. 3-4, cut down version of ova)
  2. GitS: Arise - Ghost Whispers (ova) or GitS: AAA - Ghost Whispers, Part 1-2 (tv series ep. 5-6, cut down version of ova)
  3. GitS: Arise - Ghost Tears (ova) or GitS: AAA - Ghost Tears, Part 1-2 (tv series ep. 7-8, cut down version of ova)
  4. GitS: Arise - Ghost Stands Alone (ova) or GitS: AAA - Ghost Stands Alone, Part 1-2 (tv series ep. 1-2, cut down version of ova)
  5. GitS: AAA - Pyrophoric Cult (ova) or GitS: AAA - Pyrophoric Cult, Part 1-2 (tv series ep. 9-10, cut down version of ova)
  6. GitS: The New Movie (movie)
Stand Alone Complex, set in 2030-2034:
  1. GitS: SAC (tv series season 1, set in 2030) or GitS: SAC - The Laughing Man (ova, cut down version of tv series)
  2. GitS: SAC 2nd GIG (tv series season 2, set in 2032) or GitS: SAC 2nd GIG – Individual Eleven (ova, cut down version of tv series)
  3. GitS: SAC - Solid State Society (movie, set 2034)
The movies, set in 2029-2032:
  1. GitS (movie, set in 2029, comparison of versions)
  2. GitS 2: Innocence (movie, set in 2032)
It would be recommended to start watching with the original movies (considered the best), then SAC and finish with Arise (considered the worst), however chronological order would start with Arise, followed by SAC and finished by the movies.

Some would suggest after Arise to watch the first movie, then the SAC series, then the Innocence and finish it with the Solid State Society, but as mentioned these are completely independent stories (despite sharing same world and characters) and most would suggest to not mix them up.

There is a major spoiler explaining why SAC should be watched before the movies despite set times being mixed up.

More info at r/Ghost_in_the_Shell.

Wednesday, June 1, 2016

Run Seafile Windows client as a background service

We will need:

Step by step guide:
  1. Install and configure the Seafile client as usual, turn on synchronization for desired libraries.
  2. Quit the Seafile client (right click on tray icon and choose Quit)
  3. Download and extract NSSM
  4. Start the command prompt (Win+S -> cmd) and navigate to nssm.exe file, for example if you extracted it on Your desktop, type in the command prompt CD C:\Users\Your_user_name\Desktop\NSSM_folder_name\win64
  5. Type in the command prompt nssm install ccnet (this service will manage the network)
  6. NSSM service installer window will open, click the "..." button and navigate to C:\Program Files (x86)\Seafile\bin\ccnet.exe
  7. Fill arguments as described in documentation, change Administrator to Your user name
  8. Click the tab Log on, choose "This account" and enter Your credentials
  9. Click Install service - one done, one to go
  10. Type in the command prompt nssm install seaf-daemon (this service will manage the files)
  11. NSSM service installer window will open, click the "..." button and navigate to C:\Program Files (x86)\Seafile\bin\seaf-daemon.exe
  12. As for arguments this one is a bit trickier, -c argument is same as in step 5, -d argument value can be found in C:\Users\Your_user_name\ccnet\seafile.ini file and -w value is path to Your Seafile data folder, for example: -c C:\Users\Admin\ccnet -d C:\Users\Admin\Documents\Seafile\seafile-data -w C:\Users\Admin\Documents\Seafile
  13. Same as earlier click the Log on tab, choose This account and enter Your credentials
  14. Click Install service, and it's done
  15. Now restart the PC or start the services manually (Win+S -> Services -> look for ones named ccnet and seaf-daemon)

Read the NSSM Usage guide for more information.

Update: documentation linked in step 7 is no longer available, but You can check required parameters by executing commands ccnet -h and seaf-daemon -h in folder C:\Program Files (x86)\Seafile\bin\.