MatterMost native chat client (like slack/IRC) on Linux

 

So today I bumped into https://mattermost.eclipse.org 

This is like slack (sort of modern IRC) but open source.

I also found that is has a Linux Native client:
https://about.mattermost.com/downloads/

To get it to work, I just downloaded it, extracted it and ran the included “Mattermost” binary.

Connecting it to Eclipse was mildly counter intuitive.

When faced witht he ‘Teams’ dialogue, I thought I had to  type in Name OR URL, but it turns out you type in both. The name is just an alias ex “Eclipse”, and for URL you put in:

https://mattermost.eclipse.org/

Ex:
Selection_046.png

After you joined, you can find some channels to join. In my case:

Platform: SWT

Now when someone wants to chat with you, you can give them the URL:
https://mattermost.eclipse.org/eclipse/channels/platform-swt

Happy MatterMost-ing

Ramdisk for the impatient.

I have a pci-e based storage working at close to 1000mb/s (Mac Pro). I do lots of GCC/make compilations. What if you want things even faster than with a pcie? Then ramdisk is your friend.

My results:

  • With Regular SSD:  2 minutes and 37 seconds   (on my co-worker’s machine w/Fedora)
  • With my pci-e disk: 2 minutes and 35 seconds (my Mac w/Fedora)
  • With Ramdisk:           1 minute and 15 seconds (my Mac w/Fedora)

So we have ~50% improvement in compilation time. For me, it’s worth the effort.

To set one up: Follow this guide

I.e:

[code language='bash']
sudo mkdir /mnt/ramdisk
sudo mount -t tmpfs -o size=2G tmpfs /mnt/ramdisk
[/code]

To see how much of it is still available:

df -h

You might want to write an rsync script to copy folders onto the ramdisk that you want fast-access to. Ex a git repo that you compile frequently, some application binaries that you run. But obviously avoid putting data onto the disk.

 

 

 

How to compile various gtk3 versions and run eclipse Apps with those (for SWT Widget testing)

ScreenShot_2014_09_29__15_07_28_

When developing SWT widgets, we need to test them on various GTK versions to ensure backwards compatibility.

There are some tricks and perks involved.

Get Gtk sources

  • Go to the gtk git repo and pull the code: https://git.gnome.org/browse/gtk+/
    (I recommend the https version: https://git.gnome.org/browse/gtk+)
    (if you don’t know how to use eclipse’s EGit, read this)
  • Check out the versions that you’re interested in (e.g 2.24, 3.10, 3.4, 3.8)
    These are found in major Linux distributions (e.g ubuntu 12..).
  • For the time being, check out the newest gtk version (e.g 3.10 at the time of writing).
    (It’s easier to build a newer version than an older one)
  • Open Terminal, go to your checked out gtk branch.
    Run the following commands:

    ./autogen.sh
    ./configure --enable-x11-backend --enable-wayland-backend
    make
    
  • The first time you run the commands, you might run into errors telling you you’re missing something on your system. Inspect autogen.sh to see what it runs and then install the utilities with yum.
  • Now copy gtk to another place on your system. E.g ~/src/gtk2_24 This way you don’t have to recompile this business every time.
  • Now you can build the other versions and similarly copy them to ~/src/gtk*_*
  • NOTE ON gtk3.4 (and maybe older) The Wayland configuration makes certain things look more correct. But sometimes it makes building older versions (like gtk3.4) near impossible due to missing dependencies. In this case, run the configure without these:
     ./autogen.sh ./configure make 

Configure Eclipse to use the gtk you compiled

  • Edit your run-configuration of the code snippet that you want to run.
  • Navigate to “Environmental Variables”
  • Click on “Add”, type in:
    name: LD_LIBRARY_PATH
    path: #your_compiled_gtk      //e.g /home/lufimtse/src/gtk3_10/gtk/.libs
  • Name your configuration (I reccomend appending gtk version, e.g “ControlExample (g3-10)”)
  • It should look something like this:
    Eclipse env var
  • Now run the configuration and you should see your application rendered in gtk*.*.
    You may note that it won’t have any styling:
    java app in compiled gtk
  • The lack of styling is due to the fact that there is no theaming.
    Now sometimes you might want the compiled gtk to use your system theame to see impact of themes on looks.
    To do so, do as above except run the configuration as following:

    ./configure --prefix=/usr --sysconfdir=/etc --enable-broadway-backend --enable-x11-backend --disable-wayland-backend
    

    In the interest of comparison: (left native look, right bare look)
    native vs bare

  • Lastly, in your source code, you might want to verify that you’re running the compiled gtk and not your own. Use this line of code:
    System.out.println("GTK Version: " + OS.gtk_major_version() + "." + OS.gtk_minor_version() + "." + OS.gtk_micro_version());