Tuesday, 30 April 2019

How to remove the "3D print with 3D Builder" context menu entry in Windows 10?


In Windows 10's Anniversary Update, there is a new "3D print with 3D Builder" entry in the context menu of some image file types.


I tried to uninstall the 3D Builder app, but it doesn't remove the context menu entry, and clicking on it reinstalls the app.


I read the related question "Windows: How to remove items from the right click (context) menu?" and have tried some of the recommanded applications, as well as less known ones, but, oddly, none of them found this item.


How do I remove this entry from the context menu?



Answer



I monitored what was happening under the hood when right clicking an image file (with the tool Process Monitor from SysInternals), and found out the responsible registry keys.


It is displayed because of the "T3D Print" shell key in bmp, jpg and png file types associations:


HKLM\SOFTWARE\Classes\SystemFileAssociations\.bmp\Shell\T3D Print
HKLM\SOFTWARE\Classes\SystemFileAssociations\.jpg\Shell\T3D Print
HKLM\SOFTWARE\Classes\SystemFileAssociations\.png\Shell\T3D Print

Deleting them immediately removes the 3D print with 3D Builder item from the context menu.


Just in case, make sure to backup the keys beforehand, to be able to revert the changes.


Referencing a cell in Excel using values from other cells in different worksheet (tab)


I'm trying to set up a Excel sheet for a running log.


What I'm trying to do is to get info from a cell that is 7 rows dowm from cell H8 on worksheet Log. This is so that I can just drag the forumla over to other cells, not having to manually do the "= --> mark cell you want --> press enter" for each cell. That would be 365 cells to mark up! o.O


On to the problem:


My initial idea was Log!H8+7 and the like, but since I'm here that obviously did not work. I did some searching online and found a few posts talking abot =INDEX, RC[n] and the like, which I have been playing around with for the past hour or so, but I got none of them to work.


So basically I want cell D6 in worksheet 'Plan' to refer to the cell 7 rows below H8 in worksheet "Log"


Anyone that can point me in the right direction?:)



Answer



Use the INDIRECT function to calculate or build a cell reference. It converts something that is a string that looks like a cell reference to an actual cell reference, and you can build that string by combining text and calculations. You can use it with either "standard" format cell referencing (like A5), or row-column (RC), format.


In standard format, you could do something like:


=INDIRECT("Log!H"&8+7)

The RC format can be handy for relative addresses, but the benefit is mainly to express a reference relative to the current cell. For example, if you were on the Log sheet in cell H8, you could use this to reference the cell 7 rows lower:


=INDIRECT("R[7]C",0)

You need the 0 in the optional last parameter to indicate that the string should be interpreted as an RC style address. The general format is R8C8 (row 8 column 8, which would be H8). If the reference is to the current row or column, you can leave off that number. You can do relative addresses by putting a positive or negative number in brackets, which is the number away from the current position.


This style of addressing can also be useful if you need to calculate a column, since you can do it with numbers instead of letters. So, for example, say you want to refer to the cell 8 rows down and 3 columns to the left of H8, you could use:


=INDIRECT("Log!R"&8+7&"C"&8-3,0)

Doing this kind of math in the formula can be useful to develop and debug the formula, or to maintain it. However, once you don't need it for that, it can overly complicate your formula. For example, without the need for this math, you could simply use:


=Log!H15

If the math is required because the value is entered data or is a formula result, don't hard code the value in the formula. Instead, use a cell reference to where the value is stored.


cygwin1.dll not available error when installing Cygwin

I am unable to make Cygwin work properly.


After download the Cygwin setup files (either the 32-bit version setup-x86.exe or the 64-bit version setup-x86_64.exe) from the Cygwin website, I ran it to install Cygwin on my 64-bit Windows 7.


I chose the installation directory, the directory where to download the packages, and one mirror server. Cygwin created the directory succesfully, downloaded the package list and displayed the package selection screen.


I just clicked Next to advance using the default selection, and Cygwin showed me the list of packages to be installed. Then, it downloaded all packages and started to install them.


Then it started displaying several times the well-known error message:



The program can't start because cygwin1.dll is missing from your computer. Try reinstalling the program to fix this problem.



This happens when some of the default packages try to run dash.exe or bash.exe to configure themselves.


Some Googling suggested:



  1. Reinstalling Cygwin choosing only the base packages. Since I had chosen no packages to be installed, this was already the "minimal" setting;

  2. Adding Cygwin's bin directory to the PATH environment variable. Unfortunately the cygwin1.dll was never downloaded/installed, so even doing this didn't help.


The cygwin1.dll file is not available for direct download from the Cygwin website (at least not visible from the Installation page).


How can I fix this basic installation?

Installing new driver on Linux, missing the 'Build' directory

I recently installed Kali Linux on a very old PC, and since it doesn't have a wifi card I bought a Realtek USB wifi adapter. The adapter came with a driver to install, and I went to run the "install.sh", but it came back with two types of error:


1) When extracting the driver, it was unable to change the ownership of any of the extracted file from '400' to '401' - Im guessing that is like with chmod ownerships.


This I sort of solved by removing the extraction part of the shell script and extracting/chmodding the file myself. But problem 2 still applied:


2) It was unable to find the directory "/lib/modules/$(uname -r)/build"


I checked the "/lib/modules/$(uname -r)" directory, where, among other things, the drivers are kept: "/lib/modules/$(uname -r)/kernal/drivers", and indeed there is no 'build' directory. Apparently the directory should be 'the path of kernel source used for driver compilation' (taken from the Installation PDF). Now given that this was in the 'make' part of the script, I don't know where to go from here because I'm not remotely knowledgable about driver compilation. I am also not sure if it is a Kali-specific problem, but I can not find a solution anywhere else and it does not provide any help in the manual. If anyone knows where 'the path of kernel source used for driver compilation' is in Kali, or knows how to compile it manually, or even knows specifically how to install wifi adapter drivers on Kali, I would really appreciate it


http://www.cyberciti.biz/tips/build-linux-kernel-module-against-installed-kernel-source-tree.html is among a couple of websites to mention that things to do with compilation require a 'build' directory as stated above, and suggests doing this to obtain the current kernel build directory:


$ ls -d /lib/modules/$(uname -r)/build

which of course is a problem for me, as it doesn't exist for whatever reason. I have tried:


apt-get install linux-headers-$(name -r)

and


apt-get update && apt-get install linux-headers-$(name -r)

with the errors:


'E: Unable to locate package linux-headers-3.18.0-kali3-686-pae'


and


'E: Couldn't find any package by regex linux-headers-3.18.0-kali3-686-pae'


I also used:


apt-get install linux-headers-generic

which failed with:


'E: unable to locate package linux-headers-generic'


And finally I HAVE done:


apt-get install build-essentials

Which said that it is already the newest version


I have checked:


apt-cache search linux-headers-$(name -r)

which came back with no results. And yes, I HAVE tried rebooting my system. Bear in mind that I have no internet on the PC - ethernet or wifi. Sorry for the long post, I felt like I should list the errors as well.


This is a question I asked on Stack Overflow


It was classed as off-topic so I have reopened it here

grub - Triple booting Windows 8 Consumer Preview with Windows 7 and Ubuntu 11.10


I already have Windows 7 and Ubuntu 11.10 installed on my laptop, and would like to add Windows 8 Consumer Preview to that list. Here's some information which may be relevant to this question:



  • The laptop only has one hard drive.

  • The hard drive has plenty of space to accommodate all 3 OSes

  • The GRUB menu currently controls which OS boots up.

  • When I originally decided to dual boot, I already had Windows 7 installed and I re-partitioned my hard drive and installed Ubuntu on the new partition.


What would be the correct way to install Windows 8 without screwing up Windows 7 and Ubuntu?



Answer



Windows 8 has a new bootloader that's a bit different than what you may have seen before, and after installing, it will give you the option to boot Windows 7 or 8 but not Ubuntu.
I don't know of any way to stop Windows 8 from installing that bootloader, so you have to install Windows 8 to whichever partition you set aside for it, then boot up any linux live environment and reinstall Grub to your first partition (Which is either 7 or ubuntu, depending).


Once you boot up in the linux environment, browse to your existing /boot/grub/menu.lst file -- it should show entries for ubuntu and windows 7. If you have changed the partition order installing Windows 8 (e.g. changed the partition number where ubuntu resides) you need to update the line root(hd0,0) accordingly, where the first number is the harddrive number (0 if you only have one) and the second is the partition number -1 (sda1 = 0, sda2 = 1, etc...)


You can create a third entry for Windows 8 in exactly the same way as windows 7, changing only the rootnoverify line to apply to the appropriate partition where Windows 8 is installed.


Once that's all set, go ahead and reinstall grub to your primary partition by opening up a terminal as root and running


grub

then at the grub console type


setup (hd0)

my grub config for this looks like this:


    # (0) Arch Linux
title Arch Linux
root (hd0,2)
kernel /vmlinuz-linux root=/dev/sda3 ro
initrd /initramfs-linux.img

# (1) Windows 7
title Windows 7
rootnoverify (hd0,0)
chainloader +1

# (2) Windows 8
title Windows 8
rootnoverify (hd0,1)
chainloader +1

email - Viewing only one message as original HTML in Thunderbird

In Mozilla Thunderbird I have View, Message Body set to either "Plain text" or to "Simple HTML" for security reasons.


enter image description here


Occasionally I would like to view a particular message as "original HTML". But the problem is remembering to change this global setting back afterwards.


Is there a keyboard shortcut (or similar convenient way) of viewing only the current message as "Original HTML" without affecting the global settings?

redirection - How do regular expressions work in htaccess to redirect an IP range


I've been trying to redirect an IP range from one link to another. I can do it for a single 256 address block:


RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} ^111\.111\.111\.
RewriteCond %{REQUEST_URI} /original_link/$
RewriteRule .* /new_link/ [R=301,L]

However, trying to block a 8192 address range (xxx.xxx.128.0 - xxx.xxx.159.255) requires regular expressions to express the redirect properly. Even though I found some examples, I couldn't make much sense of the values that have to be put in brackets. Can somebody please explain how to use those expressions properly?


My own attempt would look something like this:


RewriteCond %{REMOTE_HOST} ^xxx\.xxx\.1([2-5][8-9])

Answer



No, that would only match


xxx.xxx.128
xxx.xxx.129
xxx.xxx.138
xxx.xxx.139
xxx.xxx.148
xxx.xxx.149
xxx.xxx.158
xxx.xxx.159

What you want (if regexes is even the right tool; I'm not sure if there is a better way to match on netmasks that works here) would be


^xxx\.xxx\.1(2[89]|[3-5][0-9])

The parenthesised part matches either 2 followed by 8 or 9, or 3, 4, or 5 followed by any digit.


You need the "any digit" in the second case, because otherwise the regex would match, for example, xxx.xxx.13.57 which is not in your range.


macos - OS X: using the keyboard to select an option in a message window / box?


I'm still a new Mac owner, and I've struggled with the message windows / boxes / popups that sometimes appear and ask me to choose an option, like "save" "don't save" and "cancel" in TextEdit's case. I noticed I can't use the arrow keys to navigate these buttons, but pressing Enter will choose the default option and ESC will choose the "cancel" option. Is there any way to control this with the keyboard? Or are the Apple engineers forcing me to use a mouse / trackpad?



Answer



This is really annoying I can tell, but you can tab through dialog boxes.


Go to "System Preferences" > "Keyboard & Shrotcuts".


At the very bottom there will be an option saying about "full keyboard access". Check the radio button that says “All Controls” and here you go


bash - Sending commands to an existing screen session?


I have a Java app running in a screen session (A game server), and I'd like to be able to write a script to send commands to it periodically (with cron probably), but I'm not sure how to send commands to a running screen session.


Is this possible? Might be complicated by the fact that I'm not just sending more shell commands to the screen, but putting text into the running Java console.



Answer



Try this example from screen faq:


screen -S test -p 0 -X stuff 'top^M'

It will run top command in the screen session named test.


^M is a control character you can put by pressing CTRL+V, ENTER in bash.


email - Unable to receive gmail in MS outlook


Here's what I see in the log files after enabling diagnostic logging in Outlook 2016:


IMAP: 02:55:21 [rx] 0c1x NO [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
IMAP: 02:55:21 [db] ERROR: "Allow less secure applications is disabled for your account.", hr=0x800CCCE6
IMAP: 02:55:21 [db] Connection to 'imap.gmail.com' closed.

And here’s a screenshot from relevant part of my google account settings, in their web interface:


enter image description here


I only have a single google account.


Is there a way to fix IMAP integration? I really dislike their web interface.


Thanks in advance!


Update: The web interface says “Use your phone to sign in: Off” and “2-Step Verification: Off”


The settings seem to be correct, and I have not changed them for years. Yesterday it stopped working out of the blue.


Outlook’s diagnostic log says it connects OK to the server, here's selected messages:


Connecting to 'imap.gmail.com' on port 993.
srv_name = "imap.gmail.com" srv_addr = 74.125.133.109:993
OK Gimap ready for requests
LOGIN command sent

Answer



It would appear that Google has changed it's security measures around 3rd party applications connecting to its service.


To resolve this you will need to do the following:


Activate 2-Step Verification if not already activated



Navigate to https://myaccount.google.com in a browser and sign in using your google account details.


After signing in click "Security" tab on the left, then click 2-Step Verification and follow the instructions to configure.



Once 2-Step Verification is configured this will allow you to configure app password's via the following method:



Go to your Google Account.


On the left navigation panel, click Security.


On the Signing in to Google panel, click App passwords.


Note: If you can't get to the page, 2-Step Verification is: Not set up for your account or is Set up for security keys only


At the bottom, click Select app and choose the app you’re using.


Click Select device and choose the device you’re using.


Click Generate.


Follow the instructions to enter the App password (the 16 character code in the yellow bar) on your device.


Click Done.



Once you have completed this you should be able to use the app password you have created to log into your gmail account in outlook. (May take 5 minutes or so before outlook accepts the password.)


Answer was found from this source - https://productforums.google.com/forum/#!msg/gmail-fr/67kIlDcTSI4/eU4Oia1oBAAJ


Instructions for creating an app password on your google account found here - https://support.google.com/accounts/answer/185833?vid=0-40571905225-1518162545847


Please also see guidance from Microsoft here under "Outlook won't accept my password" - https://support.office.com/en-us/article/add-a-gmail-account-to-outlook-70191667-9c52-4581-990e-e30318c2c081


Hopefully this helps


linux - Netcat stops listening for UDP traffic


I am using netcat on some Linux machines (see this other question), but seeing some unexpected behavior.


Unlike the guide in the accepted answer, I am not using UDP tunneling to do DNS queries. I have a remote server that I can log into, but not install software on, and I'm trying to tunnel UDP traffic from my computer to the server, and then setup a separate tunnel to send UDP responses back from the server to my machine.


The tunnel going from my machine to the server is working perfectly, however on the server side, the instance of netcat that is listening for the response from the UDP server will close the listener after receiving the first response. So I can send a request and get 1 response back, but any subsequent requests make it to the server okay but responses are not received. Using netstat I can see that before the response is received netcat is listening, but the port is then closed after the response is received.


The netcat instance on my machine seems to handle everything just fine. Both machines are running netcat v1.10-38. Any ideas what is going on?



Answer



So there are multiple things called netcat; ubuntu even has /etc/alternatives symbolic-link-hackery for it.


I think part of your problem is that UDP doesn't do sessions; I've copied in part of the file /usr/share/doc/netcat-traditional/README.gz below which does a pretty good job of explaining.



UDP connections are opened instead of TCP when -u is specified. These aren't really "connections" per se since UDP is a connectionless protocol, although netcat does internally use the "connected UDP socket" mechanism that most kernels support. Although netcat claims that an outgoing UDP connection is "open" immediately, no data is sent until something is read from standard input. Only thereafter is it possible to determine whether there really is a UDP server on the other end, and often you just can't tell. Most UDP protocols use timeouts and retries to do their thing and in many cases won't bother answering at all, so you should specify a timeout and hope for the best. You will get more out of UDP connections if standard input is fed from a source of data that looks like various kinds of server requests.



OK so maybe that's not all that great of an explanation but it's what I could find.


If you haven't yet, you might want to experiment with any netcat options you can find that would have to do with waiting... have you experimented with:




  • using -l as well as -u to ensure you're in "listening" mode




  • -vv to see exactly what's happening




  • -q -1 ...which should "wait forever" even after receiving EOF (hopefully, listening again?)




VMWare Ubuntu guest multitouch touchpad


Related: Use Synaptics Touchpad Scroll in VMware Guest


I've read that it's not possible to enable multitouch in vmware guest.


What confuses me, is that when I use something special (like two finger scroll) in guest OS, I can see the cursor change to the scrolling one.


Is this some kind of virtualization bug or is there a possibility that I can enable multitouch in guest?


Host: Windows 7


Guest: Ubuntu 12.04


enter image description here


EDIT:


I noticed strange behavior: When I have a finger on touchpad and slide another two fingers, it "works" (it's very laggy and strange).



Answer



I found a solution for Windows hosts!


It's called two-finger-scroll. Quote from the google page:



This project aims at providing a tool for Windows platform adding some useful two finger gestures to Synaptics TouchPads. These TouchPads can be found in many todays laptops and many of them support multiple finger gestures.



With this enabled, the two finger scrolling is working properly in vmware.


linux - Can TP-Link router make phone calls?


I have a TP-Link router TL-WR340G (54Mbps Wireless Router) with DSL service provided by a local company which serves it over the landline phone. My landline cord is plugged into an ethernet router which is then plugged into TP-Link wireless router. I can access internet with this wireless router all over my home with all computers.



Landline Cord [into] Ethernet Router [into] TP-Link Wireless Router [air] Computers



I would add that landline cord is also into a phone device which I use to make calls and that's not cordless.


Now I am accessing internet via WiFi on my laptop and want to ask if is this possible to make landline calls via this same computer I am surfing internet through? What I am asking it to a dial-up via TP-Link router that goes through landline. You see the landline cord is the actual data gateway and is also used to make calls. So it can simultaneously send Data and Voice over the same wire.



Answer



This is not possible the way you want.


The landline goes to the ethernet-router. From that point forward the signal out of this router carries only internet signal. Even if your TP-Link router was analog(phone)/voip-capable it won't have the correct signal if it's not directly connected to the phone-line.


What TP-Link router is this? If it is analog(phone)/voip-capable you could plug the phone-line (which is split before your ethernet-router) in the TP-Link and still use your own landline-signal to call other landlines. (You'll need to setup the voip-settings in the TP-Link router)


If it's not analog(phone)/voip-capable the only thing you could do to make calls over the internet from your computer is use a VOIP-service. You will not be using your own analog-landline but the internet signal for this. There are a lot of VOIP-providers besides Skype. For example Voipbuster. The mother-company of Voipbuster has many, many, many sub-companies who all have different rates of calling landlines per country.




Edit: Your TP-Link router is a 54Mbps Wireless Router (TL-WR340G).


I'm sorry to say this router does not have an analog input and/or voice capabilities. The only way you're going to be able to make phone calls directly with your landline is if you buy a VOIP-server solution. If it's just to phone wireless over your landline i would go for a wireless phone. They are much cheaper. (Even those with multiple handsets cost less than a VOIP-server). And even with a VOIP-solution you would have only one line out, so only one call at a time. (These handsets are also less susceptible to interference and easier then some VOIP-app on the PC)


The other option of using VOIP via Skype or Voipbuster still stands and is possible. You can dial out and call other landlines with no problem. Except you won't be using your own active landline but your internet-connection instead.




Edit #2: Connecting your laptop wireless with your landline can become complicated (especially the setup) if you don't have the necessary expertise.


Buy a Linux-box (which you can place near the landline) and install Asterisk or Freeswitch. Next buy a FXO-card or device which you can connect to the landline. There is some information here. Another one i found is this one and should work. Authentic X100P allows Asterisk to make calls to or receive calls from a traditional analog phone line. Point is to buy a device which can act as gateway between you analog landline and your VOIP-server (an analog FXO gateway).


And lastly you can use any VOIP-client for the laptop to connect to your VOIP-server. There a lots for PCs (like X-Lite) and for my Android phone i used Sipdroid before i switched to the build in VOIP-client. (When opening your VOIP-box up to the internet it is even possible to use your landline with your cell-phone when not at home:)


process - quit tmux server and end all running processes


I am running a tmux server configured by tmuxinator. In one pane my django server is running:


python manage.py run_gunicorn

If i quit tmux by calling the kill-server command, the run_gunicorn command is not killed as i would have expected, but is sent to the background:


$ ps aux | grep gunicorn 
alp 3358 1.0 0.1 126988 21728 ? S 13:06 0:00 python manage.py run_gunicorn

How can i quit the tmux server while quiting all running processes within?



Answer



I have found an alternative by adding a line to my tmuxinator config:


pre: pkill -f "^python manage.py run_gunicorn"

The ^ at the beginning only matches processes which are starting with that command. Without it you would also kill the tmux process as well.


This does not solve the problem with remaining background processes, but it kills any old processes when restarting the tmux session, which is an acceptable workaround in my case.


google chrome - Why do web pages take so much RAM?

After leaving a bunch of pages open in Chrome, my computer gets sluggish. Windows Task Manager shows that some pages take a lot of RAM:


enter image description here



  1. Why do they take so much RAM?

  2. Is there a way to know how much RAM each page takes, so that I investigate?


Thank you.

How to change the shortcut language in Windows 10?

I recently changed my Windows 10 display language from English to Spanish. With this change, the shortcuts are now also different.


For example, saving a text document in Notepad is now CTRL+G instead of CTRL+S, because save translates to guardar in Spanish.


I would like to have the display language in Spanish but the shortcuts the same as in English. How is it possible to independently modify these two options, if at all?

Monday, 29 April 2019

How to make many column formulas ignore the same lines in Excel?


I have multiple columns and at the end of each one I have a SUM and MEAN lines. Now I want to ignore some lines thus making =SUM(A1:A15) into =SUM(A1:A13;A15) if I want to ignore line 14. Doing this for each formula is a tedious task.


In my previous question I found out how to do it for a single column. I would place the A1:A15 string in a separate cell, then reference it using INDIRECT. This way I can alter a single cell and update every formula for that column.


The problem is that I have multiple columns, with this approach I would have to update the B1:B15 cell for each column. How to simplify this update process?



Answer



You can use the OFFSET function to shift an entire range by a certain amount. For example, if you had the text ="A1:A15" in cell C1, you could get the range B1:B15 by using the following formula:


=OFFSET(INDIRECT(C1), 0, 1)

For your reference, the function is defined in Excel as =OFFSET(reference, rows, columns, [height], [width]). To retrain the width/height of the original range, do not specify the height or width arguments. Also, note that the rows and columns arguments can be positive or negative (so you can shift both up/down and left/right).




Just another note, the OFFSET function works with entire ranges, so if in the previous example you entered the text ="A1:A12,A15" the returned range after using OFFSET to shift it right one column would be B2:B12,B15 as you would expect.


debian - Why would a shutdown script NOT run?

I have installed a shutdown script on an Ubuntu system which doesn't get executed. It is an Amazon EC2 instance. I'm not sure it has to do with this fact just wanted to point it out.


The script should push some log files to an Amazon S3 bucket so it has to be executed while networking is up.


Here is how I installed the script:


1) Created the file in /etc/init.d/push-apache-logs-to-s3.sh with the required commands.


2) Made it executable with sudo chmod +x push-apache-logs-to-s3.sh


3) Executed sudo update-rc.d push-apache-logs-to-s3.sh start 0 0 .


Output from the above was:


update-rc.d: warning: /etc/init.d/push-apache-logs-to-s3.sh missing LSB information
update-rc.d: see
Adding system startup for /etc/init.d/push-apache-logs-to-s3.sh ...
/etc/rc0.d/S00push-apache-logs-to-s3.sh -> ../init.d/push-apache-logs-to-s3.sh

The contents of /etc/rc0.d/ is now:


lrwxrwxrwx  1 root root   17 Jul 31  2012 K09apache2 -> ../init.d/apache2
lrwxrwxrwx 1 root root 29 Jun 16 2012 K10unattended-upgrades -> ../init.d/unattended-upgrades
lrwxrwxrwx 1 root root 26 Jun 16 2012 K15landscape-client -> ../init.d/landscape-client
lrwxrwxrwx 1 root root 19 Apr 10 11:11 K20memcached -> ../init.d/memcached
-rw-r--r-- 1 root root 353 Jul 26 2012 README
lrwxrwxrwx 1 root root 35 Jul 10 12:01 S00push-apache-logs-to-s3.sh -> ../init.d/push-apache-logs-to-s3.sh
lrwxrwxrwx 1 root root 18 Jun 16 2012 S20sendsigs -> ../init.d/sendsigs
lrwxrwxrwx 1 root root 17 Jun 16 2012 S30urandom -> ../init.d/urandom
lrwxrwxrwx 1 root root 22 Jun 16 2012 S31umountnfs.sh -> ../init.d/umountnfs.sh
lrwxrwxrwx 1 root root 20 Jun 16 2012 S35networking -> ../init.d/networking
lrwxrwxrwx 1 root root 18 Jun 16 2012 S40umountfs -> ../init.d/umountfs
lrwxrwxrwx 1 root root 20 Jun 16 2012 S60umountroot -> ../init.d/umountroot
lrwxrwxrwx 1 root root 14 Jun 16 2012 S90halt -> ../init.d/halt

When I manually execute the script with sudo ./push-apache-logs-to-s3.sh, it does the intended job.


Are these scripts executed by root? What am I missing?

64 bit - Is it possible to run 64bit applications on a 32bit operating system, if the hardware is 64bit?


I have a PC with 64 bit capable hardware.


I installed a 32 bit Ubuntu distribution and I would like to know if it's possible to run 64bit applications on it (kinda like Mac OS X Snow Leopard works).



Answer



32 bit Mac OS X can run 64 bit applications on 64 bit hardware.


The reason this works is because the OS X (Darwin) kernel actually runs in the compatibility sub mode of long mode.


Windows and Linux do not do this and enforce a cleaner cut between x86 and x64. With Windows or Linux you can either run the 64 bit kernel and 64 bit drivers (and run both 64 bit and 32 bit programs) or the 32 bit kernel and 32 bit drivers (and run only 32 bit and 16 bit programs).


Note that real mode 16 bit code does not work in long mode and hence Mac OS X would probably not be able to run 16 bit programs if they existed for Mac OS X and if Mac OS X runs in long mode (including compatibility mode). Windows also cannot run 16 bit real mode code in 64 bit mode.


VMware Fusion or Parallels running on 32 bit Mac OS X on 64 bit hardware do run 64 bit guests.


Each 32 bit process running on 32 bit Mac OS X on 64 bit hardware gets, I think, 4 GB of user virtual address space and 4 GB of kernel virtual address space. 64 bit processes get, I assume, 8 TB of user virtual address space and 4 GB of kernel virtual address space (because the kernel runs in 32 bit mode).


The Mac OS X kernel is (like most Mac OS X programs) a universal binary containing binary code for PowerPC, x86 (32 bit), and x64 (64 bit). Switching from one platform to another "simply" loads the appropriate part of the binary. The x86 code checks if long mode is available and switches to long mode if possible and runs in compatibility mode to achieve the desired result.


N.B.: While Mac OS X Snow Leopard does not run on PowerPC the kernel still contains PowerPC code, presumably because PowerPC binaries might make use of it. PowerPC binaries still run on x86 and x64 Macs.


windows 7 - HDD takes a long time to respond from idle, but SMART tells me that spin-up time is fine


I have an HDD that I've been using for a while. It's a Samsung HD753LJ 750GB running on SATA.


According to CrystalDiskInfo it has a Power On Count of 5,174 and Power On Hours of 17,664. Not sure if that would be considered "old".


The problem is, sometimes when I've left the disk idle for a while, it will take an inordinately long time to respond, say a minute or more, and it hangs Explorer in the meantime. However, CrystalDiskInfo tells me that its spin-up time is nothing to worry about. The normalised value it gives is 75, and the raw value is 0x2080.


This problem has just cropped up since I've transferred it to a different system with a fresh install of Windows 7. One thing that I've done differently this time is I've enabled AHCI in the motherboard. Prior to this I'm pretty sure I've been operating off older legacy drivers.


Another thing to note is that I think the problem has improved slightly now that I've installed all updates on the system. Prior to installing the system updates it was constantly happening, but now it's only happening every now and then. It's still too often, though.


EDIT: I've just double-checked, and I've swapped the SATA cable and SATA ports, and the problem still exists.



Answer



I figured out the answer - my best guess is that running an HDD in AHCI mode when it's not capable of running that mode caused this behaviour.


I physically moved the drive into my Ubuntu server to backup my files before the drive died - long story as to why - and I discovered that the drive was performing just fine. I looked into the BIOS on that machine and found it was still running all drives on IDE.


I went back to my Windows machine and switched SATA ports 4 and 5 to IDE mode, then plugged the HDD into port 4, and the problem is gone.


I assume the problem was that my motherboard was expecting to see an AHCI drive, but when that didn't work it fell back to IDE after a timeout period, and then the drive performed just fine. That's why when the drive went idle, there was a time delay before I could access it, but the SMART diagnostics reported no problem with its spin-up time.


My motherboard is a Gigabyte 970A-D3P with BIOS version F5. I assume that this behaviour is somehow related to the way that board is programmed, but I don't really know. I'm just putting the model number into this answer in case it helps anyone in the future.


Windows Installation and user profile path


I am just about to format my computer as I'm a frequent "clean type of person". The problems while installing Windows is that I always have to manually change location for my user files to d:/user files/{name}/music or videos etc. Now I'm using a ssd drive I would also like my appdata to be moved too that location aswell.


I know this is all possible through registry changes BUT the last time I attempted the relocation. It deleted all files within the target path and created fresh empty directories for my music, my videos etc. How can I accomplish this on a clean install, even logging in as admininistrator prior too any user account creations and point the profile paths to an already existing directory with files in it?



Answer



After some trial and error, it seems that the best method was to install windows, login to the admin during post installation.


Edit the registry @


 HKEY_LOCAL_MACHINE/SOFTWARE/MICROSOFT/WINDOWS NT/CurrentVersion/ProfileList 

Then change default, ProfilesDirectory and public to the desired paths.


I had played around with linking both symbolic and junction but for some strange reason it didn't work as expected and kept logging out while trying to log in. Also changing HKEY_LOCAL_MACHINE/SOFTWARE/MICROSOFT/WINDOWS NT/CurrentVersion/ProfileList/{profile id} (won't be hard to find when you see where the ProfileImagePath is pointing to) didn't work as expected either after creating the account.


I can't recall the problem but I think it was the same issue as mklink. The failures may have to do with the order I did things etc but in return the above method I had mention works for me, but be careful, if you create an account and that path exists with your files already there, it will wipe it all and create a fresh user directory.


So if you already have a profile at D:\users\{username} and wish windows to use that path for you new installation.. then make sure you rename it first eg D:\users\{username}.old then create the profile and cut and paste the contents from old into the newly created profile path. This will be instant considering the files are located on the same drive.


Now if you do not wish to do this every time you install windows, you can make a quick script too automatically do it for you.


Once Windows has finished installing, it will run any commands that you place in {windowscd}\$OEM$(maybe different for others but I'm not sure)\$$\SETUP\SCRIPTSSETUPCOMPLETE.CMD, then just enter the same process in that file. You may wish to use an usb device for this as CD's aren't writeable and there are plenty off methods out there in how to install windows from usb.


You can change registry settings, create user accounts, rename and move files straight from commands which fits the solution nicely...


Installing windows to dual-boot


I'm looking to install 32-bit windows with IIS to dual-boot with my 64-bit edition of windows on a laptop. I have a ten gig partition on my harddrive - is this large enough for a simple Windows install and a few programs?


I've never dual booted before, so I'm not quite sure how easy it is to mess up the process. Can you recommend any tutorials on how to set up a dual-boot configuration on Windows?



Answer



10 Gigs is enough for a windows-xp install but not nearly enough for a win7 install.


But have you considered using VirtualBox or VirtualPC or vmware to create a virtual machine instead of dual booting.


Today it's very easy to do and you have access to both environments at the same time.


windows - Video Input Out of Range

I tried to change the screen resolution because it was hurting my eyes but now the computer has a video input problem that says "out of range" and dv1 selection.


What I'm seeing:


enter image description here

Big window container in Windows to manage all windows?



This is a bit difficult to explain but I will try my best.


I am looking for a software that can be parent to any Windows application I like and will manage its size.


For example there is a software called IntelliJ, where you can open basically any time of text file ( .txt, .java, .php anything.. ) and you can divide the view in this application in the way you like and just move around the borders to resize the files that are open. A screen shot can explain better:


enter image description here


In this image, what I show with the green arrows are the borders I mention. I can simply drag them to right or left, and the relevant windows will automatically get bigger or smaller.


What I am looking for is, imagine a software that can be parent to the windows application I choose. So instead of text files, imagine you have internet explorer on the left handside, notepad++ on righthandside, utorrent in the lower part etc...


Hope what I am asking is clear, Regards.



Answer



What you want is a Tiling window manager. Windows itself has a basic tile-function but doesn't keep the windows tiled.


On the Wiki page Tiling window manager you'll find some Third-party addons. Although lots of these don't have links to the utilities i did find these articles for Blumb and DeskLayer.


I tried DeskLayer and it does automatically rearrange the windows when you resize one. It does not "contain" all the windows in a big "container" but it does keep you windows all tiled the way you want. (So see the big screen/desktop as a container ;) You can see an example video of this here.


If that one is not to your liking you can try Blumb or search the others found on that Wiki-page.


DeskLayer


windows 7 - External HDD is always in use when trying to safely remove

I have a WD 1TB Elements external hard drive, and every time I use the Windows 7 "safely remove" feature, it gives me a dialog telling that a process is using the disk.


Using Sysinternals Process Explorer and the answer on this Can Windows tell me what is using my USB drive? question, I get the following result:


Process Explorer


Process: System, PID: 4, Type: File, Names starting with E:\$Extend\$RmMetadata\$Txf


What is the $Extend folder and why is it in use? How can I disable it? I cannot remove it using the command line (access denied).


Edit: I've followed the instructions over here on Microsoft TechNet, and under the registry key


HKLM\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackup

I have a multi-string value named IgnoreNTFS with data \$Extend\* /s.


But this does not make any difference. Also, this question is not about a server.


Additionally I can tell that I use a program called mkv2vob to convert video files with a Matroska container into something my PS3 will play. I convert the source files straight from my external HDD, but I would expect if this program does not release the lock on the HDD, surely it cannot be locked if the process isn't even running?

Sunday, 28 April 2019

windows 10 - File permissions "Administrators: Full Control". Why isn't it always sufficient?

Consider the following situation.


Let's say I have two interactive local user accounts registered on my machine: Admin (member of Administrators group) and Alice (member of Users group). Let's say on my hard drive I have a folder Test with the following security settings:


Owner : Alice
Permissions:
System : Full Control
Administrators: Full Control
Alice : Full Control

Now, if I log in under Admin account and attempt to open the folder Test, Windows will initially refuse to do so. It will display a message box saying


"You don't currently have permissions to access this folder"

My first question is: why? I'm logged in as Admin - a member of Administrators group - and therefore I'm supposed to have full control of the folder. Why does Windows say that I don't currently have permissions?


Now, the aforementioned message box will also offer me the opportunity to "Click Continue to permanently get access to this folder". If I click "Continue", I'll be allowed to open folder Test. And, as a consequence of that, the security settings of Test will change to


Owner : Alice
Permissions:
System : Full Control
Administrators: Full Control
Alice : Full Control
Admin : Full Control

As you can see, Windows automatically added an extra entry Admin: Full Control to the list. After that I will be able to access Test without any restrictions. However, the above set of security permissions seems to be redundant to me. It already included Administrators: Full Control entry from the very beginning. Why wasn't that sufficient?


So, my second question is: why would Windows need an extra Admin: Full Control entry to finally give Admin that "full control".


What is the formal logic behind this behavior?




Some clarifications


Note, this question is not about my Admin account not being "all-powerful Administrator that can do whatever he wants". I don't expect my Admin account to be all-powerful at all. In fact, at the most basic level I don't care about any special rights of my Admin account. It is just some account that belongs to some group.


My question is about file system access rights granted through group membership.


Consider another example. Let's say I created some random user group called Ugly Ducklings. And I added regular users Alice and Bob to the Ugly Ducklings group.


Then I create folder DucklingTest with the following permissions


Owner : Alice
Permissions:
Ugly Ducklings : Full Control

Now, if I log in as Bob I will indeed have full control over DucklingTest folder (!).


Why?


Is my Bob an all-powerful administrator? No. Is my Bob privileged in any way? No. Do I have to "elevate" Bob somehow, to perform access to DucklingTest? No.


So, why does Bob have full control over DucklingTest folder?


Easy. Bob has full control over DucklingTest folder because Bob is a member of Ugly Ducklings group and Ugly Ducklings group has been granted full control permissions over DucklingTest. End of story.


How come the same logic does not apply to Admin and Administrators? Admin is a member of Administrators group and Administrators group has been granted full control permissions over Test folder. What's missing here? What kind of extra "control" Windows is trying to enforce in this case by imposing what looks like extra restrictions on members of Administrators group?

bash - Disable the ">" operator in Rstudio linux terminal

For an interactive session via SSH on a Linux cluster in Rstudio, it is very easy to accidentally execute the keyboard shortcut for "run in terminal" when commands are highlighted in Rstudio console. This results in behavior such as


\> library

or


Var1>Var2

being executed in terminal, which creates a library or Var2 file in the remote working directory if the terminal is logged in at the bash prompt.


In a worst case scenario this would result in overwriting files in the remote working directory.


I would like to disable ">" in these sessions, but I am not sure how to do this.

windows 7 - Hardware reserved memory issue


I've seen lots of folks having problem with **hardware reserved" memory issue in Windows 7/Server 2008 R2. I have it myself but not as huge as others have.


Problem description


When you install Windows 7 (or its bigger brother Windows Server 2008 R2) your memory may not be fully utilised. If you look at


Task Manager >
Performance Tab >
Resource Monitor >
Memory Tab

And scroll to the bottom of the list you will see a graphical representation of your memory. Some of it may be hardware reserved. Previous Windows versions didn't have this problem. System was able to utilise all memory available.


Question


Is there any solution to lower/remove hardware reserved memory?


Sidenote


I tried installing 32 and 64 bit versions but to no avail. I also tried both Windows: 7 and Server 2008 R2. But always get the same amount reserved by HW. On previous Windows versions I had more memory available because I'm simultaneously running 2 VMs on host (so three machines all together). And my memory peaks much higher now as it did on older versions.


My issue


My computer is HP nc8430 notebook with Intel T7200 processor, 4GB memory and 320 GB hard disc. It has an ATI Radeon Mobility X1600 graphics card with dedicated 256 MB of memory. And I'm running Windows Server 2008 R2 x64 at the moment. I'm getting 641 MB of harware reserved memory in any of the upper sidenote described configurations.



Answer



The hardware reserved memory has nothing to do with Windows 7/Server 2008 R2, it's just that earlier versions of Window's didn't point it out to you this clearly. On my work laptop Windows 7 shows 31 MB of system reserved and when I was running Windows XP, (looking closely I can't remember where), it showed that I had 4064 MB available (when I had 4096 MB installed).


You will have to examine your hardware to determine the cause of the reserved memory, but I doubt there is anything that you can do.


Edit based on hardware description:


According to HP your laptop has an Intel 945 chipset. That chipset only does 32bit addressing so you won't be able to use all 4GB of your RAM, since some of that address space is reserved for hardware IO. Even running 64 bit Windows, you're stuck with 32 bits of hardware address space because of the chipset


Onboard RAID vs Software RAID


My motherboard, an Asus M4a79t Deluxe, advertises RAID 0/1/5 capabilities. My limited understanding is that onboard RAID is better than software RAID. Is this necessarily true? Is an onboard RAID controller closer in performance to a software controller or a dedicated hardware controller?



Answer



Hardware RAID, which means buying a RAID card, and installing it in your computer is good.


Software RAID is low performance, but it's reasonably stable, and pretty reliable.


"Onboard" RAID, which is the crappy RAID emulation built into your motherboard, has low performance, AND low stability.


I have used onboard RAID before, and I have always regretted it. You gain nothing, zero, zip, from using built in RAID emulation, no matter how much you paid for the motherboard. There is no optimization, there is no performance increase. Lose a drive in a RAID 5...It can take literally DAYS to rebuild it. Likewise checking an array for errors, and errors WILL happen, because it's not reliable.


If you use software RAID emulation, at least you can put the drives in another machine and have a good shot for recovering the RAID. With an onboard RAID emulator? Impossible.


email - Are .eml attachments a security risk?


My email service provider blocks mails with attached .eml files, apparently for security reasons, with the result that I loose relevant mails.


I have tried to find a description of the current security risk of forwarding mails with .eml files attached, but I could only find posts about 10 years old about vulnerability in Outlook.


What are the current risk of mails with .eml attachments, and is blocking by an email service provided still relevant ?



Answer



What are the current risk of mails with .eml attachments ?


Risks described in this post are still the risks with mails with .eml attachments because of old IFrame exploits, MIME exploits and viruses like Nimda



In some email clients, such as Microsoft Outlook, .eml files can trigger active scripting that can be used to launch virus activity. Furthermore, other executable file types can be wrapped in .eml files in order to bypass other virus checking scans. Therefore, many ISPs and email servers block the .eml file type.



Is blocking by email service provider still relevant ?


This is debatable topic.


But if service provider wants to take the ownership of filtering emails for you, they must provide you with a quarantine zone where you can check what emails are blocked and if you want them to be delivered or not


microsoft excel - Check if a specific range of values in one dataset exists in another dataset


I have two datasets, 1 and 2, each containing a number of columns with values. My end goal is to find all of the rows in dataset 1 that are different from and can't be found in dataset 2.


Dataset 1 (example):


Name        Species Age
Donald Dog 3
Petronella Dog 5

Dataset 2 (example):


Name        Species Age
Donald Dog 3
Anna Dog 5

In the example above, I would like to find out that the combination of cell values regarding Petronella are unique to the first dataset and can't be found in the second. Donald and Anna are of less interest in this case.


Perhaps an easy option would be to add a fourth column with a value of 1 or 0 depending on wether the range of data is present in the second dataset.


I know how to compare one range directly to another range, but how do I expand this comparison to include all of the rows in dataset 1? The order of the rows should not be a factor when determing if a range of values in dataset 1 can be found in dataset 2.



Answer



You can use MATCH and CONCATENATE in an Array Formula to know the list of Unique Values from Dataset1. Since MATCH is used the comparison is not Case Sensitive though.


Sample Dataset1 is in cells B4:D7 & dataset2 is say in G4:I7. Now in E4 put the following formula and then press CTRL+SHIFT+ENTER from within the formula bar to create an Array Formula. The formula shall get enclosed in Curly Braces to indicate that it's any Array Formula.


=IF(ISERROR(MATCH((B4&C4&D4),CONCATENATE($G$4:$G$7,$H$4:$H$7,$I$4:$I$7),0)),"Unique","Duplicate")

See the below screenshot. It's the basic use of MATCH but the argument is Concatenated List of Rows in an Array.


enter image description here


linux - Firefox thinks I'm using and older Flash version


I'm running Firefox 35.0 on Fedora 20. It has the current latest Adobe Flash version (11.2.202.440).


Firefox is blocking Flash and displaying an alert bar, claiming it is outdated:


enter image description here


In English: Firefox has prevented an outdated plugin 'adobe flash' from running


Just to be sure, I ran:



  • yum reinstall http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm -- it installed adobe-release-x86_64.noarch 0:1.0-1.

  • yum reinstall flash-plugin -- it installed flash-plugin.x86_64 0:11.2.202.440-release.


Then I restarted Firefox in safe mode and checked about:plugins.


Shockwave Flash

File: libflashplayer.so
Path: /usr/lib64/flash-plugin/libflashplayer.so
Version: 11.2.202.425
State: Enabled (STATE_VULNERABLE_UPDATE_AVAILABLE)
Shockwave Flash 11.2 r202

Checking the actual .so file for versions strings, it looks like I have the correct version.


$ strings /usr/lib64/flash-plugin/libflashplayer.so | | grep "11.2.202"
FlashPlayer_11_2_202_440_FlashPlayer
LNX 11,2,202,440
11.2.202.440
drm/%s/%s/%s/11.2.202.440%s

What's going on and how can I fix it?



Answer



There is a pluginreg.dat file on my Firefox profile folder:


Generated File. Do not edit.

[HEADER]
Version:0.17:$
Arch:x86_64-gcc3:$

[PLUGINS]
libflashplayer.so:$
/usr/lib64/flash-plugin/libflashplayer.so:$
11.2.202.425:$

(...)


Removing it forces Firefox to re-generate it with correct data.


Now about:plugins states:


Shockwave Flash

Arquivo: libflashplayer.so
Caminho: /usr/lib64/flash-plugin/libflashplayer.so
Versão: 11.2.202.440
Status: Ativo
Shockwave Flash 11.2 r202

apache http server - charset=iso-8859-2 webpage displays with UTF-8 header - question marks (�) instead of accented letters

I have a webserver administration question. In this website: http://www.mirkaphoto.hu/ All PHP generated pages contain the following line:




But this is somehow disregarded probably via the php-apache processing and the page displays in browsers with an UTF-8 header. As a result of that question marks (�) are shown in the page text instead of accented characters (éáöőóüűúí). I tested this in Firefox, IE, Chrome and Seamonkey.


The strangest in this phenomenon, that this symptom started only yesterday, after I upgraded my server to Debian 8.0 Jessie from 7.0 Wheezy. During the upgrade I also upgraded all other packages as well, including apache, php, and so on, and selected "yes" for overwriting config files with factory default ones. After this I fine-tuned my config files to have everything the way I like, but I did not find a way to fix this. Before the upgrade, the page displayed just fine.


Here is a screenshot, where you can see that Firefox sees the "charset=iso-8859-2" definition, but still displays the page with UTF-8 encoding.


screen shot


My suspicion is, that this is a server configuration issue, but it could also be, that one part of the processing component (Apache, php) changed due to the upgrade in some way, resulting this strange behavior. The problem is, I can't pinpoint, what could possibly cause this problem.


Can anyone solve this mistery? What could be possibly going wrong during the processing of the page?

networking - TCP/UDP hole punching from and to the same NAT network

I was wondering if tcp/udp hole punching would still work when you are in the same network (behind a NAT), and what the packet's path would be.


What happens when using hole punching on the same network, is that it will send a packet out with the same destination and source address. Only the source and destination port would differ. I imagine a router with NAT loopback enabled will handle this as it should, but how about other routers? Would they drop the packet, or would a router (the first?) from the ISP bounce the packet back after which it gets handled okay?


I'm wondering because I was thinking about using this technique to circumvent a block between peers in a network (like a school network where clients can only access the internet, but any contact with each other is blocked). The only other option is to use a man in the middle as proxy (tunnel?). The disadvantage of this is that you have to have a server with significantly more bandwidth than one that would only do hole punching. Also the latency would increase significantly.

VirtualBox fails to start on Windows Server 2003

For reasons I cannot disclose, I need to install a Linux server within a VirtualBox host running in Windows Server 2003. Unfortunately, VirtualBox fails to start, giving me an error that seems to indicate it could not build a chain of trust to the executable's certificate.



WinVerifyTrust failed on stub executable: WinVerifyTrust failed with hrc=CERT_E_CHAINING on '\Device\HarddiskVolume1\Program Files\Oracle\VirtualBox\VirtualBox.exe'(rc=-22919)



System details:



  • Operating system: Windows Server 2003 SP 1

  • Last updated: unknown

  • VirtualBox version: 5.0.0


I did do some research on my own, which pointed to a failed update. I attempted to run Windows Update to fix it, but it failed with multiple errors. I tried removing SoftwareDistribution and restarting the Windows Update server to fix this, but the errors persisted.


Another inquiry led me to this, which directed me to install the executable's certificate. I followed the article's instructions, and installed Symantec's certificate (under countersignatures) for good measure. After a reboot, my problem was still not resolved.


Finally, I tried clearing the CRL cache by running certutil -urlcache crl delete in cmd and rebooting. Unfortunately, that did not work either.

Saturday, 27 April 2019

boot - How do I tell Windows 7 to never Launch Startup Repair


I have a Windows 7 (64-bit) virtual machine that I primarily remote desktop into. Sometimes on boot something goes wrong and it displays the following DOS screen:


                             Windows Error Recovery
Windows Failed to start. A recent hardware of software change might be the cause.

If Windows files have been damaged or configured incorrectly, Startup Repair can help diagnose and fix the problem. If power was interrupted during startup, choose Start Windows Normally.
(Use the arrow keys to highlight your choice.)

* Launch Startup Repair (recommended)
* Start Windows Normally

The default option is Launch Startup Repair (which happens automatically after 30 seconds). How can I set it so that this never happens, and it always tries to Start Windows Normally?



Answer



Do this command:



bcdedit /set {current} bootstatuspolicy ignoreallfailures



Similar is



bcdedit /set {default} bootstatuspolicy ignoreallfailures



They can be the same if you are booted into the default load, so default would equal current.


For more information, the relevant Google search is "disable Windows Error Recovery" (minus the quotes).


VirtualBox in Windows 10 64-bit guest only shows 32-bit options



I am running VirtualBox v5.2.32 on an Ubuntu 18.04 host. I have created a Windows 10 (64-bit) guest. I installed VirtualBox v6.0.10 in the Windows 10 guest (Windows 10 Pro - v1903 - 64-bit). I am trying to create an Ubuntu (64-bit) guest inside the Windows 10 guest. I only see 32-bit options inside the Windows guest. After several attempts to resolve this, I am still only seeing 32-bit options.



The purpose for creating a VM inside a VM is to be able to ensure that VirtualBox is working so that I can test Vagrant configuration inside a Windows 10 environment. Our Vagrant config is using 64-bit base images, so I need to be able set up 64-bit guests inside this Windows 10 guest.



...on the Ubuntu Host


I have checked Enable VT-x/AMD-V on the System > Acceleration tab in the Ubuntu host's VirtualBox config for the Windows 10 guest machine.


...on the Windows Guest


In the Windows guest machine, I can see that the host's physical CPU details are passed through in Settings > System > About and it shows as a "64-bit operating system, x64-based processor".


This is a vanilla Windows 10 Pro installation, no additional software (i.e., no addon virus protection software).


I inspected Windows Features to ensure that the following are not checked:



  • Guarded Host

  • Hyper V

  • Virtual Machine Platform

  • windows Hypervisor Platform

  • Windows Subsystem for Linux


...because my googleing seems to indicate that some or all of these might be an issue.


Based on a VirtualBox forum (I have a 64bit host, but can't install 64bit guests), using gpedit.msc, I set Local Computer Policy > Computer Configuration > Administrative Templates > System > Device Guard > Turn on Virtualization Based Security to Disabled. I also check that Windows Security > Device Security > Core Isolation Details is set to Off.


I have "repaired" the VirtualBox installation. I have uninstalled VirtualBox, rebooted, reinstalled, and then rebooted again.



I looked at these related, previously asked questions and followed their suggestions as indicated in the steps above. Everything I am finding seems to be related to a Windows 64-bit host running directly on the host machine, not dealing with a Windows host which is itself a guest VM.




Answer




I am running VirtualBox v5.2.32 on an Ubuntu 18.04 host. I have created a Windows 10 (64-bit) guest. I installed VirtualBox v6.0.10 in the Windows 10 guest. I am trying to create an Ubuntu (64-bit) guest inside the Windows 10 guest. I only see 32-bit options inside the Windows guest. After several attempts to resolve this, I am still only seeing 32-bit options.



VirtualBox does not support hosting a 64-bit virtual machine within another virtual machine.



I have enabled VT-x/AMD-V in the Ubuntu host's VirtualBox config for the Windows 10 guest machine.



While you have VT-x/AMD-V enabled, which is the reason you are able to run the first 64-bit virtual machine, it is not being passed through to the virtual machine. VirtualBox nested virtualization does not support, exposing the virtualization technology x86 extension, to a nested virtual machine. This is the reason you are unable to run a 64-bit operating system within the second virtual machine.



Everything I am finding seems to be related to a Windows 64-bit host running directly on the host machine, not dealing with a Windows host which is itself a guest VM.



This is due to the fact what you want is extremely niched. What you want is not possible with VirtualBox using your current hardware.



Oracle VM VirtualBox supports nested virtualization on host systems that run AMD CPUs. This feature enables the passthrough of hardware virtualization functions to the guest VM. That means that you can install a hypervisor, such as Oracle VM VirtualBox, Oracle VM Server or KVM, on an Oracle VM VirtualBox guest. You can then create and run VMs within the guest VM.



**However, even with nested virtualization enabled, what you want is not possible with the AMD hardware you currently have. In order for VirtualBox to be used your processor must support Rapid Virtualization Indexing.



Rapid Virtualization Indexing (RVI), known as Nested Page Tables (NPT) during its development, is an AMD second generation hardware-assisted virtualization technology for the processor memory management unit (MMU).



AMD-V is considered the first generation hardware virtualization. In order to enable nested virtualization, on a system with the required processor, you must use the --nested-hw-virt option with the modifyvm command.


Source: Nested Virtualization



Host machine is an AMD Opteron 6338P. Enable VT-x/AMD-V is checked in the VM config for the Windows guest machine. So, VT-x should be exposed to the Windows guest.



VT-X only exists on Intel hardware. Your AMD Opteron 6338P only supports AMD-V. However, the option you have selected, allows you to run a 64-bit operating system within the virtual machine. It does not actually enabled what limited nested virtualization VirtualBox supports.


internet explorer - Greasemonkey for IE (8)?

I've been searching some of the morning today and am unable to find a 'Greasemonkey' type program for IE8.


I have a horrendous 'Incident Monitor' ticket app at my company and it looks like it was developed for tiny screens and IE5, I would like to get some control over this mess.


Greasemonkey would work but app won't allow FF, one of those IE-only things.


I'm looking to be able to modify some styles / add to styles / view.

Microsoft Outlook 2007 freezes

What are the causes that MS Outlook 2007 freezes? It's OK a few seconds after launching the application but when I want to do some action (e.g. write new e-mail) it suddenly freezes. Is there some troubleshooting?


thank you

boot - Does a modern PC require a graphics card to run?


As I can remember, on old systems (Pentium II or III) it was not possible to boot and run the PC if the graphics card was missing (AGP cards were used in those days).


Many years from then, I'm using motherboards with integrated graphics and I have no experience related to this subject, the "graphics card" always was present.


Currently I intend to build a home/private "server" for my purposes and most of the motherboards I want to buy have no integrated graphics (AMD 870 or 970). I can take a normal graphics card from my friends for a few hours/days and use it when installing the necessary software.


Can I boot and run the PC without problems after I install everything I need and the graphics card is removed? If a general answer cannot be given, at least some examples of manufacturers/MB series/MB models will be helpful.


I think it's obvious, but for completeness, I mean cheap desktop components and not real servers.



Answer




Does a modern PC require a graphics card to run?



I believe that many motherboards can boot without a video system. (but I have no actual experience of this)


Wikipedia says



During bootup, some (especially older) PC BIOS versions will wait indefinitely for a user to press a key before proceeding if some basic devices are not installed or connected, effectively halting an unattended system. These can include:



  • a video card;

  • a keyboard.


On more modern systems, the BIOS factory setting will typically be configured to behave this way as well, but this setting can be changed via a BIOS setup facility to proceed without user intervention. Even in cases where a system has been set up to be managed remotely, a local keyboard and video card may still be needed from time to time, for example to diagnose boot problems that occur before a remote access application is initialized.



Certainly many server-grade motherboards are designed explicitly for this - the Wikipedia article mentions this, I have HP and IBM servers that include some sort of Ethernet based "console" support for boot messages etc.




In general I'd download and read the motherboard manual and check that there is an option that allows booting to continue without pressing a key after an erro


e.g. on ASUS UEFI BIOS



Wait for ‘F1’ If Error [Enabled]
When set to [Enabled], the system waits for the key to be pressed when error occurs.



esd - What exactly is grounded through motherboard standoffs?

My micro-ATX motherboard is mounted to brass standoffs inside an unpainted metal case.


What part of the motherboard is electrically bonded to the case through these standoffs?



  1. Only the metal traces around the screw holes?

  2. Or the whole ground-plane of the motherboard?


The ground-plane is the common ground for all circuit grounds on the motherboard, right? It's a copper layer inside the multilayer PCB, isn't it?


If the standoffs are bonded to the ground-plane, then i have another question.



  1. Is the case grounded to the motherboard?

  2. Or is the motherboard grounded to the case?

Windows explorer: sort by date modified

Is it possible to properly view the contents of a folder sorted by modification date in Windows explorer (Windows 7)?


I can sort by the date modified column, but folders and files are seperated. I really want files and folders interlaced together, sorted by modification date (like on a Mac).


Is this possible?

windows - How can I open a URL on a schedule in the default browser?


I'm looking for a mechanism to open a single URL in the user's current default browser on a schedule/recurring basis.


I know that if I was writing .Net code to do this, I could simply do something along the lines of Process.Start("http://example.com/somePage.html") which will cause the default browser to open to that address. Likewise, I can go to Start -> Run and type in a given address and that too will cause the default browser to open to that address. Using this knowledge, I thought I would create a Windows Scheduled Task where the "Start a program" field was set to the URL I wanted to start. Unfortunately, this doesn't work. When the task runs, the URL is not opened (nor are any browsers).


Can anyone point me in the right direction to make this happen? Ideally, I would like to stay away from 3rd-party utilities, leveraging Windows' Task Scheduler would be great. Also, just to be clear, I'm not looking for a browser plugin to accomplish this.


Also, I'm not looking for anything fancy wrt waking a sleeping computer to carry this task out. I'm fine with just letting this happen only when a user is logged in.



Answer



I would create a batch file containing:



start http://example.com/somePage.html



And point Task Scheduler to that batch file. You can also test that it will work by running the batch file manually.


compression - Compress pdf file?



I need to reduce the size or compress a PDF file. The PDF file is actually scanned images. Is there any way by which I can compress the file?



Answer



Here's a link to some good recommendations. Most of them require either using PrimoPDF or NitroPDF.


windows 7 - How to unblock chm files - unblock button is missing

I downloaded a CHM file. When I double click it it prompts me to open / save / cancel. Whether I open or save a new copy, the 'new' version will prompt the same open / save / cancel popup ad infinitum.
Searching google it seems that Microsoft have deemed it right for security reason to block these files by default. The solution is to right click the file, and click the 'unblock' button at the bottom:

enter image description here

The problem is that I don't have that button on my system:

enter image description here

BTW, the button is also missing for .exe files.
I'm using Win7 64bit. Any ideas?

Second monitor on Laptop -- external monitor keeps defaulting to the right side

I have a T61 running Windows Server 2008 (yes as a desktop OS) and I use an external second monitor. The external monitor sits to the left of the laptop. When I sleep the laptop and then use it as a laptop it properly reverts to single screen mode. However, when I re-dock it thinks that the monitor is to the right of the laptop.


Every morning I need to re-open the display properties and put the monitor back to the left.


I seem to think that when the OS was fresh it properly remembered the setting but at some point it started to "forget" and revert to the default.


If I sleep and don't open the laptop but later just re-dock it works fine.

Install Windows 7 twice (dual boot) - licensing issues?




Possible Duplicate:
Can I use my Windows 7 license in a dual-boot configuration?
Windows 7 and Vista Activation FAQ: How do language, version, 64-bit or 32-bit, and source affect ability to install and transfer Windows licenses?



I am a software developer and I tend to install a truckload of utilities, servers, IDEs and dev stuff. In time the OS gets overloaded and the boot time goes way up.


A lot of times I need to just start the computer and just visit a site. And I have to wait almost 10 minutes for this. A clean Windows 7 install would boot way faster, on this exact machine.


Therefore I thought how about installing Windows 7 twice, on two boot-able partitions. A mint install and a dev install.


Would this be ok license-wise? How about tech-wise?



Answer



License wise that would not work. 1 license, 1 computer, 1 install. Windows 7 is licensed per install, not per system. In other words, every install of Windows requires it's own license.


Which is why RedGrittyBricks advise is good. Install linux as the dual boot alternative.


From MS's Windows 7 EULA:


1. OVERVIEW .
a. Software. The software includes desktop operating system software. This software does not
include Windows Live services. Windows Live is a service available from Microsoft under a
separate agreement.
b. License Model. The software is licensed on a per copy per computer basis. A computer is a
physical hardware system with an internal storage device capable of running the software.A
hardware partition or blade is considered to be a separate computer.

2. INSTALLATION AND USE RIGHTS.
a. One Copy per Computer. You may install one copy of the software on one computer. That
computer is the “licensed computer.”
b. Licensed Computer. You may use the software on up to two processors on the licensed
computer at one time. Unless otherwise provided in these license terms, you may not use the
software on any other computer.
c. Number of Users. Unless otherwise provided in these license terms, only one user may use the
software at a time.

Friday, 26 April 2019

hard drive - Windows 10 Eating up Disk Space


I recently upgraded to Windows 10. It's been a pretty rocky road thus far. My current issue is Windows 10 keeps using up my SSD's disk space until it has none left and then complains I have no space left. I keep my data on a separate drive, and just the OS on the SSD.


Every time I look at the drive, there is less and less space. I clear a few gigabytes of stuff so it is at 4 GB free space, then it quickly starts going back to 0. It's not temp data, so how do I figure out what is using up all this space?



Answer



Most likely it's your paging file.


I would suggest creating a partition just for paging, or you can limit how much paging space you want to let Windows use by heading to Advanced Settings.


ffmpeg - Extract video frames display time and frame number

I would like to extract each frame and its display time. The purpose will be to later compare the output between two videos (reference/original video and the transmitted video) and see what frames are missing. I plan on using Big Buck Bunny (http://download.blender.org/peach/bigbuckbunny_movies/) as my sample video.


FFMPEG seems to be the tool to use for this, but I haven't found the correct combination of options to use for my use case.


I am expecting my output to resemble something like:


    frame = 1, time = 0
frame = 2, time = 2
frame = 3, time = 3
...
frame 14315, time = 596

I am hoping that the degraded video would show signs of degradation via its output with frames missing and time out of sync.

Microsoft Visual Studio 2013 won't load past splash screen

I've searched high and low for this fix but no cigar. I recently installed a new motherboard (MSI Z77A-G45 Gaming mobo) and now Visual Studios won't load past the white splash screen that says "Visual Studio".


I believe it could be related to a problem with Secure Download Manager, as since the I installed the new mobo, it displays "Navigation to the webpage was canceled". I'm using SDM to download VS because I got VS for free on Dreamspark, so there's a problem, I can't redownload it because I can't run the downloader (what happened to direct downloads?).


Here's the kicker: After several problems after switching motherboards, I suddenly remembered to reinstall windows. However, due to the way I originally (a few years ago) set up my computer, I couldn't wipe my primary hard drive and had to learn to do it with command prompt in the Windows Recovery thingy (can't remember the name at the moment).


Due to the beginners luck, I wiped every single partition and drive on my computer (oops) and, as a result, everything is fresh.


I'm tempted to say bad motherboard, as that's the recent change that threw my world into chaos (i'm already down 3 assignments in class), but waiting for a new one and then it not being the case is a severe waste of time and resources.


On top of that, it doesn't appear to be hardware related, so it has to be something I forgot to install that is both screwing with VS and SDM, but would allow my computer to function normally otherwise. It's possible it's also causing problems with my inability to connect to Steam without using -tcp protocols, but I wouldn't hold my breath, Valve seems to be disappointing me a lot lately.


UPDATE: I can open up Blend just fine, too bad I don't use it... (yet).

How can I download ubuntu packages in windows to install them on an offline ubuntu machine?

How can I download ubuntu packages from online repos thhrough windows to install them later on an offline ubuntu machine?


this is related to this question: Ubuntu repository download iso


if there are any ready-made iso's for 11.10 that include device drivers, language packs & software packages would be great for ubuntu users without an internet connection.


any ideas?

wireless networking - Difference between wifi router and access point?


I see both terms used, and I was wondering what the difference is between a wifi router, and a wifi access point. Does the latter only create a LAN, with no way to connect the wifi box with a second network?


Thank you.



Answer



Access Point is just a bridge between wired and wireless networks. It only operates in 1st and 2nd layer. It doesn't perform any 3rd-layer operations (routing, NAT-ing, IP filtering...)


formatting - Disk Formater that i can burn on CD and boot from


Is there a Disc Formatter out there that i can boot into using a CD and format my Harddrive.


I know i could use fedora CD but i was wondering if there is one out there that will make sure the data is actually gone and not just there links.



Answer



Dariks Boot and Nuke will format the hard drive for you and has a bootable ISO download. If your looking for a partition manager then I suggest Gparted


networking - How do I permanently assign an IP address with DHCP?


I am wondering if there is anything (software or hardware) out there that can do something I think I may have made up, Dynamic Static IPs. The idea is that when a new device connects to the local network this device/software acts as a DHCP server, if the device is new then it dynamically assigns it a new address that has never been used before and stores this MAC Address IP Address combination in a database, if the device's MAC is in the database the devices gets the same IP as before.


I am aware this is similar to sticky IP allocation but I don't want the IPs to stick for a while I want them to be superglued on for ever.


Bonus question: Is this possible using a Raspberry Pi running Raspbian on a network with around 100 devices? The RPi is already acting as the DHCP server and the router has this capability but it is turned off.


Many thanks in advance for any and all help offered!



Answer



Most DHCP servers work this way, it's just they don't permanently assign the IP to a host.


On Linux, using isc-dhcp-server, it's possible to set the lease duration to never expire.


Ubuntu 11.04 (64-bit) won't boot. Forgot to install GRUB 2. Manual GRUB install fails


I cannot get Ubuntu to boot. I downloaded the Ubuntu 11.04 64-bit mini.iso and installed it in Virtualbox (v.4.1.2 running on OS X 10.5.8). When I installed Ubuntu, I selected "Command-line expert install", and I may have made two mistakes:



  1. I chose to install the generic virtual kernel.

  2. I didn't install a boot loader.


The installation finished, and when I reboot, I get this blank black screen with an arrow that doesn't flash


enter image description here


I think this happens because GRUB was not installed. (If I hold down SHIFT or E during boot, nothing comes up. update-grub also doesn't work.) I tried installing grub using sudo aptitude install grub-pc, but that returned several error messages:


screen capture of sudo aptitude #1


screen capture of sudo aptitude #2


Could someone please help me get Ubuntu to boot? I can post more details if they are helpful.



Answer



Here's my approximate notes on how I chroot in and play with grub stuff:


Step 1) Boot from a LiveCD, I prefer USB drives to CDs.. Just be sure the LiveCD is as close as possible to the installed environment.... It certainly needs to be the same general architecture (x86 versus x64). You can get in to other weirdness if the live environment is otherwise sufficiently different too.


Step 2) Mount your ubuntu installation's root partition to /mnt:


# sudo mount /dev/sda1 /mnt

Obviously your root partition may not be on /dev/sda1 - if you're unsure, use fdisk or gparted to figure out where it is.


If you intended to have a boot partition, you'll want to mount that too:


# sudo mount /dev/sdaX /mnt/boot

Step 3) Get networking going, under the live environment. Ping google.com or something to confirm you've got connectivity.


After you've got networking going, you'll need to copy your DNS settings over to your installed environment before chrooting:


# sudo cp /etc/resolv.conf /mnt/etc/

Get ready to chroot:


# sudo mount -o bind /proc /mnt/proc
# sudo mount -o bind /sys /mnt/sys
# sudo mount -o bind /dev /mnt/dev

Step 4) Chroot in to the installed environment:


# sudo chroot /mnt /bin/bash

Step 5) Test that things are working. Try to ping google again - if it works, now your 'installed' environment can be totally played with. If they're not working, umm, maybe go back over the steps and make sure you did them correctly - or post a comment...


Step 6) Install Grub:


# sudo apt-get update; sudo apt-get install grub-pc

Step 7) Try rebooting and check things out. If you're still out of luck, you can re-enter your installation via chroot and try more things... Such as below..


Still having problems? You may want to manually run stuff such as:


# sudo dpkg-reconfigure grub

or:


# sudo grub-update

IF you're still having problems, try installing "boot-repair":


# sudo add-apt-repository ppa:yannubuntu/boot-repair
# sudo apt-get update && sudo apt-get install -y boot-repair && boot-repair

More about boot-repair here.


Other Helpful Stuff I often suggest people check out Super Grub Disk, it's pretty epic for booting otherwise messed up set ups.


For those multi-booting with Windows Vista or Windows 7, I often like suggest checking out EasyBCD - it provides a really snazzy means of managing booting. And I've found it helpful for getting an otherwise under-cooperative system booting again. I gotta hand it to them, I like EasyBCD over grub, for now. Note there's a free version there.




There ya go, hope that helps.. Here's where I first really learned about chrooting, which, as you can see, is very very powerful and handy.


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...