Archive for the ‘Tips and Tricks’ Category

Time Settings on a Dual-Boot Computer

July 17th, 2016 No comments

When dual-booting Windows 7 and Ubuntu 16.04 on a computer, there is conflict in time settings because of the way the two operating systems set the hardware clock. By default Ubuntu uses UTC while Windows uses local time.

So when you shut down the computer, the hardware clock is set to, say, “13:00”. When you reboot, Windows sees “13:00” as local time but Ubuntu sees that as UTC and so converts the time back from UTC to local time. You can fix this by either asking windows to set the hardware clock with UTC, or Ubuntu to use local time.

To make the change in Ubuntu
You can set the hardware clock time standard through the command line. You can check what you have set to use by:

$ timedatectl | grep local

The hardware clock can be queried and set with the timedatectl command. To change the hardware clock time standard to local time, use:

# timedatectl set-local-rtc 1

If you want to revert to the hardware clock being in UTC, do:

# timedatectl set-local-rtc 0
Categories: Linux, Tips and Tricks, Windows Tags:

Windows 7 SP1 Windows Update Stuck

July 17th, 2016 No comments

Windows Update got stuck at “Check Windows Update …” on a freshly-installed Windows 7 SP1.


  1. Download Windows Update KB3020369 from Microsoft website.
  2. Download Windows Update KB3161608 from Microsoft website.
  3. Install KB3020369. This is required to install the next KB.
  4. Install KB3161608.
  5. Reboot. Run Windows Update again. This should solve the problem.

See this post for details.

Categories: Tips and Tricks, Windows Tags:

TMobile Prepaid 用 OpenVPN 翻墙简单笔记

April 25th, 2013 No comments

OpenVPN 服务器搭建:

  1. 把自己的 Linksys E3000 路由器刷成带 OpenVPN 的 TomatoUSB 固件。
  2. 下载 OpenVPN 软件到电脑。在电脑上生成证书、密码和客户端配置文件。
  3. 在 Linksys E3000 路由器上配置 OpenVPN 服务器 (需要将上一步生成的服务器端的证书和密码上传到路由器上)。OpenVPN 的端口使用默认的 1194 号端口。
  4. 我将在客户端使用 53 号端口连接自己的 OpenVPN 服务器。所以在 Linksys E3000 路由器上设置 将 TCP 53 号端口映射到路由器上的 1194 号端口。这里提一句,之所以我不直接使用 53 号端口作为 OpenVPN 的服务器端口的原因是因为 53 号端口已经被 DNS 服务占用了。
  5. 因为我要从外网连自己的路由器上的 OpenVPN 服务器,而我的 IP 地址又不是静态 IP,所以需要在 FreeDNS 网站上注册一个二级域名然后把这个二级域名指向你自己的外网 IP。

Android 手机设置:

  1. 确认手机的 APN 是:。如果使用 的话会出现连接错误。
  2. 在 Google Play 上下载 OpenVPN for Android。
  3. 将前面生成的客户端的证书、密码和配置文件上传到手机。
  4. 在 OpenVPN for Android 里面导入客户端配置文件。
  5. 现在就可以测试 OpenVPN 连接了。
Categories: Tips and Tricks Tags:

Do Not Open PDF in Firefox

April 13th, 2013 No comments

I don’t like opening pdf files in Firefox so I’d like to disable this feature. To do this, you need to configure both Acrobat and Firefox:

  1. In Firefox, go to Tools -> Options -> Applications. Define the default action for the Portable Document Format (PDF) as “Always Ask”.
  2. In Acrobat, go to Edit -> Preferences. In the “Internet” tab, uncheck “Display PDF in browser”.

This should disable opening PDF files in Firefox. Next time when you click a link to a PDF file, a window will pop up and ask what you want to do with the PDF file.

Categories: Tips and Tricks Tags:

Debian – Some Upgrades Show Packages Being Kept Back

December 13th, 2012 No comments

This is a post copied from here. All the credits go to the author, Steve.

Sometimes when you go to upgrade your machine with apt-get you will see that a package is being “kept back”.

Normally to upgrade a machine you would run:

apt-get update
apt-get upgrade

This should upgrade all the installed packages upon your machine (well at least all those packages which you have installed that have a newer version available), but it doesn’t always do that.

If the dependencies have changed on one of the packages you have installed so that a new package must be installed to perform the upgrade then that will be listed as “kept-back”.

For example my apt-get upgrade today showed this:

root@sun:~# apt-get upgrade
Building Dependency Tree... Done
The following packages have been kept back:
  bind9-host dnsutils imagemagick libmagick6
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

There we can see four packages haven’t been upgraded, even though newer packages are available. This is because two new packages were introduced, and these upgrades depend upon it.

To fix this you must run :

apt-get dist-upgrade

This will upgrade the packages that have newer versions available, and install any new dependencies which are required to do that.

root@sun:~# apt-get dist-upgrade 
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Done
The following NEW packages will be installed:
  libdns16 libdps1
The following packages will be upgraded:
  bind9-host dnsutils imagemagick libmagick6
4 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 3697kB of archives.
After unpacking 1860kB of additional disk space will be used.
Do you want to continue? [Y/n]

Here we can see the two new packages which are required to satisfy the dependencies of the upgrades, libdns16 and libdps1.

Categories: Linux, Tips and Tricks Tags:

Logitech Performance MX Mouse under Xubuntu

November 15th, 2012 No comments

If you Logitech Performance MX Mouse doesn’t work out of box under Xubuntu, there is an easy fix.

Edit the file: /lib/udev/rules.d/97-bluetooth-hid2hci.rules. Change this line:

    # Logitech devices
    KERNEL=="hiddev*", ATTRS{idVendor} =="046d" , ATTRS{idProduct }=="c70[ 345abce] |c71[34bc] ", \
    RUN+="hid2hci --method= logitech- hid --devpath=%p"


    # Logitech devices
    KERNEL=="hidraw*", ATTRS{idVendor} =="046d" , ATTRS{idProduct }=="c70[ 345abce] |c71[34bc] ", \
    RUN+="hid2hci --method= logitech- hid --devpath=%p"

Note that you only need to change “hiddev*” to “hidraw*“.

Restart the machine and your Performance MX Mouse should work now.

Categories: Linux, Tips and Tricks Tags:

Embed Video in PowerPoint with Relative Path

October 5th, 2012 No comments

A very useful tip that I found in this post. Here is the quote:

Seems like relative paths are supported, they are just not straightforward to implement. For example if your Powerpoint presentation is in the MyFiles folder, and the MyMovie.avi is in the Media folder inside MyFiles. The trick is to edit the xml files inside the Powerpoint file:

  • Make a copy of your presentation as Presentation.pptx (just to keep the original safe).
  • Rename your Presentation.pptx file into
  • Open the resulting zip file by clicking on it. It will open as a folder. Inside it, go to ppt, then slides, then _rels. You will see files called slide1.xml.rels etc.
  • Copy (drag and drop) all those to another place, outside the archive. Now open the file corresponding to the number of your slide with video with some editor (for example, Notepad). Look for the line that says something like: Target=”file:///C:\MyFiles\Media\MyMovie.avi”. If your Powerpoint presentation is in the MyFiles folder, and the MyMovie.avi is in the Media folder inside MyFiles, then change the above line to: Target=”Media\MyMovie.avi”.
  • Save the slide1.xml.rels file (or whatever number it was), then drag it back to that archive (that is actually a Powerpoint file), and then rename the archive back to Presentation.pptx.

This is it. Now you should be able to carry around the folder MyFiles with the presentation and with the Media folder inside it that contains your video.

Works for me on Windows 7.

Categories: Tips and Tricks Tags:

Trendnet KVM and VMWare Problem

July 7th, 2012 2 comments

I have a Trendnet TK-207K 2 port USB KVM attached to two computers, one of which has VMWare Workstation on Windows 7. When I am running the VMWare Workstation, the Trendnet kvm suddenly switches to the next machine. It is as if I hit scroll-lock twice to go to the next machine, but I didn’t. Then I have to manually press the button on the top of the kvm and wait for about 20 seconds for it to be re-recognized by the computer running VMWare. Very annoying!

I think the reason why this is happening is: when I’m using VM workstation and I set a num or caps lock status inside a VM and then leave the VM, my Num or Caps goes off and then goes on again when I enter the VM. So something is happening when the VM enters the virtual machine to set the Num and Caps lock, and I’d assume, the Scroll lock status too. If this is done by VM workstation manipulating the keyboard buffer it might literally be “as if you hit scroll lock twice”

The solution I found: first thing, make sure you have installed the VMware tools in your image. If you use the Num Lock, Caps Lock or Scroll Lock make sure they are both set the same on your host computer and your VMware image. For the VMWare image, when the virtual machine boots up, hit F2 to enter BIOS to set the key status.

Categories: Tips and Tricks Tags:

Enable or Disable Quick Launch Toolbar in Windows 7

July 1st, 2012 No comments

This post from Windows 7 Forum has good instructions on how to enable or disable the quick launch tool bar in Windows 7: Enable or Disable Windows 7 Quick Launch Toolbar.

Here is a screenshot:

Enable or Disable Quick Launch Toolbar in Windows 7

Categories: Tips and Tricks, Windows Tags:

Create a Windows 7 Installation USB Flash Drive

July 1st, 2012 No comments

This post from Windows 7 Forum has good instructions on how to manually create a Windows 7 installation USB flash drive: Create a Windows 7 Installation USB Flash Drive. I tried Option Two from the post and it worked well.

Here is a screenshot:

Create a Windows 7 Installation USB Flash Drive

Categories: Tips and Tricks, Windows Tags: