The following script allows you to modify PuTTY sessions in a batch.
Category: Software
-
Automated Eclipse downloader
I work with Eclipse a lot and to download a new version, which comes out 4 times a year, I use the following script. It can be executed with PowerShell and does not require Java to be installed on the system because it downloads the OpenJDK version itself. Eclipse can then be found in the folder “eclipse_out” and Java in “java_out”.
Why this script? Because it also installs all the plugins I need. For example “Spring tool suite”, “SonarLint”, “Buildship” and many more.
-
Improve Gimp UI integration
Okay, this is nothing functional and really just something for the eye. I am using Gimp on a regular basis and think it is a really great piece of software. There was just something that annoyed me every time I used the software: The font integration which looked to me somehow “out of place”. Let me give an example:
The font here just does not match the default Windows font “Segoe UI” and the scaling is also different. This is how it should look like:
You can clearly see the difference in the font presentation. Good thing is, this can easily be changed in the file “gtkrc” in the theme directory:
%ProgramFiles%\Gimp\share\gimp\2.0\themes\Dark\gtkrc
Replace “Dark” with the theme you are using on your system. There are a few of them in this folder.
- Uncomment the line starting with “#gtk-font-name” and change it to:
gtk-font-name = "Segoe UI 9"
- Find the line
GimpRuler::font-scale = 0.6444
and change it toGimpRuler::font-scale = 1
- Find the line
GimpDock::font-scale = 0.6444
and change it toGimpDock::font-scale = 1
With these changes Gimp should look like a regular Windows application using the default font.
- Uncomment the line starting with “#gtk-font-name” and change it to:
-
Eclipse bundle creator
For development of Spring Boot applications, designing Jasper reports, writing regular Java applications and libraries build with Gradle, development of database scripts and DB management in general with DBeaver and development of C/C++ applications I use Eclipse with a few plugins. Now eclipse releases a new version every three month and I was always annoyed by the time consuming process of downloading and creating a new distribution that would fit my needs. Fortunately Eclipse offers a command to automate this process on the command line.
The theoretical part
For this script to work Java has to installed and available in the global path.
This chapter shows the command line options:
-application org.eclipse.equinox.p2.director
This parameter takes two more arguments.
-repository $RepoListStr -installIU $FeatureListStr
$RepoListStr is a list of repository urls separated by “,”.
$FeatureListStr is a list of features to install separated by “,”.
$FeatureList = "org.eclipse.epp.mpc.feature.group,org.eclipse.buildship.feature.group,..."
$Repos = "https://download.eclipse.org/releases/2021-12,https://download.eclipse.org/eclipse/updates/4.22,..."
In the end the full command looks like this:
eclipse.exe -application org.eclipse.equinox.p2.director -repository $RepoListStr -installIU $FeatureListStr
The script
I have published the full installer in my GitHub repository. The script can be altered and features can be added and removed if needed. I tried to document the features I need the most.
Feature IDs
Now how do you get the feature ids for your desired components? The easiest way is on a already installed environment following this path:
Repositories
And how do you get the corresponding repositories for the repository array? Again on a already installed system:
Additional configuration
The script also alters the memory configuration to a initial size of 1GB and a maximum consumption of 4GB in “eclipse.ini”. Without this I ran in a “OutOfMemory” exception a few times. Further more automatic updates are enabled. This should be removed if the IDE is installed under “%ProgramFiles%” and UAC is enabled.
Troubleshooting
Sometimes a repository is missing or something goes wrong. Then features are missing. This can be detected in a certain log file. In the temporary directory Eclipse is extracted in and which is opened when the script has finished there is a folder “configuration” that contains files in the form of “<timestamp>.log”. For example:
1640808421484.log
This file then shows a message like the following:
This means that a certain dependency could not be found. I’ll show one way to fix this. Search for the problem causing library:
Open the hit that leads to the eclipse page and copy the link:
Paste the copied link into the address bar and remove the highlighted part:
Open the page:
This is the eclipse update page. Copy the URL and add it the “Repos” array:
Rerun the script. Now the library should be found. This can be repeated if more errors occur.
-
Install Visual Studio Code
I think it is time to show real quick how to install Visual Studio Code because most of my work is done with this editor.
It can be downloaded from the product page. After this is done just follow the screenshots and you are good to go. I recommend to use the user installer, which can be installed even if there are no administration rights available.
Just start the downloaded setup and follow the steps:
After that the program should be started.