Tag: Linux Mint

Install Oracle Java 8 in Ubuntu with Updates via PPA

Thanks to WebUpd8, you can install the most up-to-date JDK and JRE directly from Oracle, as opposed to using OpenJDK which is the default in the Ubuntu repositories. As far as I know, this should work for any *buntu OSes, including Linux Mint and elementaryOS. They should also get updates automatically via the Update Manager while they are within the support window for the OS version you’re using.

I know this isn’t exactly news, and WebUpd8 posted this information over two years ago now, but I was shocked to find out about it myself just recently, and figured I’d just go ahead and post it on my blog for anyone else who happens across it without knowing as well.

Here are the steps, all together, for adding the PPA and installing Java 8 (currently update 40). I also included an additional step to remove all remnants of the OpenJDK package. I’m uncertain if the presence of OpenJDK would cause any problems, but I figured its not needed and so worth it to clear up an easy ~50-100MB of space anyway.

sudo apt-get purge openjdk*
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default

The PPA is hosted at this location on Launchpad. As you will see if you visit the page, WebUpd8 doesn’t actually maintain any Java binary packages for on the PPA. Instead, it simply hosts the installers that pull the packages from Oracle’s own servers. An alternative might be to manually download and install the software from Oracle, but you would have to manually update it every time Oracle pushes out a new version. With this PPA, you will get updates for it automatically through the Update Manager for as long as your OS is within its support window.

If you prefer to use version 7 instead, you can issue the following commands to install the JDK and JRE packages installer for version and alternate the versions used.

sudo apt-get install oracle-java7-installer
sudo update-java-alternatives -s java-7-oracle

Then just use the following command to return to version 8, if you decide to.

sudo update-java-alternatives -s java-8-oracle

Linux Mint with MATE and Cinnamon

Linux Mint ships with several options for desktop environments, but the two most advertised are MATE and Cinnamon – with Cinnamon being its primary candidate.

When you install Mint, you typically have to decide which desktop you want, because each has its own installation package. What you may not know, however, is that you can actually install one version of Mint and still have both options for your desktop environment. The best part is that you don’t even have to get your hands dirty with the command line interface to do it.

Here are the steps:

  1. After you have installed Mint, login and open the Software Manager. It is usually to the left in the Menu for both MATE and Cinnamon.
  2. If you have MATE version installed, search for Cinnamon. If you have Cinnamon, search for MATE.
  3. If you’re looking to add the Cinnamon desktop onto a MATE installation, you need to look for cinnamon and mint-meta-cinnamon packages in the top results, and install those two. For installing MATE within a Cinnamon installation, it’s the opposite: mate and mint-meta-mate. These two packages will install the desktop environments and the key packages that they need. A lot of the other results you see in your search will actually be included with the installation of those two.
  4. After the installation has completed, log out of your session and click the icon at the top-right of the sign in box on the login screen and you can now select between the two different desktop environments for your session.

Linux Mint’s “Point” Updates

Linux Mint is doing something that is new, at least to me. If they’ve done this in the past, I didn’t know about it, so I’m assuming that they didn’t. They’re releasing a “point” update to version 17 “Qiana”, their latest LTS release of Mint, which will be 17.1 “Rebecca”. Based on what has been said in this blog post on Mint’s official website, I assume that all point releases will feature a different codename.

If my understanding is correct, Mint’s point-release updates won’t be quite the same as Ubuntu’s. Where Ubuntu 14.04.1 is actually the same exact distribution as 14.04 only with updated packages and kernels that would automatically be updated from Ubuntu’s repositories anyway (though saving you the time of downloading them – by getting them in the installation ISO), Mint 17.1 will feature updates to the desktop environments themselves. So, where 14.10 will feature an updated Unity, most likely, that could only be applied to 14.04 by enabling unstable repositories, Mint will work out a stable update to their environments and actually push it to be a stable update to their LTS release. This is awesome. There were small changes to Unity that I wanted from 13.10, but I didn’t want to upgrade to 13.10 or take the chance of upgrading the Unity environment in 12.04 at the risk of it having compatibility issues with packages in the 12.04 repositories. Even if my concerns were unfounded, updates to LTS releases are typically limited for a reason, and that’s usually to help ensure that people don’t run into compatibility issues or crippling bugs.

What’s also cool about the point-releases for Mint is that it will be upgradable through their Update Manager. Though Mint sees updates to packages at a slower pace than Ubuntu, this usually means the chance of having issues with those updated packages is minimized, which is better than getting the new bells and whistles only to have them break your machine and put you in an aggravating position of having to revert and recover. I like Mint. When the next LTS version is released, I may just change for my primary PC. I have two years to think about it, though I’m already running it on my laptop to see how the progression goes. That’s not to say that Ubuntu is being looked at as a loser in this. After all, I’ve used it as my primary OS for nearly three years now, and there’s obviously good reasons for that. I just can’t fail to consider another distribution that may be making better strides in improving the Linux experience, even if Ubuntu continues to be an excellent OS that is probably the best for first-time Linux users to try. On top of that, Windows users considering the migration over to Linux may find Cinnamon and MATE both more comfortable than Unity, in terms of a layout that closer resembles Windows’ Start menu-style layout. I would recommend Mint over Ubuntu to such a person.

LibreOffice (Latest Version) Installation for Ubuntu, Linux Mint and elementaryOS

This is somewhat of a follow-up post to a previous post regarding updating LibreOffice for Ubuntu and Ubuntu-based OS.

Because each version of Ubuntu and any OS based on it usually pulls from a specific repository where software that has been deemed stable for that version is stored, getting the latest version of a particular software can be impossible without some configurations. Having used both Ubuntu and Linux Mint, and successfully installed and updated LibreOffice using the LibreOffice PPA, I thought the same could be done for elementaryOS, which is also based on Ubuntu (the latest version, Luna, being specifically based on Ubuntu 12.04 Precise Pangolin).

However, after installing eOS and installing LibreOffice from the default repository, I then added the LibreOffice PPA and found that it caused some issues with the Update Manager in eOS. Not only would it not allow me to update to the latest version of LibreOffice, but it even seemed to interfere with eOS being able to get other updates. I couldn’t even alter the settings in the Update Manager. After removing the LibreOffice PPA from the software sources, all problems seemed to vanish with non-LibreOffice updates. The biggest problem for me at that particular moment, however, was that I couldn’t get LibreOffice updated. A few sites mentioned compiling LibreOffice source to install the latest version, which I didn’t care to do (updating was not that big of a deal for me, if compiling the source was my only option), and so I came across someone else who mentioned following the same steps I had done before, yet adding the PPA before installing the software. So, I followed the necessary steps to completely remove LibreOffice (credit to an answer on askubuntu.com).

sudo apt-get remove --purge libreoffice*
sudo apt-get clean
sudo apt-get autoremove

And then I removed the PPA by opening Update Manager, going to Settings… at the bottom-left, going to the Software Sources tab and removing it from the list. After, I simply re-added the PPA and reinstalled the software back onto the computer using the terminal.

sudo apt-add-repository ppa:libreoffice/ppa
sudo apt-get install libreoffice

I open LibreOffice and find the latest version (4.1.4.2 as of writing this post) installed.

As far as complications with updating the software further, or interfering with other updates, I can’t say. I had already ran all other updates before reinstalling LibreOffice, and so the system is showing up-to-date. I will post a comment if I see the PPA in the sources list causing any other problems, or not updating LibreOffice beyond 4.1.4.2.

There are also some articles posted on elementaryupdates.com regarding ways to configure LibreOffice and other applications to fit more into the eOS appearance, in case anyone is interested.

Update 2015.08.31

On Linux Mint 17.2, I’ve realized that there is one additional step required in addition to what I had mentioned above to update to the latest version of LibreOffice (5.0.1 as I’m writing this). You have to set the priority for the package so that Mint’s update system will allow it to be updated/installed from the PPA. To do that, you need to create the file /etc/apt/preferences.d/libreoffice.pref and place the following inside of it:

Package: *
Pin: release o=LP-PPA-libreoffice
Pin-Priority: 700

This information was taken from the Mint here.

Ubuntu / Linux Mint: Adding the LibreOffice PPA

If you’re using a previous version of Ubuntu or Linux Mint, such as 12.04 or 13 (the last LTS releases), then you’re probably using an old LibreOffice suite – at least if you choose to use LibreOffice. I believe version 3.6 is in the 12.04 repositories – which I also believe is what is used by Linux Mint 13. There’s nothing wrong with LibreOffice 3.6, but there’s also nothing wrong with wanting the latest and greatest, and 3.6 is quite a few releases behind the current LibreOffice update.

Luckily, whether you wish to re-install LibreOffice or simply update the installation that comes pre-packaged with Ubuntu / Linux Mint, getting the latest version is easy as one command line in terminal.

Simply add the LibreOffice PPA:

sudo add-apt-repository ppa:libreoffice/ppa

You will also want to update the package index:

sudo apt-get update

After this is done, simply load up the Update Manager for whichever OS you’re running, click Check and you’ll find updates listed for LibreOffice. Ubuntu typically prompts to run a partial upgrade, which is fine. I didn’t see this in Linux Mint.

If you’ve removed LibreOffice and need to install from the PPA after you’ve added it, simply submit the following command:

sudo apt-get install libreoffice

That’s it. Whether you upgrading or doing a fresh install, you’ll have the latest release of LibreOffice, along with continuous updates to the application through your Update Manager.

Linux Mint MATE: Default Num Lock, Keyboard Shortcuts and System Monitor

This post is in reference to an earlier one, which can be found here.

The difference is that this example refers to Linux Mint using the MATE desktop environment. The reason I’m posting this is because I’ve recently installed Linux Mint with MATE, and was shocked to not only find no keyboard shortcut for System Monitor (which is missing by default in Ubuntu as well) but also no shortcut to terminal. So, I will explain how to add these. The steps are actually just as simple as the ones used for adding shortcuts to Ubuntu.

Personally, I find the layout of the configuration GUI for keyboard settings a little less convenient in Linux Mint from Ubuntu’s Unity, but it’s still usable and I was able to get the job done just fine without referring to any help online. The place where I found myself stuck for a second was the command used for launching these applications. In Ubuntu, System Monitor is accessed by the command gnome-system-monitor. However, in Linux Mint with MATE, it is mate-system-monitor. Not really all that shocking once you realize it, but it took me a minute to realize that I wasn’t using Gnome or a relative desktop.

But anyway. To configure keyboard shortcuts in Linux Mint with MATE, simply go to the Menu on the taskbar and click Control Center, which is about five options up from the bottom. Under the Personal category, which is at the top of the window, you’ll see Keyboard Shortcuts, which is likely the second option down from the top at the far right. One this window is opened, you can just stop. Don’t bother looking for a shortcut for either Terminal or System Monitor – just in case you’re thinking one may exist. It doesn’t, at least not if you’re using Maya. When you’re ready to create a shortcut, just click the + Add button at the bottom. The new window that pops up is exactly like what is seen in Ubuntu. Two lines: one for the title and one for the command that is called. If you wish to create a shortcut for Terminal, the command should be mate-terminal . If you wish to create one for System Monitor, the command should be mate-system-monitor , as mentioned earlier in the post. Then assigning the key combination for the shortcuts is also exactly as in Ubuntu: you simply click the shortcut you created in the list and then when it says New shortcut to the right, you hit the key combination you wish to use on your keyboard. Done.

Lastly, if you wish to have Num Lock turned on by default when you log into Linux Mint, simply open up Control Center from the Menu (as explained above), click Keyboard under the Hardware category, click the Layouts tab at the top, click the Options… button near the bottom, expand the Miscellaneous compatibility options branch and check the box next to Default numeric keypad keys. If you’ve done this in Ubuntu, you’ll also see that this is very similar.