jetbrains


Install fallback version for JetBrains products using snap

In this video, we demonstrate to the user where they can find their JetBrains fallback license and the fallback versions of the products they had purchased in the past.

After finding the list, the user has a couple of options to proceed.
They can either download the archives from the website or install the correct version using a package manager like snap.

To install using snap, the first thing to do is call the snap info command and get the list of available versions or the available channels as they are called in snap.

snap info phpstorm;
$ snap info phpstorm 
name:      phpstorm
summary:   PhpStorm
publisher: jetbrains✓
store-url: https://snapcraft.io/phpstorm
contact:   https://www.jetbrains.com/phpstorm/documentation/
license:   Proprietary
description: |
  PhpStorm is a PHP IDE that actually ‘gets’ your code. It supports PHP 5.3-7.2, provides on-the-fly
  error prevention, best autocompletion & code refactoring, zero configuration debugging, and an
  extended HTML, CSS, and JavaScript editor.
snap-id: qYt8GFdYX5B4J7mm6S6F4r4vAwnG5IgV
channels:
  latest/stable:    2021.3      2021-12-02 (245) 607MB classic
  latest/candidate: 2021.3      2021-12-02 (245) 607MB classic
  latest/beta:      2021.3      2021-12-02 (245) 607MB classic
  latest/edge:      2021.3      2021-12-02 (245) 607MB classic
  2021.3/stable:    2021.3      2021-12-02 (245) 607MB classic
  2021.3/candidate: 2021.3      2021-12-02 (245) 607MB classic
  2021.3/beta:      2021.3      2021-12-02 (245) 607MB classic
  2021.3/edge:      2021.3      2021-12-02 (245) 607MB classic
  2021.2/stable:    2021.2.3    2021-10-15 (238) 476MB classic
  2021.2/candidate: 2021.2.4-RC 2021-12-15 (246) 481MB classic
  2021.2/beta:      2021.2.4-RC 2021-12-15 (246) 481MB classic
  2021.2/edge:      2021.2.4-RC 2021-12-15 (246) 481MB classic
  2021.1/stable:    2021.1.4    2021-06-30 (222) 475MB classic
  2021.1/candidate: 2021.1.4    2021-06-30 (222) 475MB classic
  2021.1/beta:      2021.1.4    2021-06-30 (222) 475MB classic
  2021.1/edge:      2021.1.4    2021-06-30 (222) 475MB classic
  2020.3/stable:    2020.3.3    2021-03-16 (208) 425MB classic
  2020.3/candidate: 2020.3.3    2021-03-16 (208) 425MB classic
  2020.3/beta:      2020.3.3    2021-03-16 (208) 425MB classic
  2020.3/edge:      2020.3.3    2021-03-16 (208) 425MB classic
  2020.2/stable:    2020.2.4    2020-11-25 (191) 373MB classic
  2020.2/candidate: 2020.2.4    2020-11-25 (191) 373MB classic
  2020.2/beta:      2020.2.4    2020-11-25 (191) 373MB classic
  2020.2/edge:      2020.2.4    2020-11-25 (191) 373MB classic
  2020.1/stable:    2020.1.4    2020-07-22 (173) 348MB classic
  2020.1/candidate: 2020.1.4    2020-07-22 (173) 348MB classic
  2020.1/beta:      2020.1.4    2020-07-22 (173) 348MB classic
  2020.1/edge:      2020.1.4    2020-07-22 (173) 348MB classic
  2019.3/stable:    2019.3.4    2020-03-18 (151) 341MB classic
  2019.3/candidate: ↑                                  
  2019.3/beta:      ↑                                  
  2019.3/edge:      ↑                                  
  2019.2/stable:    2019.2.5    2019-11-22 (130) 325MB classic
  2019.2/candidate: ↑                                  
  2019.2/beta:      ↑                                  
  2019.2/edge:      ↑                                  
  2019.1/stable:    2019.1.4    2021-02-26 (115) 281MB classic
  2019.1/candidate: ↑                                  
  2019.1/beta:      ↑                                  
  2019.1/edge:      ↑                                  
  2018.3/stable:    2018.3.6    2019-04-11  (93) 273MB classic
  2018.3/candidate: ↑                                  
  2018.3/beta:      ↑                                  
  2018.3/edge:      ↑                                  
  2018.2/stable:    2018.2.7    2019-04-11  (94) 272MB classic
  2018.2/candidate: ↑                                  
  2018.2/beta:      ↑                                  
  2018.2/edge:      ↑                                  
  2018.1/stable:    2018.1.7    2018-12-04  (73) 264MB classic
  2018.1/candidate: ↑                                  
  2018.1/beta:      ↑                                  
  2018.1/edge:      ↑                                  
  2017.3/stable:    2017.3.7    2018-12-04  (72) 263MB classic
  2017.3/candidate: ↑                                  
  2017.3/beta:      ↑                                  
  2017.3/edge:      ↑                                  

From there, the user needs to select any of the versions available up to the version number that their JetBrains profile mentions they can get. For this demo, we chose version 2020.3/stable (2020.3/stable: 2020.3.3 2021-03-16 (208) 425MB classic), which was the maximum version allowed for our license. The installation command of that specific version using snap is as follows:

sudo snap install phpstorm --channel=2020.3/stable --classic;

We had to add the classic flag as instructed by the version we decided to install.

This revision of snap "phpstorm" was published using classic confinement and thus may perform arbitrary system changes outside of the security sandbox that snaps are usually confined to, which may put your system at risk.

Just some notes for setting up a new OS to develop projects on GNU/Linux Fedora

If the project is in C++ and uses mysql then install

sudo dnf install mysql++-devel;

If the project is in C/C++ and you are missing talloc.h install

sudo dnf install libtalloc-devel;

Set your name and email for all git projects

git config --global --edit
Then fill-in the configuration file similar to below
# This is Git's per-user configuration file.
[user]
# Please adapt and uncomment the following lines:
#       name = Michael, George
#       email = [email protected]
[user]
        name = Michael, George
        email = [email protected]
[gui]
        editor = gedit

or use these individual commands to set the configuration

[george@fedora ~]$ git config --global user.name "Michael, George"
[george@fedora ~]$ git config --global user.email "[email protected]"

Increase amount of inotify watchers

If you are using CLion or IntelliJ IDEA by jetbrains increase the amount of inotify watchers.
CLion, IntelliJ (and other tools of jetbrains) use inotify on GNU/Linux to monitor directories for changes. It’s common to encounter the system limit on the number of files they monitor.

inotify requires a watch handle to be set for each directory in the project. Unfortunately, the default limit of watch handles will not be enough for sized projects, and reaching the limit will force the jetbrains platform to fall back to recursive scans of directory trees.

Create a file (as root) called /etc/sysctl.d/idea.conf and add the following content to it to increase the number of watchers to 512K

fs.inotify.max_user_watches = 524288

Then call sysctl to reload the settings and apply the new configuration

[george@fedora ~]$ sudo sysctl -p --system;
  •  -p[FILE] or --load[=FILE]: Load in sysctl settings from the file  specified  or /etc/sysctl.conf if none  given.
    Specifying - as filename means reading data from standard input. Using this option will mean arguments to sysctl are files, which are read in the order they are specified.
    The file argument may be specified as regular expression.
  •  --system: Load settings from all system configuration files.
     /run/sysctl.d/*.conf
     /etc/sysctl.d/*.conf
     /usr/local/lib/sysctl.d/*.conf
     /usr/lib/sysctl.d/*.conf
     /lib/sysctl.d/*.conf
     /etc/sysctl.conf