Sometimes you might want to have a command prompt with the specified command such as php available, without specified the full path to the executable and without altering the system or user environment variables.
There are several ways to achieve this, and here is the simple way I liked to use.
- Make a copy of the Command Prompt shortcut in your start menu
- Right click on the new shortcut and click Properties
- In the Shortcut tab, append the following content into the Target text box. Make sure you got a space before /k
/k "set path=%path%;C:\bin\php54"
- Replace the part C:\bin\php54 with the path to the folder where your executable files are located
At the end you will have something like this:
I was trying to make Raspberry Pi running Raspbian OS to turn it as a media player with can play video without using a keyboard so that it is portable for a trip.
The only software that allow video playback on Raspbian is omxplayer. It is a command line tool and therefore need a keyboard to start playing video. Searched on the Internet and found that it is possible create an application, allowing you to play the video via right clicking the video file and choosing the application to open. However most of scripts included in the Internet are not working on my Raspbian. After a long research I finally figured out a working one.
Later on, I actually found that there other OS such as Raspbmc, OpenELEC which is actually designed turn Raspberry Pi to be a media center and I have another Raspberry Pi for that now. Anyway below are the steps to create applications for video playback on the LXDE desktop environment on Raspbian OS:
- Create a file with the following content at /usr/share/applications/omxplayer-hdmi.desktop. This will allow you to hear the sound output to HDMI.
Exec=lxterminal --command "sudo omxplayer -r -o hdmi %f"
- Create a file with the following content at /usr/share/applications/omxplayer-local.desktop. This will allow you to hear the sound output to the 3.5mm audio jack.
Exec=lxterminal --command "sudo omxplayer -r -o local %f"
Recently I found that my router running DD-WRT is not able to handle NAT loopback (Accessing router’s public IP from internal network). After searching through the Internet, I found this post mentioned that it is a problem in DD-WRT since revision r15760. It is stated that the problem will not be fixed. As a user, we can only apply workaround to the issue. Here are the steps:
- Make sure your DD-WRT version is r15760 or newer
- Navigate to your router administrator page
- Go to the Administrator section, Commands section
- In the Commands text box, input the following command:
iptables -t mangle -A PREROUTING -i ! `get_wanface` -d `nvram get wan_ipaddr` -j MARK --set-mark 0xd001
iptables -t nat -A POSTROUTING -m mark --mark 0xd001 -j MASQUERADE
- Press the Save Firewall button. You should see the following screen:
- Reboot your router, the NAT loopback should be function now
Well while I was working on the old vClcok to add 4×2 widget, I discovered a bug in vzClock in handling 2 widgets of different size. Not sure if this is lucky or not, this bug will never happen on some Android because a bug on Android which prevent it from happening! I cannot rule out that there are some other Android OS from other vender which actually discovered and fixed the bug so I am releasing a new version to fix the bug.
Below is a change log in version 2.1.1:
- [Fix] Fixed a bug when user delete all widget of one type, the another type of widget will stop working
- [Change] Minor UI change
A few months back, Google released Hangout app on Android which replaced the old Google Talk app. The new Hangout app is good, but in some case you might found that you did not receive any notification when new message came.
After some trial and error, I found that it is actually related to the notification sound in which the Hangout app shows that you have selected a notifications sound but actually none was selected behind the scene.
So to fix the issue, here is the step:
- In your Hangout app, go to Setting and select your account
- Click on the notification sound for hangout notification. You will notice that although it displayed a sound to play, when the list of sound is shown, the default selection is actually map to no sound
- Select the sound you want to play
- Repeat step 2 and step 3 for video call as well if you need to
My friend recently asked me if this app got a larger clock for him. This feature is already exists in my new vzClock but sadly his phone is Samsung Galaxy S which is still running Android 2.x. I thought it would be easy to add a 4×2 widget without redesigning but end up spending around 3 hours. Anyway here is the new release and help some other people who want a 4×2 widget are happy as well.
Below is a change log in version 1.4:
+ Added 4×2 size widget
! Bugs fix
All I wanted to say has been mentioned in this post. Apart from that, I have added a detection on the Android version so that the app can prompt the user for upgrading to the new vzClock which has more features.
Below is a change log in version 1.3:
! Bugs fix
+ Added prompt for upgrading to new version vzClock