Coventry University Logo
4061CEM - Programming and Algorithms 1
  • Installing the IDE on ChromeOS
    5

Installing the IDE on ChromeOS

During your time on this course, you may undertake some modules that require you to develop an application or script. It can sometimes be tedious to write code using the Linux terminal, and you could easily lose track where your cursor is positioned and whether you have the appropriate number of tabs. Therefore, in this tutorial you will be guided through the process of setting up the recommended integrated development environment (IDE) for this module: JetBrains IntelliJ IDEA.

Installing the Packages for Software Development

If you have not done so already and either installed the Linux desktop environment or activated the Linux terminal on your Chromebook, you may want to visit these one of these tutorials:

Before you begin installing the IDE, you need to ensure you have the relevant tools required for software development. For this module, you are being taught the programming language Python; therefore we need to install some necessary packages for this language. The packages you require for this language are:

  • python3-dev: contains the header files required for some Python extensions
  • python3-pip: the package manager for Python, it is used to install Python modules
  • git: the version control system of choice for this module
  • default-jre & default-jdk: the Java runtimes required for the IDE

To install these packages, open a new terminal window in your Linux environment of choice, this can be achieved using the keyboard shortcut: Ctrl+Alt+T. Inside the terminal window, enter the following command:

$ sudo apt install python3-dev python3-pip git default-jdk default-jre

Once you push Enter on the keyboard, you will be presented with a list of packages that are required to be installed. Some of these packages may differ to those that you requested to install, and that is because they are packages that are required to be installed alongside the three you have chosen for them to run appropriately. You can proceed with the installation by entering Y and pushing Enter on the keyboard.

Installing the Integrated Development Environment

To use the Jetbrains IDE, you will need to grab a free education license by following the instructions on their website:

Sign-up for a Student Account

During this process, you will be asked to sign-up for an account with them; it is recommended to use your student e-mail address. These details will be used later on in this guide to log in and activate the IDE.

TO begin the installation you will need to download the IDE from their website. You are recommended to download the file to your home directory. You can traverse to this directory using the following command:

$ cd ~

To make the process of downloading the file easier, you can use the following wget command:

$ wget https://download.jetbrains.com/idea/ideaIU-2021.2.2.tar.gz -O idea.tar.gz

wget is a command-line tool that assists in transferring data from web servers. In this instance, you are using wget to download the IDE compressed file that consists the binaries for the IDE. Once downloaded, you can extract the files from its compressed folder (.tar.gz) using the following command:

$ tar xzvf idea.tar.gz

If you would like to find out more information about the tar command, you can read this article here. Executing the command above will extract the files to the parent directory. Once this command has finished executing, you can rename the directory to something more friendly, i.e. idea. To do this, you can use the mv command:

$ mv ideaIU-*/ idea/

Once the IDE has been uncompressed into the home directory of your Linux environment and the folder renamed, you can run the IDE by using the following command:

$ . ./idea/bin/idea.sh

The ampersand (&) in the above command will execute the script in the background. This enables you to use the terminal window for other tasks, and the IDEs graphical user-interface (GUI) will begin to load. You know this command has run successfully when you are met with a screen similar to the screenshot below.

The T&C's for Jetbrains IDE

Activating the License for the IDE

Upon accepting the terms and conditions for the IDE, you will be met with a dialogue window requesting your Jetbrains credentials that you registered earlier; the screenshot of this window is shown below.

Activating the JetBrains license.

You can choose to use the evaluation if you wish to not sign up for a Jetbrains account; however, this will only give you thirty days to use the product. Upon successful activation of the IDE, you can proceed with installation of the plugins required for this module.

Installing the Required Plugins

As a part of this module, you will be taught Python; and as it currently stands the IDE does not support the Python programming language. To install a plugin, when you load JetBrains for the first time you will be presented with a window as shown in the screenshot below.

The first page of the IDE.

On the left-hand pane, you can see the label Plugins, click on this label, and you will be presented with a new window. In this window you can see two tabs: marketplace and installed; ensure you are on the marketplace tab and search for Python. You will see an option come up, similar to the one in the screenshot below.

Searching for the Python plugin.

Next to the Python plugin is a button with the label Install; click on this button and the plugin will be installed to the IDE. The plugin will now have been installed to the IDE and will be available for use once you have restarted the IDE.

Creating a Shortcut to the IDE

You may not want to keep using the command: . ./idea/bin/idea.sh to load the IDE. You may want to include a desktop shortcut, so you can click on an icon to load it. To do this, on the desktop, right-click (Right Button) and click on Create Launcher. You will be presented with a window similar to the one in the screenshot below.

Creating a Shortcut on the Desktop.

Provide the shortcut a name, in this instance you may want it to be IntelliJ IDEA and in command enter the following:

/home/YOUR_USERNAME/idea/bin/idea.sh

Ensure that you replace YOUR_USERNAME with the username of your account. Next, you may want to include an icon to make it distinguishable amongst the other icons on the desktop. Click on the button Icon and click on the first drop-down box and select Image Files; as shown in the screenshot below.

Selecting an Icon

Navigate to the location of where the folder idea/bin is located. This would be:

/home/YOUR_USERNAME/idea/bin/

Once you have traversed to this directory, you will see two filenames listed for the icons, one is a png and the other is a svg. You can select whichever icon is most suitable for you. Once you have done this, you will have an icon situated on the desktop, as shown in the screenshot below.

The desktop with a shortcut to the IDE.

Conclusion

You have now reached the end of this tutorial. The outcome of this tutorial is the successful installation of the Jetbrains IntelliJ IDEA IDE on the university issued Chromebook. You have also installed the required plugins for this module.

Any Issues or Errors?

If you have spotted any errors or issues within this tutorial, you can e-mail Dr Ian Cornelius. Ensure to include in your message a description of the error/issue and a possible resolution.