Archives For jimingkui

Make Math Simple in Ubuntu / Elementary OS via NaSC

Last updated: September 2, 2015

nasc-icon

NaSC (Not a Soulver Clone) is an open source software designed for Elementary OS to do arithmetics. It’s kinda similar to the Mac app Soulver.

Its an app where you do maths like a normal person. It lets you type whatever you want and smartly figures out what is math and spits out an answer on the right pane. Then you can plug those answers in to future equations and if that answer changes, so does the equations its used in.

With NaSC you can for example:

  • Perform calculations with strangers you can define yourself
  • Change the units and values ​​(in m cm, dollar euro …)
  • Knowing the surface area of ​​a planet
  • Solve of second-degree polynomial
  • and more …

At the first launch, NaSC offers a tutorial that details possible features. You can later click the help icon on headerbar to get more.

In addition, the software allows to save your file in order to continue the work. It can be also shared on Pastebin with a defined time.

Install NaSC in Ubuntu / Elementary OS Freya:

For Ubuntu 15.04, Ubuntu 15.10, Elementary OS Freya, open terminal from the Dash, App Launcher and run below commands one by one:

1. Add the NaSC PPA via command:

sudo apt-add-repository ppa:nasc-team/daily

2. If you’ve installed Synaptic Package Manager, search for and install nasc via it after clicking Reload button.

Or run below commands to update system cache and install the software:

sudo apt-get update

sudo apt-get install nasc

3. (Optional) To remove the software as well as NaSC, run:

sudo apt-get remove nasc && sudo add-apt-repository -r ppa:nasc-team/daily

For those who don’t want to add PPA, grab the .deb package directly from this page.

Linux Kernel 4.2 was released yesterday, at noon. Linus Torvalds wrote on lkml.org:

So judging by how little happened this week, it wouldn’t have been a mistake to release 4.2 last week after all, but hey, there’s certainly a few fixes here, and it’s not like delaying 4.2 for a week should have caused any problems either.

So here it is, and the merge window for 4.3 is now open. I already have a few pending early pull requests, but as usual I’ll start processing them tomorrow and give the release some time to actually sit.

The shortlog from rc8 is tiny, and appended. The patch is pretty tiny too…

What’s New in Kernel 4.2:

  • rewrites of Intel Assembly x86 code
  • support for new ARM boards and SoCs
  • F2FS per-file encryption
  • The AMDGPU kernel DRM driver
  • VCE1 video encode support for the Radeon DRM driver
  • Initial support for Intel Broxton Atom SoCs
  • Support for ARCv2 and HS38 CPU cores.
  • added queue spinlocks support
  • many other improvements and updated drivers.

How to Install Kernel 4.2 in Ubuntu:

The binary packages of this kernel release are available for download at link below:

Download Kernel 4.2 (.DEB)

NOTE: The kernel binaries are marked as UNSTABLE (see the link url). You may not do this in a production machine, or you have to know what you’re going to do and know about how to restore if something goes wrong (or see the link at bottom).

First check out your OS type, 32-bit (i386) or 64-bit (amd64), then download and install the packages below in turn:

  1. linux-headers-4.2.0-xxx_all.deb
  2. linux-headers-4.2.0-xxx-generic_xxx_i386/amd64.deb
  3. linux-image-4.2.0-xxx-generic_xxx_i386/amd64.deb

After installing the kernel, you may run sudo update-grub command in terminal (Ctrl+Alt+T) to refresh grub boot-loader.

If you need a low latency system (e.g. for recording audio) then download & install below packages instead:

  1. linux-headers-4.2.0_xxx_all.deb
  2. linux-headers-4.2.0-xxx-lowlatency_xxx_i386/amd64.deb
  3. linux-image-4.2.0-xxx-lowlatency_xxx_i386/amd64.deb

For Ubuntu Server without a graphical UI, you may run below commands one by one to grab packages via wget and install them via dpkg:

For 64-bit system run:

cd /tmp/

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200_4.2.0-040200.201508301530_all.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200-generic_4.2.0-040200.201508301530_amd64.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-image-4.2.0-040200-generic_4.2.0-040200.201508301530_amd64.deb

sudo dpkg -i linux-headers-4.2.0-*.deb linux-image-4.2.0-*.deb

For 32-bit system, run:

cd /tmp/

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200_4.2.0-040200.201508301530_all.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200-generic_4.2.0-040200.201508301530_i386.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-image-4.2.0-040200-generic_4.2.0-040200.201508301530_i386.deb

sudo dpkg -i linux-headers-4.2.0-*.deb linux-image-4.2.0-*.deb

Finally restart your computer to take effect.

To revert back, remove old kernels, see install kernel simply via a script.

Install / Upgrade to EasyTag 2.4 in Ubuntu 14.04

Last updated: September 5, 2015

EasyTag audio tag editor has reached the 2.4.0 version this weekend, as the first release of a new stable series.

EasyTag 2.4.0 brings a few improvements and bug fixes listed below:

  • Correct the disc number format specifier to %z
  • Fix multiple CDDB searches during a single run
  • Improve handling of tags with empty images
  • Link to the online application help on Windows
  • Remember the paned position in the main window between restarts
  • Improve handling of file list selection
  • Fix a crash when deleting files from within the application
  • Fix a crash when reading FLAC files
  • Fix a crash when navigating the directory browser with the keyboard
  • Remove a few internal FIXMEs with some refactoring

If you’re still using EasyTag 2.2.x, there are also lots of fixes, translation updates and below features added since the 2.3 unstable series:

  • preliminary support for HiDPI displays
  • album artist support for APE tags

Install / Upgrade EasyTag in Ubuntu 15.04/14.04:

To install it from PPA, open terminal from the Dash, App Launcher, or via Ctrl+Alt+T on keyboard. When it opens, run below commands one by one:

sudo add-apt-repository ppa:amigadave/ppa

sudo apt-get update

sudo apt-get install easytag

For those who don’t want to add PPA, select download the .deb installer from the link below, easytag_2.4.0-xxx_amd64.deb for 64-bit OS, or easytag_2.4.0-xxx_i386.deb for 32-bit OS.

Finally click to open it via Ubuntu Software Center and install the software.

Download EasyTag .Deb installer

Nvidia 352.41 Released, How to Install via PPA

Last updated: August 29, 2015

NVIDIA driver 352.41 for Linux was released a few hours ago with GeForce GTX 950, Quadro M4000 and M5000 GPUs support.

The new driver also brings two important fixes:

  • Fixed a bug that caused VDPAU to only display the top half of a video frame when decoding and displaying H.265/HEVC encoded video streams.
  • Fixed a bug that caused the X server to crash if an OpenGL application tried to allocate a drawable when GPU-accessible memory is exhausted.

Install / Upgrade to Nvidia 352.41 in Ubuntu:

Thanks the Ubuntu community for maintaining a new NVIDIA PPA that contains the most recent Nvidia proprietary GPU drivers. So far Ubuntu 15.04, Ubuntu 15.10, and Ubuntu 14.04 are supported.

1. To add the PPA.

Open terminal from the Dash, App Launcher, or via Ctrl+Alt+T shortcut keys. When it opens, run command:

sudo add-apt-repository ppa:graphics-drivers/ppa

For those who’ve added Xorg-edgers PPA and Michael Marley’s Nvidia PPA (deprecated), remove them via:

sudo add-apt-repository --remove ppa:xorg-edgers/ppa

sudo add-apt-repository --remove ppa:mamarley/nvidia

2. After that, update system cache and install new driver package via either Synaptic Package Manager after clicking Refresh button or below commands in terminal:

sudo apt-get update

sudo apt-get install nvidia-352 nvidia-settings

Want to install the latest Linux Kernel? A simple script can always do the job and make things easier in Ubuntu.

Michael Murphy has created a script makes installing the latest RC, stable, or lowlatency Kernel easier in Ubuntu. The script asks some questions and automatically downloads and installs the latest Kernel packages from Ubuntu kernel mainline page.

Install / Upgrade Linux Kernel via the Script:

1. Download the script from the right sidebar of the github page (click the “Download Zip” button).

2. Decompress the Zip archive by right-clicking on it in your user Downloads folder and select “Extract Here”.

3. Navigate to the result folder in terminal by right-clicking on that folder and select “Open in Terminal”:

It opens a terminal window and automatically navigates into the result folder. If you DON’T find the “Open in Terminal” option, search for and install nautilus-open-terminal in Ubuntu Software Center and then log out and back in (or run nautilus -q command in terminal instead to apply changes).

4. When you’re in terminal, give the script executable permission for once.

chmod +x *

FINALLY run the script every time you want to install / upgrade Linux Kernel in Ubuntu:

./*

I use * instead of the SCRIPT NAME in both commands since it’s the only file in that folder.

If the script runs successfully, restart your computer when done.

Revert back and Uninstall the new Kernel:

To revert back and remove the new kernel for any reason, restart your computer and select boot with the old kernel entry under Advanced Options menu when you’re at Grub boot-loader.

When it boots up, see below section.

How to Remove the old (or new) Kernels:

1. Install Synaptic Package Manager from Ubuntu Software Center.

2. Launch Synaptic Package Manager and do:

  • click the Reload button in case you want to remove the new kernel.
  • select Status -> Installed on the left pane to make search list clear.
  • search linux-image- using Quick filter box.
  • select a kernel image “linux-image-x.xx.xx-generic” and mark for (complete) removal
  • finally apply changes

Repeat until you removed all unwanted kernels. DON’T carelessly remove the current running kernel, check it out via uname -r (see below pic.) command.

For Ubuntu Server, you may run below commands one by one:

uname -r

dpkg -l | grep linux-image-

sudo apt-get autoremove KERNEL_IMAGE_NAME

How to Watch Hulu Videos in Ubuntu / Linux Mint

Last updated: August 24, 2015

Due to the changes to incorporate Adobe Flash DRM technology, Hulu movies and TV shows are not longer working on Ubuntu Linux without HAL support since a couple of weeks ago.

A couple of weeks ago, Hulu made some changes to their video playback system to incorporate Adobe Flash DRM technology. Unfortunately, this meant that Hulu no longer functioned on Ubuntu because Adobe stopped supporting Flash on Linux several year ago, and therefore Adobe’s DRM requires HAL which was likewise obsoleted about 4 years ago and was dropped from Ubuntu in 13.10. The net result is that Hulu no longer functions on Ubuntu.

Fortunately, Michael Blennerhassett has maintained a PPA repository with HAL packages for all current releases and derivatives, e.g, Ubuntu 15.10, Ubuntu 15.04, Ubuntu 14.04, Linux Mint 17.

Below is how-to install the HAL (Hardware Abstraction Layer) from PPA:

1. Add the PPA. Open terminal from the Dash, App Launcher, or via Ctrl+Alt+T shortcut key. When it opens, run command:

sudo add-apt-repository ppa:mjblenner/ppa-hal

2. After adding the PPA, install hal package via Synaptic Package Manager. Or by running below commands in terminal:

sudo apt-get update

sudo apt-get install hal

via: nhaines.com

I rarely use headphones on my Ubuntu laptop. But when I plugged in ones today, sound was coming from both headphones and speakers in Ubuntu 14.04.

This is a very old bug with alsamixer. If you happen to have this issue on Ubuntu 14.04, you may try below steps to fix it:

1. Launch a terminal window from the Dash, App launcher, or via Ctrl+Alt+T shortcut key. When it opens, run below command and hit enter:

alsamixer

When you see following screen, use Left/Right arrow key to navigate and choose Auto-Mute, then enable it via Up/Down arrow key.

2. If it does not work, try GNOME ALSA Mixer which can be installed from Ubuntu Software Center or by running below command in terminal:

sudo apt-get install gnome-alsamixer

Then start it from the Dash or via gnome-alsamixer command and enable Auto-Mute Mode

3. Does not work? Well, here is how to install the latest ALSA driver for a “HDA Intel” sound card in Ubuntu 14.04, which fixed the issue for me.

First make sure you have dkms package installed. Install it either from Ubuntu Software Center or via below command in terminal:

sudo apt-get install dkms

Then select download the latest ALSA driver from THIS PAGE.

Depends on your Kernel version, check it out via uname -r command,

select download:

  • oem-audio-hda-daily-dkms_xxx.deb for 3.13 kernel
  • oem-audio-hda-daily-lts-utopic-dkms_xxx.deb for 3.16 kernel
  • oem-audio-hda-daily-lts-vivid-dkms_xxx.deb for 3.19 kernel

After you installed the .deb package, restart you computer and plug / re-plug in headphones to see results.

uText is a very simple markdown editor with live text preview and syntax highlighting support. Supported export formats: HTML, ODT, PDF

uText is a minimalist text editor with syntax markdown focused on writing, providing all the tools and facilities that the user may need. It’s written in Python and developed by atareao team who’s behind touchpad-indicator and my-weather-indicator.

The editor features:

  • Live text preview
  • Day, Night, and fullscreen mode to focus on writing.
  • Search and replace, spell check
  • save in dropbox.
  • other common options

To install this editor:

Open terminal from the Dash, App Launcher, or via Ctrl+Alt+T shortcut keys. When it opens, run below commands to get it from the developer’s PPA:

sudo add-apt-repository ppa:atareao/utext

sudo apt-get update

sudo apt-get install utext

Or you can directly download and install the “utext_x.x.x_all.deb” package from PPA ARCHIVE. The .deb works on all current Ubuntu releases though it’s built against Ubuntu 15.04.

Arc-theme, a beautiful, flat theme with transparent elements for GTK 3 and GTK 2 based desktop environments like Gnome, Unity, Budgie, Pantheon, etc.

Arc-theme is a new theme project still under development. It’s available is in three variants:

Arc theme

Arc Dark

Arc Darker

Full preview in Ubuntu Unity with Numix circle icons:

If you like the theme, try it by installing the .deb package available in the link below:

Download arc-theme .deb

Needs Ubuntu 15.04 (higher), or Elementary OS Freya because it depends on GTK 3.14 / 3.16.

Once installed, apply the themes via Unity Tweak Tool (or System Settings -> Tweaks).

How to Install Kodi 15.1 in Ubuntu 15.04, 14.04

Last updated: August 17, 2015

The first maintenance release of Kodi 15 “Isengard” has been released. Official PPA’s ready for Ubuntu 15.04, Ubuntu 14.04 and derivatives, e.g. Linux Mint 17.x, and Elementary OS Freya.

Following issues has been fixed in Kodi 15.1, remaining issues will be fixed in next point release in the 15.x range.

  • Flush renderbuffers when flushing video player
  • Fix broken network.bandwidth setting
  • Fix stuttering in PVR windows
  • Fix holding lock while querying PVR backend
  • Unsigned apps are not working on jailbroken iOS 5.1 devices
  • Add installed languages to the list of possible stream languages
  • Ensure that file descriptor for logfile is NULL’ed
  • Fixes a crash when trying do delete a file in filemanager
  • Reimplement Cocoa_GetVolumeNameFromMountPoint for OSX
  • Update label color for sliderex controls
  • CProgressJob: fix crash in DoModal
  • Fix missing return in CGUIWindowPVRBase::OnBack
  • FFmpeg: Bump to 2.6.4
  • Handle startup splash as regular window
  • Fix linkage for VTB framework for iOS
  • Fix broken native keyboard on iOS 5.1.1 devices
  • Fix wrong navigation in SmartPlaylistEditor.xml
  • Make some virtual filesystems available when no network is available yet
  • Fix formatting on mysql queries that could cause crash on update
  • Only set mouse wheel control spin and slider controls when they are actually focusses
  • Respect view mode changes of EPG when controlling number of EPG updates
  • Handle startup splash as regular window which prevent problems if PVR or masterlock is used as startup window
  • Fix watched flag not displaying if item is also resume-able
  • Remove some logging on exiting that could crash on exit in some cases
  • Fix overlapping subtitles in some cases

Install / Upgrade Kodi 15.1 in Ubuntu:

1. Add the official PPA.

Open terminal from the Dash, App launcher, or via Ctrl+Alt+T shortcut key. When it opens, run below command in terminal:

sudo add-apt-repository ppa:team-xbmc/ppa

2. Install/Upgrade Kodi

After adding the PPA, you can directly upgrade Kodi by launching Software Updater / Update Manager after checking for updates.

Or you can run below commands one by one in terminal to install it for the first time:

sudo apt-get update

sudo apt-get install kodi

You may also install the encoder and addons via command:

sudo apt-get install kodi-audioencoder-* kodi-pvr-*

Once installed, log out and select log in with Kodi session. Or launch the media center from the Dash (may need restart).