Eclipse + Flatpak Quick-start guide

Today I’m experimenting with the Eclipse to Flatpak port that our team has been working on.

To do so, I had to learn Flatpak.  It only took 10 minutes to learn the basics needed to survive. I.e adding/listing Flapack repos, installing & removing packages.

Flatpack basics:

  • Flatpak is basically a package management system like yum/dnf/apk-get + version defined container for running gui apps.
  • Flatpak word does not contain a ‘c’. (I was wondering why flatpack could not be found on my system).
  • (Most?) of flatpak can be used via Software Center GUI, but I prefer the command line version as I need to manage repos.
  • The command line has very good tab-completion I’ve litereley figured things out by pressing tab when ever I wonder what argument to type next.
  • Flatpak is already installed on recent Fedora builds, but by default it has no repositories to feed from. You can add the flathub by opening it from here:
    https://flatpak.org/setup/Fedora/
    To verify that you’ve added the repo, you can list repos via:

    flatpak remote-list
    
  • To list available packages:
    flatpak remote-ls
    
  • To install these: (e.g I tested with Zotero)
    flatpak install org.zotero.Zotero
    flatpak install flathub org.zotero.Zotero  #if you want to specify which repo to install from
    
  • To remove a package:
    flatpak uninstall org.zotero.Zotero
    

 

Eclipse in flatpak

Now I went a head and fidlded around with using Eclipse from Flatpak.
Eclipse comes in it’s own repository, as document by Mat Booth.
To set things up:

# Add the 'eclipse' repo. 
flatpak remote-add --if-not-exists eclipse https://fedorapeople.org/~mbooth/flatpak/eclipse.flatpakrepo

# Btw, if you want to delete a repo in the future, it's easy:
flatpak remote-delete eclipse     #again, tab completion is your friend.

# To see what's in Mat's eclipse repo, you can list it's content:
flatpak remote-ls eclipse
  org.eclipse.Committers   # I'm a committer, so I'm gonna go with this version.
  org.eclipse.Cpp 
  org.eclipse.Java 

flatpak install eclipse org.eclipse.Committers  #this asks if you want to install gnome 3.24 run time. Say yes.

Now you can run eclipse either via overviews or via command:

flatpak run org.eclipse.Committers

# or with environment variable:
YOUR_ENV_VAR=VALUE flatpak run org.eclipse.Committers

And voila, Eclipse is up and running:
Eclipse in a flatpak

Also useful:

# look for stuff in your flatpak
flatpak search vlc

# Update packages in the future:
flatpack update

# list what's installed
flatpak list
flatpak list --app #only list apps.

 

References:

Create an area screenshot, host it on github and copy web url to clipboard with one command

I often find myself having to create a screenshot and upload it somewhere so that I can paste it on irc/(mail without adding weight to email)/bugzilla etc.

Eventually I solved the problem by writing  a script that:

  1. Creates a screenshot of an area (gnome-screenshot)
  2. Saves it to your picture folder
  3. adds/commits/pushes to your git hub
  4. copies path to your clipboard
  5. opens chrome to verify that screenshot uploaded successfully.

….

Continue reading