(1) Use Windows Key + i to open “Windows Settings”
(2) Search “Optional features”
(3) Expand “Add a feature”, select “XPS Viewer”, and install
Tag: tools
VirtualBox Ubuntu host enable webcam for Windows client
I have a Dell XPS 13 (9343, 2015 developer edition) with Ubuntu 16.04 and VirtualBox. I created a Windows 10 client and want to test a Windows app with webcam support.
Step 1. Install “Oracle VM VirtualBox Extension Pack”
Before this is installed, if you run command VBoxManage list webcams
, you will get error:
VboxMange: error: No extension pack by the name ‘Oracle VM VirtualBox Extension Pack’ was found.
You can download this Extension Pack from virtualbox.org. After it’s installed, running VBoxManage list webcams
will find the cam and its result is like:
Video Input Devices: 1
.1 “Integrated_Webcam_Hd”
/dev/video0
Step 2. Start the Windows 10 client, then in VirtualBox’s Devices menu, there is Webcams, check it.
Now Windows will automatically set up this new device. After all are set up, you can run Windows “Camera” app to verify it works.
Convert video to frame images on Mac OS
brew install ffmpeg
ffmpeg -i test.MOV -vf fps=15 thumb%04d.jpg -hide_banner
Note: option -vf fps=15
means generating 15 frame images per second of the video.
Delete simulator instance files on Mac OS
If you find the folder for iOS simulator instances: ~/Library/Developer/CoreSimulator/Devices/
uses too much storage, you can delete some of these files in this way:
- List the simulators’ IDs
xcrun simctl list devices
- Delete simulator by ID
xcrun simtrl delete SIMULATER_ID
Note: if there is error saying simctl
is not found, you can specify its full path, e.g. xcrun /Applications/Xcode.app/Contents/Developer/usr/bin/simctl list devices
Use Apple USB-C Digital AV Multiport Adapter with Ultrafine 4K monitor
When I first used Apple USB-C AV adapter (MJ1K2AM/A) on my Mac mini 2018, there were several problems. But I found these are just some setup issues.
HDMI: I use my Mac mini with 2 Ultrafine 4K (by TB3) and 1 Dell P2415Q (by HDMI), all 4K @ 60Hz. I want to test the HDMI port of this adapter works. When I insert this adapter on a 3rd TB3 on my Mac mini, and connect its HDMI port to P2415Q, there is no video output.
The solution is, just unplug one of the Ultrafine 4K monitor (from TB3). It seems the HDMI port on this adpater only works when there is at most one other monitor plugged in (by TB3). And yes, when use this adapter, the monitor can only run 4K @ 30Hz.
USB: the USB port on this adapter works perfectly when I insert it to the TB3 port of Mac mini. However, when I insert it to the USB-C ports on the back of Ultrafine 4K monitor, the USB port doesn’t work.
The solution is simple: just unplug the TB3 cable of the Ultrafine monitor from Mac mini, then insert the adapter to the monitor, and finally plug the TB3 cable to Mac. I guess there is some data re-negotiation happens.
Ubuntu Guest Using SD Card Reader in VMware Workstation
My laptop has a SD Card Reader. I want to use it in Ubuntu guest OS (the host is Win7).
The method is widely available if you search it:
Step 1. In Win7, Computer Management -> Disk Management, find the disk number of the SD card. In my system it’s “Disk 1”
Step 2. In the settings of Ubuntu VM, Hardware -> Add -> “Hardware Type” select “Hard Disk”, Next -> “Virtual Disk Type” select “IDE”, Next -> select “Use a physical disk”, Next -> In “Device”, select (in my system) “PhysicalDrive1”.
The problem is: there is always only “PhysicalDrive0” shown in the above step, even when I can see “Disk 1” (SD card) in Windows Disk Management.
After wasting a few hours, I found the solution: VMware Workstation, at least on Win 7 (I haven’t tested other OS), should be started with “Run as administrator“. Then you will see “PysicalDrive1” (or what ever drive corresponding to the SD card).
Hope this trick can save you some time.
URL address of CBSN live streaming
When I open https://www.cbsnews.com/live/ to live stream CBS News, I found the CPU usage is nearly 100% and there are about 50 threads running at the same time for this process. You can find the URL address of the video source by checking the source code of the webpage. In my case, the video URL is something like the following, and open it in the browser.
https://dai.google.com/linear/hls/p/event/(SOME ID)/stream/(SOME ID):MRN/variant/(SOME ID)/bandwidth/3009600.m3u8
One additional benefit of directly using the video URL is, in Safari, it enables “Picture in Picture”.
Delete Opera (bundled with FileZilla) on Mac
I understand free softwares such as FileZilla need money to sustain, but it’s annoying for FileZilla to pin Opera on the dock of my MacBook (after I forgot to uncheck the “option” to install Opera). More annoying is I can’t find the Opera app in the /Applications folder. After searching for a few minutes, I found the Opera app was in
~/Applications
So just delete “Opera.app” and remove its icon from the dock.
(Some other words: Opera browser is partly owned by QiHoo 360, a Chinese company notorious for its difficult-to-uninstall and hijack-your-browser “anti-virus” softwares for Windows. Hey 360, leave Mac alone!)
Remove URL from references in Elsevier latex template
Using the default Elsevier latex template, there is a URL in each bibliography reference with “Bdsk-Url” fields. To remove this URL,
1. Open the BTS (bibliography style) file being used (by default “els article-num.bst”).
2. For each BibTeX item type (e.g. “inproceedings”), find the corresponding function in the above BST file (e.g. “FUNCTION {inproceedings}”), then comment out “write.url” in the end of this function (i.e. change it to “%write.url”).
(To remove such URLs for IEEE template, please refer to http://writebuffer.com/remove-url-in-ieeetran-bibliography-on-mac-os/)
If you have better solutions, please let me know. Thanks.
Disable NVIDIA driver on unbootable MacOS High Sierra
I installed the NVIDIA Web Driver on my MacBook Pro (Mid 2014 w/ GT750M) due to sluggish High Sierra. At first, it seemed to improve the graphics performance a bit. However, when I tried to restart the MacBook later, it just stuck on Apple logo with progress bar not finishing moving.
In Safe Boot, I can’t access the NVIDIA Driver Manager. Right now my solution is to clear the Macbook’s NVRAM (nonvolatile random-access memory). Caution: it will also reset several other settings. The method is: press Option, Command, P, and R together, and then start the computer.
If you have better solutions, please leave your comments. Thanks.