Archives For November 30, 1999

Ubuntu and Windows dual boot

For users who dual boot Ubuntu 16.04 and Windows, you may find the clock time is off that causes time differences after you reboot and switch between the two systems. Here’s how to fix it.

Ubuntu maintains the hardware clock (RTC, real time clock) in universal time (UTC) by default while Windows maintains the clock in local time, thus causing time conflicts between Ubuntu and Windows.

To fix it, either set Ubuntu to maintain RTC in local time or make Windows uses UTC.

1. Disable UTC and use Local Time in Ubuntu:

In previous Ubuntu editions, you can edit the config file /etc/default/rcS to disable UTC.

In Ubuntu 16.04, open terminal (Ctrl+Alt+T) and run the command below instead:

timedatectl set-local-rtc 1 --adjust-system-clock

To check out if your system uses Local time, just run:

timedatectl

you’ll the local time zone is in use in the Warning section.

Finally restart and switch to Windows, adjust system clock time if need and done.

2. Make MicroSoft Windows uses UTC:

Another way to fix this issue is doing the following changes in Windows, Windows 10, in the case below:

1.) First if you’ve switched to local time in Ubuntu, run command in Ubuntu terminal to use back UTC:

timedatectl set-local-rtc 0

2.) Restart and select boot into Windows 10, when you’re in, do:

  • go to Start Menu, search for and launch cmd as Administrator.
  • When the command console opens, paste below command to create a DWORD value to the registry:
    Reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_DWORD /d 1

    For 64-bit Windows, use a QWORD value instead:

    Reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_QWORD /d 1

  • Disable the “internet update” for the time and reboot.

This is a quick tutorial shows how to easily install the Light Table IDE in 64-bit Ubuntu via PPA, since there’s no official .deb binary for Ubuntu Linux.

Light Table is a cross-platform and open-source IDE that features real-time feedback allowing instant execution, debugging and access to documentation.

To make it easy to install Light Table IDE in Ubuntu, there’s now a PPA that contains an installer script, which automatically downloads the official Linux package from its website, installs and creates a launcher shortcut in your system for better Ubuntu integration.

1. First download the script from the link below:

Select download the package “lighttable-installer_xxx_amd64.deb”, the click install via Ubuntu Software.

Or open terminal (Ctrl+Alt+T) and run command install the downloaded package. The script starts automatically after installation:

sudo dpkg -i ~/Downloads/lighttable-installer_*.deb

If everything goes OK, you’ll be finally able to launch the IDE from Unity Dash, or other Application Launcher.

2. (Optional) To receive future updates of Light Table along with other system udpates, you may add the PPA repository so to get updates via Software Updater once a new release is made into PPA.

sudo add-apt-repository ppa:dr-akulavich/lighttable

You can then disable, remove, or edit the PPA via System Settings -> System -> Software & Updates -> Other Software.

Want to install Microsoft fonts, Google web fonts for off-line use, or you just found a favorite font on the web and want to install it in Ubuntu?

Well here’s how to install the font files (.ttf, .ttc) downloaded from web, Google fonts page, or copied from your Windows OS.

Here are 4 font files shown in the picture above. In the steps below I’ll show you how to install and use it in Ubuntu Desktop.

Option 1: Install Fonts for current user only

If you want to install the fonts for current user use only, then simply open up a “Files” (file manager) window, press Ctrl+H to show hidden folder, and navigate to .local/share/fonts (create fonts sub-folder if not exist).

Next, drag’n’drop your font files into that directory, or a sub-folder of that directory.

Finally, press Ctrl+Alt+T on keyboard to open terminal, and run command to refresh the cache:

sudo fc-cache -fv

Next, your system configuration tool can find and allow you to apply the fonts

Option 2: Manually install Fonts to system wide use

To install fonts for all users use, do the following steps one by one instead.

1. Launch Terminal from start menu, or by pressing Ctrl+Alt+T on keyboard:

When it opens, paste following commands and run one by one.

2. In Ubuntu Linux, font files are installed to /usr/local/share/fonts or /usr/share/fonts. The former directory is recommended in this case for manual installation.

First create a sub folder in the font directory, ms_fonts, as example:

sudo mkdir /usr/local/share/fonts/ms_fonts

Type in your password when it asks (no visual feedback) and hit Enter.

3. Move all font files from your Downloads directory to the new created folder:

sudo mv ~/Downloads/*.ttc ~/Downloads/*.ttf /usr/local/share/fonts/ms_fonts/

4. Set permissions to these files by running the commands below one by one:

sudo chown root:staff /usr/local/share/fonts/ms_fonts -R

sudo chmod 644 /usr/local/share/fonts/ms_fonts/* -R

sudo chmod 755 /usr/local/share/fonts/ms_fonts

5. Finally builds font information caches for apps using fontconfig for their font handling:

sudo fc-cache -fv

Now you can apply new installed fonts via GNOME Tweaks (available in Ubuntu Software / App Center) in default GNOME desktop:

For Chrome browser, go to Settings -> Advanced settings-> Web contents -> Customize fonts.

The Linux Kernel 4.6 stable has been released. Linus Torvalds announced this kernel release in lkml.org:

    It’s just as well I didn’t cut the rc cycle short, since the last week ended up getting a few more fixes than expected, but nothing in there feels all that odd or out of line. So 4.6 is out there at the normal schedule, and that obviously also means that I’ll start doing merge window pull requests for 4.7 starting tomorrow.

    Since rc7, there’s been small noise all over, with driver fixes being the bulk of it, but there is minor noise all over (perf tooling, networking, filesystems, documentation, some small arch fixes..)

New features in Kernel 4.6:

  • Initial open-source support for GTX 900 series
  • Runtime AHCI power management support for greater power savings
  • Dell laptop support improvements
  • Better security for 32-bit Linux programs.
  • Various open-source AMD graphics driver improvements.
  • A number of new ARM hardware support.

How to Install Kernel 4.6 in Ubuntu:

There are .deb packages for this kernel release available in kernel-ppa/mainline:

Download and install the packages named below one by one according to your OS type (i386 for 32-bit, amd64 for 64-bit):

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

For a low latency system (e.g. for recording audio) install following packages instead:

  1. linux-headers-4.6.0-xxx_all.deb
  2. linux-headers-4.6.0-xxx-lowlatency_xxx_i386/amd64.deb
  3. linux-image-4.6.0-xxx-lowlatency_xxx_i386/amd64.deb

You can also download and install these debs by running the commands below in terminal/console:

For 64-bit system:

cd /tmp/

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-yakkety/linux-headers-4.6.0-040600_4.6.0-040600.201605151930_all.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-yakkety/linux-headers-4.6.0-040600-generic_4.6.0-040600.201605151930_amd64.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-yakkety/linux-image-4.6.0-040600-generic_4.6.0-040600.201605151930_amd64.deb

sudo dpkg -i *.deb

For 32-bit system

cd /tmp/

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-yakkety/linux-headers-4.6.0-040600_4.6.0-040600.201605151930_all.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-yakkety/linux-headers-4.6.0-040600-generic_4.6.0-040600.201605151930_i386.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-yakkety/linux-image-4.6.0-040600-generic_4.6.0-040600.201605151930_i386.deb

sudo dpkg -i *.deb

Restart your computer after installation to apply changes.

Restore:

You can easily switch back to the previous kernel by restart your machine and select boot with old kernel version (available in Advanced options). Then use Ubuntu-Tweak or follow this guide to remove Kernel 4.6.

While Ubuntu 16.04’s repository contains the old SMPlayer 15.11 packages, you can easily upgrade to the latest 16.4 release and receive future updates by using the SMPlayer PPA.

Changes in SMPlayer 16.4.0:

  • The Windows installer now includes mpv as well.
  • Now it’s easier to switch between MPlayer and mpv via Preferences -> General -> select multimedia engine.
  • The extrastereo filter works again when using mpv.
  • Possibility to use the VLC shortcuts. (Preferences -> Keyboard and mouse, click the load button, select vlc.keys).
  • Possibility to enable mouse gestures (when the mouse is dragged up or down in the video window the volume changes, if dragged left or right it changes the time position). You can enable this option in Preferences -> Keyboard and mouse -> Mouse -> Drag function: seek and volume.
  • A fix for saving bookmarks.
  • The option for streaming sites in Preferences -> Network is different now, and allows these values: disabled, auto, YouTube and mpv+youtube-dl.
  • An animated icon has been added in the status bar to indicate when the player is buffering.
  • A new layout is used to display the media information (Options -> View info and properties).

How to Install/Upgrade SMPlayer 16.4 via PPA:

NOTE: The current 16.4.0 build available in PPA is based on QT 4.8.7, while the stock version in Ubuntu 16.04 repo is built against Qt5.

1. Add PPA.

Open terminal (Ctrl+Alt+T), paste the command below and hit run:

sudo add-apt-repository ppa:rvm/smplayer

Type in your password (no visual feedback) when it asks and hit Enter to continue.

2. Install/Upgrade SMPlayer.

If you have a previous release installed, you can now upgrade the media player by launching Software Updater and installing SMPlayer package updates after checking for updates.

For the first time installing this player, use your favorite package manager or just run the commands below one by one in terminal:

sudo apt update

sudo apt install smplayer smtube smplayer-themes smplayer-skins

3. (Optional) To revert back the stock version of SMPlayer in Ubuntu 16.04, install ppa-purge and purge the PPA, which also downgrade the packages installed from that repository:

sudo apt install ppa-purge && sudo ppa-purge ppa:rvm/smplayer

Corebird, a native GTK3 Twitter client, has reached 1.2.1 release with some fixes. Here are the changes according to its release page:

  • Fix a11y labelling of several switches in the settings dialog
  • Fix an input window clipping bug in the tweet info page
  • Fix a few cases of overlapping widgets into window borders
  • Remove the “Save as” context menu from inline media. This has not been working in a while but the context menu was still there.
  • Rename the .sidebar style class to .topbar. This was used in corebird before gtk+ used it, but now that the sidebar is at the top, the .sidebar style from gtk+ themes collides with the horizontal alignment we use, so use the more fitting ‘.topbar’.
  • Show a focus outline in the topbar again. We are setting a custom background color here, so we also need to set a fitting outline color.
  • Fix a coloring but in the topbar, where wildcard selectors in themes would overrde our foreground color.

How to Install Corebird 1.2.1:

While the 16.04 universe repository provides the old Corebird 1.1 release, you can upgrade to version 1.2.1 via third-party PPA since there’s no official Linux installer.

Open terminal (Ctrl+Alt+T) and run the commands below one by one to add PPA and install corebird:

sudo add-apt-repository ppa:ubuntuhandbook1/corebird

sudo apt update

sudo apt install corebird

For those who don’t want to add PPA, grab the .deb installer from the link below:

Select download:

  • corebird_1.2.1-1~ubuntu16.04_amd64.deb for 64bit 16.04
  • corebird_1.2.1-1~ubuntu16.04_i386.deb for 32bit 16.04

Then click install via Ubuntu Software, or by running command in terminal:

sudo dpkg -i ~/Downloads/PACKAGE_NAME; sudo apt-get -f install

How to Install Ubuntu Tweak in Ubuntu 16.04

Last updated: April 4, 2019

For users of Ubuntu 16.04 LTS who still need Ubuntu Tweak, especially for its Janitor (system cleaning) feature, a repacked of 0.8.7 release now is available in GetDeb repository.

If you have already added Getdeb App repository, just search for and install Ubuntu Tweak via your package manager or use apt install command. For those who don’t want to add the repository, follow the steps below:

1. Download the deb installer:

2. Click install the package via Ubuntu Software.

Or open terminal (Ctrl+Alt+T), run the commands below one by one to install it via dpkg and fix dependency problem via apt:

sudo dpkg -i ~/Downloads/ubuntu-tweak_0.8.7-1~getdeb2~xenial_all.deb

sudo apt-get -f install

3. (Optional) If you want to remove the tool, run the command below in terminal:

sudo apt remove ubuntu-tweak

A patched version of Notify OSD with some extra features to Ubuntu’s on-screen-display notifications is available in Leolik’s PPA.

With the patch and a graphical Notify OSD configuration tool, you can easily tweak the notification bubbles by:

  • Close notification bubble on click
  • Stop fading out when mouse cursor hovers on it.
  • Change notification display timeout.
  • Change notification bubble location
  • Edit the bubble size, background, transparency, etc.
  • Edit the text size, color, etc.

1. Install the patched version of Notify OSD:

Open terminal (Ctrl+Alt+T) and run the commands below one by one to get it from PPA:

sudo add-apt-repository ppa:leolik/leolik

sudo apt update

sudo apt install notify-osd

Or grab the .deb installer from the link below:

Select download and install the latest version of:

  • notify-osd_x.x.x+16.04.x.x.x-0ubuntu1-leolik~ppa0_i386.deb for 32-bit Ubuntu 16.04
  • notify-osd_x.x.x+16.04.x.x.x-0ubuntu1-leolik~ppa0_amd64.deb for 64-bit Ubuntu 16.04

2. Restart notify-osd daemon by running the command below in terminal:

pkill notify-osd

Just close the terminal after running the command since there’s no terminal output.

3. Install a graphical configuration tool for NotifyOSD:

Open terminal (Ctrl+Alt+T) and run the commands below one by one to get it from Webupd8 PPA:

sudo add-apt-repository ppa:nilarimogard/webupd8

sudo apt update

sudo apt install notifyosdconfig

Or grab the .deb installer from the link below:

Select download and install the latest version of:

  • notifyosdconfig_x.x+xxx~ubuntu16.04.1_i386.deb for 32-bit Ubuntu 16.04
  • notifyosdconfig_x.x+xxx~ubuntu16.04.1_amd64.deb for 64-bit Ubuntu 16.04

4. Finally launch the configuration tool and enjoy customizing your on-screen notifications:

For LVM, encrypted, or limited-storage systems, you need to regularly remove old kernels to prevent your computer (/boot partition) from running out of storage space.

Removing old kernels is easy. You can do it manually, or set unattended-upgrades to do it automatically. For details, open terminal from App Launcher or via Ctrl+Alt+T shortcut keys, and follow the steps below:

Remove Automatically Installed Kernels:

1. To remove the kernels that were automatically installed via regular system updates, open terminal and run:

sudo apt autoremove --purge

It will ask you to type in user password and then remove old kernels as well as other automatically installed packages that are no longer needed.

2. To enable automatic removing of old kernels:

  • Run command to enable unattended upgrades. For Desktop Ubuntu 16.04, this is enabled by default.
    sudo dpkg-reconfigure unattended-upgrades
  • Edit the config file via command (first install gksu via sudo apt install gksu):
    gksudo gedit /etc/apt/apt.conf.d/50unattended-upgrades
  • When the file opens, uncomment the following line and change the value to true:

    //Unattended-Upgrade::Remove-Unused-Dependencies "false";

    So it looks like:

    Remove Manually Installed Kernels:

    If you install latest kernels from Kernel PPA, or build your own kernels with patches, a “purge-old-kernels” script is the best and the easiest way to remove old kernels.

    1. The script is maintained in byobu package, so first install it via:

    sudo apt install byobu

    2. Then run the script regularly to remove old kernels:

    sudo purge-old-kernels

    Remove Old Kernels via DPKG

    If your /boot partition has already full while doing an upgrade or package install, and apt (the script above uses apt) can’t remove packages due to broken dependency, here you can manually find out the old kernel packages and remove them via DPKG:

    1. Run command to check out current kernel and DON’T REMOVE it:

    uname -r

    2. List all kernels excluding the current booted:

    dpkg -l | tail -n +6 | grep -E 'linux-image-[0-9]+' | grep -Fv $(uname -r)

    Example output:

    rc  linux-image-4.4.0-15-generic               4.4.0-15.31                                         amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
    ii  linux-image-4.4.0-18-generic               4.4.0-18.34                                         amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
    rc  linux-image-4.6.0-040600rc3-generic        4.6.0-040600rc3.201604120934                        amd64        Linux kernel image for version 4.6.0 on 64 bit x86 SMP

    There will be three status in the listed kernel images:

    • rc: means it has already been removed.
    • ii: means installed, eligible for removal.
    • iU: DON’T REMOVE. It means not installed, but queued for install in apt.

    3. Remove old kernel images in status ii, it’s “linux-image-4.4.0-18-generic” in the example above:

    sudo dpkg --purge linux-image-4.4.0-18-generic

    If the command fails, remove the dependency packages that the output tells you via sudo dpkg --purge PACKAGE.

    And also try to remove the respective header and common header packages (Don’t worry if the command fails):

    sudo dpkg --purge linux-image-4.4.0-18-header linux-image-4.4.0-18

    Finally you may fix the apt broken dependency via command:

    sudo apt -f install

    Ubuntu Tweak Officially Discontinued

    Last updated: May 5, 2016

    Ubuntu Tweak, one of the most popular Ubuntu configuration tools, now is officially discontinued!

    Tualatrix Chou, the creator and maintainer, finally announced the discontinuation of Ubuntu Tweak in his Chinese blog a few days ago, though the last software update was more than one year ago.

    The website Ubuntu-Teak.com has been redirected, and it will be shut off one year later, though it’s still getting 4000+ visits per day. Moreover, the Github and Launchpad page has been added a line said “This project is no long under maintenance”.

    Ubuntu Tweak Alternative:

    The best alternatives are Unity Tweak Tool for Unity Desktop and Gnome Tweak Tool for Gnome Shell. Both can be installed via Ubuntu Software App.

    Unity Tweak Tool for Unity

    Gnome Tweak Tool for Gnome Shell