Friday, May 30, 2014

BGinfo display only active IP address

One of the pains of using BGinfo is that it lists too many non functional IP addresses.  To solve this (partly), this post talks about using a custom entry:

http://www.renjithmenon.com/how-to-set-bginfo-to-display-only-the-active-network-cards-ip-address/

This, for me, is only a partial solution as I want to show only the active network card information for things like the DNS, Subnet etc.  To do this, I created custom fields in BGinfo and (sort of replaced) the existing fields.

Here are the details:

I clicked Custom > New > WMI Query > Browse.  For the Identified (name) I use the same name as exists, but I do 2 things differently so that I don't overwrite the existing BGinfo entry.  First, I use 2 spaces in the name.  This means the identifier looks the same, but doesn't replace it. So now, in the list of fields, it appears as though there are 2 IP Address entries.  The seocnd thing I do so that I can tell the different in I use a lower case letter for the second word.  Therefore, I have an "IP Address" entry and a "IP  address".  The now look very similar, but I can tell the difference.

At this point, you can build the necessary query string using the interface to (first) select the right WMI Class (Win32_NetworkAdapterConfiguration) and (second) select the Class Property (for example IPAddress).  At this point, click Evaluate to see the list (since there are multiple IP addresses).

Next, limit the list using the WHERE clause.  For example, in my case the only IP addresses I want happen to be both active as well as have DHCP enabled.  So I use:


SELECT IPAddress FROM Win32_NetworkAdapterConfiguration Where IPEnabled=True and DHCPEnabled=True

For me, this returns just the IP address I'm interested in.  I replace the "IP Address" entry in BGinfo with my "IP  address" entry.

I create the following custom entries:


  • DNS  serverSELECT DNSServerSearchOrder FROM Win32_NetworkAdapterConfiguration Where IPEnabled=True and DHCPEnabled=True
  • IP  address - SELECT IPAddress FROM Win32_NetworkAdapterConfiguration Where IPEnabled=True and DHCPEnabled=True
  • Network  card - SELECT Description FROM Win32_NetworkAdapterConfiguration Where IPEnabled=True and DHCPEnabled=True
  • Subnet  maskSELECT IPSubnet FROM Win32_NetworkAdapterConfiguration Where IPEnabled=True and DHCPEnabled=True
Here is the end result:




Here is the bgi file that was saved: https://drive.google.com/file/d/0B35FDpn8GEl0RFhTZExIdjlRQm8/edit?usp=sharing



Mount ftp site as nfs mount point

For numerous purposes, not least of which is using rsync for backups.  Here is an article:

http://pingbin.com/2012/01/howto-rsync-backup-ftp-server/
Here is the short version:

  • apt-get install curlftpfs
  • mkdir /mnt/backup_server
  • emacs /etc/fstab
  • add the following line(s):
#curlftpfs#user:pass@ip-address /local/directory fuse rw,allow_other,uid=user-id 0 0
curlftpfs#pingbin:1234@10.0.0.1 /mnt/backup_server fuse rw,allow_other,uid=1000 0 0

  •  mount /mnt/backup_server


Saturday, May 24, 2014

Adding NFS entry to myCloud

Mounting an nfs volume on my Ubuntu VM (where I am running ownCloud) to access data on myCloud:

mkdir  /shared

mount yourMyCloudIP:/nfs /shared

emacs etc/fstab

add these lines at the end of fstab file:

#Entry for MyCloud NFS
yourMyCloudIP:/nfs /shared nfs default 0 0

save and exit editor.

Wednesday, May 21, 2014

Lenovo W530 - webcam doesn't work

The webcam keeps disappearing from the OS and from Skype.  It comes up with a message saying that the camera is in use by another application.

I've read a number of posts in the various Lenovo forums, and they indicate that lots of others are having similar issues.  Typically I'm able to fix this by going into Fn-F6 and tweaking something in there... but that is no longer working for me (the dialog no longer comes up).

So:

- to manually bring up that dialog, instead us Start > Lenovo - Web Conferencing or Start > Communications.

(still testing these to see if they help)

- Set the privacy to Normal

- Disable Activate Camera Plus (under Detailed settings)

Fix waiting / hung installs on iOS / iPhone / iPad

Several times, our old iPads get stuck updating their apps.  The application get into a state where they are waiting to be updated, but no progress is being made.  There seems to be no way to 'kick-start' them either.  Reboots don't help.

I've only figured out two 'fixes':

- Delete the offending app and re-install.  Of course this means you lose all of your state (not a good thing).

- Use a free application called i-FunBox.  This gives you direct access to the iPad file system (caveat emptor - you risk breaking things).  Plug in the iPad and run i-FunBox.  In the left most tab (iFunbox Classic), browse to iPad > Raw File System > Downloads... delete all the contents.  Finally, reboot the iPad.

That should do it...

Saturday, May 17, 2014

Windows custom hotkeys / shortcut keys

Trying to create hotkeys for things within Windows 7.  According to the docs, it seems as though you should be able to create a shortcut to the executable and add shortcut keys.  Not so much...

This seems to work OK when you have your shortcut on the desktop.  But, if that shortcut is moved of just created in another location, no such luck... the shortcut keys no longer work.

I found the post below which provides a suggestion, an explanation and some discussion.  In short:


Create a folder called:
C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\_hotkeys
Hotkey assignments within shortcuts in there are remembered/restored at next login.
http://www.sevenforums.com/customization/34091-custom-keyboard-shortcut-key-not-working-properly-2.html

Friday, May 16, 2014

Installing packages on myCloud

I really like my new WD myCloud and all that it can do.  But I really don't like the fact that emacs was not included on the base Debian OS.

So, the question is, how to install a new package on Debian.  Here is an example of getting emacs installed on the myCloud.  

First connect with ssh as root.

> apt-get update 
> apt-get install emacs

The first command updates the list of packages the system knows about.  The list is defined by the list of source in the file /etc/apt/sources.list.

vi cheat-sheet

As much as a loath the vi editor (clearly emacs is FAR superior), here is a decent cheat-sheet to cover the basics:

http://www.atmos.albany.edu/daes/atmclasses/atm350/vi_cheat_sheet.pdf