- How to install Processing 3.5.4 on Ubuntu 20.04 LTS Focal Fossa
- Tutorial Assumptions
- Part 1: Installing Processing 3.5.4
- Part 2: Creating a desktop application launcher for Processing
- Installing Processing 3.x on Ubuntu Linux Systems Tutorial
- Download Processing
- Extract Processing Using the Archive Manager
- Create a Processing App Launcher for Ubuntu Unity Desktop
- Add Processing to the Unity Launcher
- Associate PDE sketch files with Processing
How to install Processing 3.5.4 on Ubuntu 20.04 LTS Focal Fossa
Note: This tutorial was made in support of The Processing Foundation’s Processing Community Hangout held May 9 2020 and is an expansion of the presentation I gave as a part of that event.
It was back in 2016 that I created Installing Processing 3.x on Ubuntu Linux Systems Tutorial in which I outlined installing Processing 3.0.2 on my laptop, which was running Ubuntu 15.10. Since then I’ve undergone several Ubuntu OS updates (with mixed degrees of success) and several forced reinstalls of the OS as well as some kludgy work arounds to deal with shortcomings in Ubuntu’s ability to play nice with my hardware. While theoretically I should have been able to update my OS from one version to the next, it rarely worked in a clean fashion, if at all. Consequently, I’ve been hobbling along with Ubuntu 17.10 for some time.
With the release of Ubuntu 20.04 LTS (Focal Fossa) in April 2020, I decided to perform a clean install of Ubuntu on my laptop, to which minimal changes were made prior to installing Processing. Therefore, the steps provided in this tutorial should work on any system with a clean install of Ubuntu 20.04.
Tutorial Assumptions
The first assumption is that you have successfully installed Ubuntu 20.04 LTS (Long Term Support). In particular, my installation used the 64-bit PC (AMD64) desktop image. In case you have not yet installed Ubuntu 20.04, head over to
and get Ubuntu installed before continuing with this tutorial. If you used Ubuntu’s update feature to add 20.04 on top of the version of Ubuntu you were previously using, I can not guarantee that the following instructions will work. Additionally, the only software used during the installation process are programs that are a part of the standard Ubuntu install. In addition to the browser, the programs used are gedit (text editor) and Nautilus (file manager). You should also have some basic familiarity with simple Linux commands and the CLI (Command Line Interface).
In the instructions that follow, Linux commands that are entered at the terminal command prompt are shown in bold green with one command per line.
Before beginning the install process, you may want to read the general information Processing provides about installing Processing on Linux systems — Processing Supported Platforms document — but be forewarned: the instructions provided there are for Ubuntu 14.04 and Processing 3.2.1.
Part 1: Installing Processing 3.5.4
Step 01: With your browser, go to https://processing.org/download/ which is where we will download Processing from.
Figure 1 — The Processing download page.
Step 02: Click the link to download the Linux 64 bit version of Processing. The version I downloaded was 3.5.4 (17 January 2020) — Linux 64-bit (file name processing-3.5.4-linux64.tgz)
Step 03: While we are here, something else we’re going to do is to right click the round Processing logo and select the browser’s Save Image As option to save a copy of the image to our computer. The image’s filename is processing3-logo.png and it will, by default, be saved to the same directory as we just downloaded the Processing file to.
Step 04: Open a Terminal and navigate to the directory to which you downloaded the two files. This should be your Downloads folder. You may want to confirm that the two files you just downloaded are in the directory by using the ls command.
cd Downloads ls Figure 2 — The change directory and list files commands.
Step 05: Before unzipping the Processing archive file, think about where you want to have Processing installed on your system. I am choosing to install Processing in the /usr/share/ directory. For more information about the Linux directory structure, you may want to read Filesystem Hierarchy Standard on Wikipedia. You are free to install Processing to some other directory but you will have to adjust the instructions that follow accordingly.
Step 06: Having decided on where to install Processing, we will need to create the directory where the contents of the tgz will be unzipped to. I want this directory to be named processing so will use the following command to create the directory:
sudo mkdir /usr/share/processing
Step 07: Now that we have created the target directory, it’s time to unzip the contents of the Processing tgz file to that directory, which is done with the following command:
sudo tar -xvf processing-3.5.4-linux64.tgz -C /usr/share/processing
- -x means extract the files
- -v means to list to the console what’s being extracted
- -f means to process the filename that follows as the archive
- -C means that the path that follows is where you want the files to be extracted to
The result of this command is to place all the files in the directory /usr/share/processing/processing-3.5.4 with processing-3.5.4 being the top level directory name in the tgz file.
Step 08: While we are at it, lets copy the Processing logo image file as well using the following command:
cp processing3-logo.png /usr/share/processing/processing-3.5.4
Step 09: Let’s look and see what we’ve done by going to the processing directory and listing its contents:
cd /usr/share/processing ls
We see that the directory contains a single entry. The entry will be the directory processing-3.5.4 which is good since this means we can add other versions of Processing in the future without disturbing this version.
Step 10: Let’s take a look at the directory where the Processing files were unzipped to and see what is in that directory:
cd processing-3.5.4 ls -l Figure 3 — The contents of the processing-3.5.4 directory. Blue names are directories and green names are files. Note the file named processing
Step 11: As you can see there is an executable file in this directory named processing. Let’s see if it will run by entering the command that follows. Before pressing the enter key to execute the command, copy the command to your clipboard as you will need it later.
/usr/share/processing/processing-3.5.4/processing Figure 4 — The Processing IDE on its first execution.
Step 12: On my system, Processing opens as shown in Figure 4 above. Everything looks good so far — except for the fact that I need a 40x power magnifying glass to read the text. Click the red x in the upper right corner of the Welcome to. window to close that window.
Step 13: In the Processing IDE, click the File menu option, then click the Preferences option in the dropdown list. Take this moment to note the location of the Processing preferences file (on my system it is/home/Jim/.processing/preferences.txt. Also note the default location for where your sketches (pde files) will be stored. You may want to take this opportunity to increase the editor and console font sizes as well as changing the interface scale if your Processing IDE is as small as mine.
Figure 5 — The Processing preferences dialog.
Step 14: Go ahead and close Processing. Note that back in the terminal you may see the following message, which can be ignored:
Step 15: Use the up arrow key to retrieve the previous command we used to start Processing and press the enter key to restart Processing. To confirm that everything is working, I advise testing to see if Processing will run sketches. The quickest way to do this is to run several of the example sketches that come with Processing. These sketches are accessed via File -> Examples.
Figure 6 — Processing running a sketch on Ubuntu.
Step 16: Mission Accomplished. Congratulations.
On my system, Processing appears to have installed correctly and is working fine — other than the annoyingly small toolbar. That and the fact that I have to open a terminal and manually issue a command to start Processing. Rather than having to start Processing from the command line every time, I want to be able to start Processing from the desktop with a single mouse click. That we can’t do at this point – which leads us to the second part of this tutorial: how to get a Processing launcher onto the desktop.
Part 2: Creating a desktop application launcher for Processing
Note that while Ubuntu 15.10 was using the Unity desktop (the subject of my original tutorial), Ubuntu 20.04 is using Gnome for the desktop. And because Gnome doesn’t know about our Processing installation, we are going to have to manually create a desktop app launcher file ourselves.
Step 01: The file we are going to create will be named processing.desktop. Before creating that file we are going to need the following information:
- The application name. We’ll name it Processing
- The command that will be used to start Processing (which we have from step 11 above): /usr/share/processing/processing-3.5.4/processing
- The location of the program icon we want to use: /usr/share/processing/processing-3.5.4/processing3-logo.png
Step 02: Now to create the processing.desktop file. We will use the gedit program to create the file. From the terminal enter the following command:
sudo gedit /usr/share/applications/processing.desktop
Step 03: Using gedit, create the following records in the file and then save the file.
[Desktop Entry]
Type=Application
Version=1.0
Name=Processing
GenericName=Processing
Comment=Processing 3.5.4
Icon=/usr/share/processing/processing-3.5.4/processing3-logo.png
TryExec=/usr/share/processing/processing-3.5.4/processing
Exec=/usr/share/processing/processing-3.5.4/processing
For information on the TryExec and Exec entries, check out What is the TryExec field in .desktop files on StackExchange.
Step 04: Make sure you saved the file. Now exit gedit. Note that when I save the file, I get a Tepl WARNING GVfs metadata is not supported message in the terminal. I’m going to ignore the warning.
Step 05: Now use the following command to open the Ubuntu File Manager program (whose actual name is Nautilus):
Step 06: In File Manager, aka Nautilus, find the entry for the processing.desktop file and select it. Right click on the file and select the Copy option. Note that you could have also selected the file and pressed Ctrl+C to copy the file.
Figure 7 — The processing.desktop file selected in Nautilus.
Step 07: Position your mouse over an open area of the desktop (you may have to minimize Nautilus). Once over open ground, right click on the desktop and click Paste. You will now see a file icon for the processing.desktop file on your desktop with the text processing.desktop underneath it.
Figure 8 — The processing.desktop file icon on the desktop (pointed to by the yellow arrow).
Step 08: With your mouse, right click the processing.desktop file icon and from the menu (which is shown in Figure 8 above) click the Allow Launching option. The file icon and file name should be replaced with the Processing icon and our application name: Processing. We have now created a desktop launcher.
Figure 9 — The processing.desktop file icon after conversion into a desktop app launcher.
Step 09: To verify that everything has been done correctly, double click the Processing launcher. If everything has worked, Processing will be started.
Congratulations. Unless you encountered some unforeseen glitch, you have successfully installed Processing and a desktop app launcher for starting Processing. You are now ready to get down to doing some creative coding with Processing.
If for some reason Processing itself is not working on your system, you may want to seek an answer over in the Processing forums although there is no forum specifically for Linux issues.
Источник
Installing Processing 3.x on Ubuntu Linux Systems Tutorial
Processing 3.0.2 Running On Ubuntu (Wily Werewolf) Linux
I love Processing. It’s a wonderful tool for digital creativity and my hat is off to Ben Fry and Casey Reas for their vision and dedication. Most of my work in Processing is done using Processing 2 on a Windows 7 system. However I also run Processing 2 on a Ubuntu Linux system. I don’t use Linux as much as Windows because Linux is less user-friendly — hence this tutorial on how to get Processing up and running on a Linux system. And yes, this tutorial does involve typing in Unix commands from the Terminal.
Due to a corruption with my Linux system, I recently had to do a complete reinstall of the operating system and all my applications. It occurred to me that as long as I had to go through the process, I would document the steps I took installing Processing to serve as a tutorial for others.
To be clear, the instructions that follow are those I used to install the 64bit version of Processing 3.0.2 (released 02/13/2016) on a system running Ubuntu Linux 15.10 (Wily Werewolf). These instructions worked without incident on my system. However, this is no guarantee they will work for you. I also assume that readers of this tutorial are familiar with the gedit text editor and have used the Terminal to execute Linux commands.
Download Processing
The first thing to do is to download Processing 3 from https://processing.org/download/. I downloaded the Linux 64-bit version 3.0.2 dated 02/13/2016 — its filename being processing-3.0.2-linux64.tgz. Using the Firefox browser, the file was downloaded to the default directory /home/myUserName/Downloads. In Firefox, if I click the download icon I can see the file I’ve downloaded and if I click on the filename, my system automatically opens the file using the Archive Manager program.
You might be tempted to immediately extract (think unzip) the archive right away but if you do, you’ll only have to move it later. That’s because the location where you want to install Processing is in the /opt directory. The /opt directory is where you should install software you’ve manually installed on your system, as opposed to software that is installed using the package manager. At this point if you try to specify /opt as your extraction destination, you should get an «Extraction not performed: You don’t have the right permissions to extract archives in the folder «opt»» error message. This is because the /opt directory is outside your user directory. This is standard and is a part of the security built into Linux.
Extract Processing Using the Archive Manager
To get the Processing archive into the /opt directory, open a Terminal session (shortcut Ctrl+Alt+T) and type in the following command:
Yes, the executable file that is the Archive Manager program is actually named «file-roller» Note that after entering this command you will be prompted to enter the password that is associated with your user account — that’s because you’ve used the sudo command.
As a consequence of issuing the above command, the Archive Manager window should now be open.
Use Ctrl+O to open a file selection dialog and navigate to where your Processing file (processing-3.0.2-linux64.tgz) is located and select it.
Once the file has been selected, right click on the filename and select the Extract option.
Navigate to where you want to install Processing — I click Computer and then double-click the directory named opt.
Once you’re in the opt directory, click the «Extract» button. Your Processing archive will now be unpacked to a directory named Processing-3.0.2.
You are now done with the Archive Manager so go ahead and close it.
Back in your Terminal window, navigate to the directory where you just extracted Processing. For my installation I enter the following command:
Now issue the following command to list the contents of the directory:
This is just to see that the file named «Processing» really is marked as being executable (I assume you know about file permissions and the output format of the ls command).
While we’re here, let’s see if Processing works. The Processing file is a shell script that is used to get the Processing system up and running. I suggest that after you have installed Processing that you go in and take a look at the contents of the Processing script as a way of better understanding what the script does.
Start Processing by entering the following command:
Note that you need to use the prefix «./» because when you type in a command, your system will search for the executable file based on the contents of the $PATH environment variable — which is a list of the directories where executables are located. If you want to execute a program whose path is not in $PATH you need to enter the complete absolute path to where the file is stored. In this case since we are in the same directory as the file we want to execute, we can get away with simply using the «./» prefix, which is a shortcut that means the current working directory.
Alternatively you could have entered the following command:
On my system, the Processing IDE started with no problem. Great — the IDE works. Next is a test to see if Processing can actually run sketches. The easiest way to do this is to run one of the example sketches accessible via File -> Examples. I selected an example sketch at random, clicked the RUN icon and watched the sketch run. Now I know that Processing 3 is fully functional on my system — but I’m not done yet.
Create a Processing App Launcher for Ubuntu Unity Desktop
Processing is installed but it is not easily accessible. The last thing I want is to have to open a Terminal session and manually type in a command every time I want to run Processing. Instead I want a desktop icon I can just click whenever I want to start Processing.
First we’ll tell Ubuntu where it can find Processing. What we’ll do is to add the Processing folder to Ubuntu’s $PATH environment variable by creating a symbolic link. We’ll do this using the following command:
sudo su -c «ln -s /opt/processing-3.0.2/processing /usr/local/bin/processing»
And because we’re using sudo, we’ll be prompted to enter our user account password.
Now, change to the applications directory using the following command:
We will now create and edit a launcher file for Unity (Unity being the graphical shell for the GNOME desktop environment developed by Canonical for Ubuntu). Start by entering the following command — which will create the file processing.desktop and simultaneously open gedit so you can edit the file:
sudo gedit /usr/share/applications/processing.desktop
Now just paste the following code into the file:
Now save the file and exit gedit. Note that on my system, running gedit resulted in some error messages being printed out in my Terminal session. I ignored them. Instead I just verifed that my file was created and contained the content I pasted into it by using the following command to list the file’s contents:
Next let’s make sure what we did worked. Go to the Unity Dash and in the search field type in «Processing». You should see a result for Processing that displays the Processing icon — as illustrated in the image below.
Search for Processing in Ubuntu Unity Dash
Clicking the Processing icon will launch the Processing IDE. If you don’t see the Processing icon, double check everything you did in the Create a Processing App Launcher for Ubuntu Unity Desktop section of these instructions. If you did everything right and it is not working, your best option is to ask for help at Ask Ubuntu as this is not a Processing problem.
Add Processing to the Unity Launcher
While launching Processing from the Dash is okay, it is much easier to access Processing by adding its icon to the Unity Launcher. To do this, just take the Processing icon that appears in the Dash and drag it onto the Launcher, positioning it where you want it to appear.
Note that there are two ways to add programs to the Launcher. The second way is to first start Processing. Once running, a Processing icon is temporarily added to the Launcher. To make the Processing icon stay there, in the Launcher right-click on the Processing icon and select the option «Lock to Launcher». While this is how folks are typically told add programs to the Launcher, this will not work with Processing because when started, Processing simultaneously creates a file for your sketch and this file gets associated with the Processing icon you’ve just locked to the Launcher. So don’t even try to use this method.
For a generalized treatment of the subject of making programs «launchable», see Ubuntu Unity Launchers And Desktop Files
Associate PDE sketch files with Processing
As a rule I start Processing and then just use Processing’s File -> Open (Ctrl+O) dialog to open my PDEs. However, if you want to be able to use Nautilus or another file manager of your choice to double-click a sketch and have it opened in Processing, there are some steps you need to take.
The process involves creating a MIME type for your PDE files. For more on the subject see the GNOME Developer article Adding MIME types.
Our first step will be to create a MIME type for files that have the extension .pde so its back to the Terminal. Issue the following two commands:
sudo gedit processing.xml
Paste the following code into the file:
We have just created an XML file named processing.xml that defines a MIME type for files with the extension «.pde». Now we need to add this file to the MIME database. We do this using the following command:
sudo update-mime-database /usr/share/mime
Note that this command make take some time to complete.
Now the PDE MIME type needs to be associated with the Processing application. To do this, we need to add an entry to the file defaults.list so issue the following command:
sudo gedit /usr/share/applications/defaults.list
This is a file with a fair amount of content to which you are going to add one more line. I suggest looking through the file and finding the first entry that begins with the string «text/x». Insert the following line of text at this point in the file:
Save the file and exit gedit. Now when you double-click a .pde file, your system will automatically start Processing and open the sketch. As a quick check you can use Nautilus to navigate to /opt/processing-3.0.2/modes/java/Examples and select one of the example programs from one of the subdirectories. Or just use Nautilus to search for PDE files (.pde).
I sincerely hope that these instructions work as well for you as they have for me. If you are having difficulties that seem to be more tied to Processing than to Linux, you may want to ask for assistance on the Processing Forums.
Источник