Tuesday, 2 July 2019

virtualbox - Physical console (screen+keyboard) dedicated to VM


I have a relatively powerful computer used for playing games in Windows, not too demanding games but with definite need of the GPU card (NVIDIA GeForce GTX 760). I would like Windows to run in a VM, without the users (my kids) having a password to the host machine, and without any video problems. I want to be able to snapshot the Windows VM, back it up, and run other VMs on the machine that would not use the physical keyboard or screen, all without interfering with the Windows VM. Running VMPlayer or similar means that the user of the VM can also delete the VM or simply forget about using it and use the host machine.


I was thinking that it might be possible to configure ESXi, KVM or Xen to recognize the serial port or the built-in VGA + a specific USB port as primary console, and dedicate (hardware pass-through?) the GPU and other USB ports to the Windows VM.


Does any one know if this is usefully feasible, and which virtualization solution would be my best bet?



Answer



So, I had some time to explore, and I tried out ESXi, which I usually use in a professional setting (vSphere vCenter with all the bells and whistles and hardware bought according to the compatibility list). No luck, my RealTek network card is not supported by ESXi, ESXi will not install at all. There might be a way around that.


So I found Debian VGAPassthrough and tried the KVM way. While looking for the network driver (my RealTek network card is not supported out-of-the box by Debian either, but it is by Ubuntu) I found Multiheaded NVIDIA Gaming, which describes exactly the kind of setup I am looking for, both with ESXi and Ubuntu, and helpfully notes that the setup is not possible when combining ESXi and the GeForce card I have. I won't have to waste time on ESXi, and I'll go the KVM route.


windows 7 - How do I disable indexing in a specific directory across multiple platforms?

I have some files that will be accessed across several platforms (Mac OS X and Windows 7 mainly, but I wouldn't rule out Linux in the future) and I do not want these files indexed by the search services of the platforms (there will be some DB dumps and I don't want sensitive info put into the search tables).


As I recall, I can block indexing of a directory in OS X by placing a specially named file there (it may have line of text inside of it, it's been a while and I don't remember). Is there something like that in Windows?


How do I block indexing of a certain directory for Mac OS X, Windows (and possibly Linux)?

Wget/cURL alternative native to Windows?

Is there a Wget or cURL type command line utility native to Windows Vista? How does it work?

history - How to track websites that have been visited?


When I check my child's computer, his internet browser history is all blank. I strongly believe he deleted all the browsing history, cache and everything.


Is it possible to know what websites that my child has been visiting recently after he cleared his internet browser's data?



Answer



You can create an OpenDNS account, point your child's system to use OpenDNS and keep a track of websites used using that.


OpenDNS also allows you to block certain sites:



Each household is unique, so OpenDNS gives you flexibility in blocking Internet content. We divide the Internet's millions of websites neatly into 56 categories, like "adult," "games," "academic fraud" and "social media." Parents can block entire categories of content, or just choose to block the individual websites that you know are problematic or unsafe for your family. Or, for easier setup, you can choose a filtering level: low, medium or high. The low filtering level blocks just adult content, where the high filtering level blocks adult content, social networking sites, video-sharing sites and more.



Monday, 1 July 2019

MacBook Pro Trackpad freeze / holds click on its own

My MacBook Pro's Trackpad shows an annoying behavior in the last few days. I think the only relevant thing that changed is the firmware for the Trackpad. An update has been distributed via Software Update a few days ago.


Sometimes when i click somewhere the Trackpad won't recognize the mouseup, i.e. hold the click on its own. Clicking again seems to stop the holding and issue a new mousedown, but then again, no mouseup


I.e. when i click on a file on the desktop the file will be dragged. But i can't stop dragging! Clicking in a browser or text document will select the text/images.


Did anyone notice similar behavior? Any ideas or fixes?

networking - Any advantage to disabling or turning off network bands 802.11a / 802.11b / 802.11g


Product reference: DLink DSL-2890AL


I am interested in what gains can be attained by disabling the following network bands. In particular performance and power consumption. 802.11a / 802.11b / 802.11g.


I am well aware that disabling those bands would prevent products that use those bands from connecting.


I have a router that has dual 2.4GHz and 5GHz band.


On the 2.4GHz I have the opportunity to disable 802.11b and/or 802.11g.


On the 5GHz I have the opportunity to disable 802.11a.



Answer



This question on performance can be separated into two categories:


Performance of 2.4GHz vs. 5GHz and Performance of allowing backwards compatibility (e.i. allowing b devices, even if you don't own any). I assume that your devices are all N capable.


Performance of 2.4GHz vs. 5GHz


N devices can connect to both the 2.4 and 5GHz range. The two ranges are different in several different ways:



  • 5GHz will always have a shorter range than 2.4.

  • 5GHz will have trouble going through objects (anything with water: wood, cement, etc) while 2.4 will not.

  • 5GHz will have a greater throughput at its smaller range than 2.4

  • 2.4GHz is over used by the industry, more usage leads to noise, more noise leads to congestion, congestion leads to decreased performance.


Therefore if you are close to the router the majority of the time using only the 5GHz will not take away from the potential performance of using both. If, on the other hand, the router is usually far away, using the 2.4 band will offer less power usage will no decrease of performance.


Performance of allowing backwards compatibility


There is no significant performance degradation of allowing backwards compatibility. However, when a device connects to the network and the router is forced to use backwards compatibility with the device there could be a significant performance difference.



  • With devices using the B standard, many routers must employ "hacks" to prevent the B device from messing with the other N/G/A devices. This performance drop could be over 80% for all other devices on the network.

  • With devices using the G standard, many routers must reduce the amount of frames (hence data) being transferred by the network to the G standard. Therefore, any N devices will be impacted.


So in the end allowing older devices to connect will not impact performance by itself. However, having these devices connect could reduce the performance of the whole network.


xcopy - copy array in a batch file


I have several files located across several directories/subfolders that I need to copy to several destinations. I currently do this using xcopy but I do it line by line, so there are several lines of code. A friend suggested that I use an array instead which is what I'm trying to do now.


I've tried several variations of getting this to work. My last variation looks like this:


@echo off
set "mansource=somelocation\location1\sourcefolder"
set "mandest=someloacation\location2\destfolder

set src[0]="%MANSOURCE%\folderA\number1.pdf"
set dest[0]="%MANDEST%\folderB\number\1"

set src[1]="%MANSOURCE%\folderC\number2.pdf"
set dest[1]="%MANDEST%\folderD\number\2"
set /a "x=0"

for /r "%mansource%" %%f in (!src!) do xcopy "%%f" "!dest!" /v/y
pause

So I know this is wrong since it doesn't work, but nothing else I've tried has worked either. Every example I've found online so far about using arrays in a batch only has a "do ( echo" command to either list what is being indexed or print a statement to the cmd prompt. I haven't been able to find any examples concerning an actual function like copying. I did have a variation of the above code but it just resulted an infinite loop with "0 files copied" repeating forever.


The idea is to have the file in src[0] copied to the locations in dest[0], then the file in src[1] and so on.


Any advice would be appreciated.


Note: Using a *.pdf wildcard will not work as there are other pdf's in these locations and I only need specific ones to be copied. Also, each file is in a different location from the next and each copy destination for that file is also different.



Answer



Since you are looking for a batch solution, another way to go about this is to create a FOR loop with the 0 thru x index range. The FOR loop will iterate the index number values and use the CALL command to call correlated subroutine names.


The subroutine label names will all be the same except the index number values (as in the FOR loop) are appended to the label names (i.e. :idx0, :idx1, :idx2, and so on).


Each subroutine should have the "same" variable names within but the values of each should be set accordingly for the need, but each subroutine must end with GOTO :EOF. The GOTO :EOF will pass control back to the caller and allow it to finish out it's logic so in this case the FOR /R loop will start.


Be sure to that once your logic ends, that you have it EXIT or GOTO :EOF so it does not move onto the logic beneath such as subroutine labels intended only to be executed with CALL commands.


Example Script


@echo off

set "mansource=somelocation\location1\sourcefolder"
set "mandest=someloacation\location2\destfolder"

FOR %%A IN (0,1) DO CALL :idx%%A
for /r "%mansource%" %%f in (!src!) do xcopy "%%f" "!dest!" /v/y
pause
::GOTO :EOF
EXIT

:idx0
set src="%MANSOURCE%\folderA\number1.pdf"
set dest="%MANDEST%\folderB\number\1"
GOTO :EOF

:idx1
set src="%MANSOURCE%\folderC\number2.pdf"
set dest="%MANDEST%\folderD\number\2"
GOTO :EOF



Further Resources



How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...