Windows 10

How to stop auto-reboot of Windows 10 after update

Windows 10 is really annoying with auto-update, auto-reboot etc. I found that thing to work (thanks to NyxRyu on reddit):
  • Open up C:\Windows\system32\
  • Right click on "MusNotification.exe"
  • Go to "Properties"
  • Go to "Security" tab
  • Click "Advanced"
  • At the top you'll see "Owner: TrustedInstaller" with a link to "Change" it. Click the "Change" link.
  • Type in your username and press Check Names. It should underline your username (and possibly prepend it with your machine name) if it finds it. If it doesn't, you'll need to figure out your username and make sure you get this part right.
  • Press "OK". Dismiss any warnings or alerts.
  • Re-open the properties of MusNotifications.exe and go to the "Security" tab (seriously it's important that you REOPEN it after changing the owner).
  • Click "Edit..."
  • Click on "SYSTEM" in the list of "Group or user names"
  • Click on the "Deny" checkboxes for "Read & execute" this should also automatically "Deny" for "Read", if not then do so yourself.
  • Click Ok to dismiss the dialog again.


  • Get rid of Auto windows/linux line endings in git:
    git config --global core.autocrlf false
  • Using SourceTree on Windows, pointing by Samba share to linux machine and editing files from both machines may trigger a state, where there is no real file-content differences, but git on windows shows stuff like:
    diff --git a/bjson_c/ b/bjson_c/
    old mode 100755
    new mode 100644
    The solution is to change core.filemode flag:
    git config core.fileMode false


What is $ (the Dollar Sign) in JavaScript scripts ?

We all use the call to document.getElementById() a lot. So, the industry made an informal standard.
$() is a common shortcut to document.getElementById().
The example implementation can be:

function $(element)
    var elements = new Array();
    for (var i = 0; i < arguments.length; i++)
        var oneArg = arguments[i];
        if (typeof oneArg == string)
            element = document.getElementById(oneArg);
        if (arguments.length == 1)
            return element;
    return elements;

You can of course implement your own, or use any of public JavaScript libraries that use it.

Some advanced example can be JQuery, which uses $() as the selector. Usage consist of calls:

$('#id') - this would "select" element by id
$('.xxx') - this would "select" all elements, which have CSS class "xxx" attached

and gives more - just read about selectors in JQuery documentation.


How to test websites for compatibility with old Internet Explorers ?

Testing your websites code, appearance etc. for compatibility with old Internet Explorer versions is really easy.
Microsoft distributes Virtual PC images for testing purposes. You can find them here.
A lot to download (several gigabytes), but then you can run fully working versions of IE6, IE7, IE8 and IE9 all at the same time at one PC.

Opera: Where does Opera store cookies?

  • Enter opera:about in Opera address bar. You'll find some paths list.
  • Look through the paths - search for filename cookies4.dat - this is your cookies file.
  • For Opera 11.0 on Windows Vista the path is C:\Users\<your username>\AppData\Roaming\Opera\Opera\


Nmap: quick scan for open devices

If you don't have nmap installed:
sudo apt-get install nmap
nmap -sn

Linux graphics card (GPU) acceleration

Check VGA on linux:
lspci -nn | grep -E 'VGA|Display'
The Chrome URL is:
Radeon driver compatibility list:
dmesg | egrep 'drm|radeon'

How to delete all files in subdirectories using wildcards ?

Try understanding and then using one of these lines:
find . -name "*.d" -exec rm -rf {} \;
find . -name "*.d" -exec rm {} \;
Warning: you are messing with files removal... Do not remove too much :)

How to remove all .svn directories?

To remove all .svn dirs:
find . -name .svn -exec rm -rf {} \;
To be sure you won't remove too much, try listing them before removal:
find . -name .svn -exec ls {} \;

How to run Linux programs on linux machine, but display graphics using X-Server on Windows machine

You can do it simply installing and configuring X-Ming and ssh on windows and then running some scripts...
Read the "Short XMING how-to" (somewhere around on this site).

Short XMING how-to

  • download XMING + FONTS
    google for XMING or checkout the url:
    last time I used Xming ( + default Xming-fonts
  • download and install ssh
    ssh can be easily downloaded as a part of Cygwin. Download cygwin ( or use google) and run its setup. Then mark the ssh and install it.
    Or just try downloading simply ssh.exe and some dlls (google):
    needed by ssh.exe
    also ssh-keygen.exe would be usefull for generating default keygens
  • now try starting Xming on Windows machine
    try running this code:
    "c:\Program Files\Xming\xming" :1 -multiwindow -clipboard -emulate3buttons  -silent-dup-error -clipupdates 5 -ac
    of course, save it as some .bat file for future use.
    Also notice, that for 64bit windows, you need to change path
    "c:\Program Files\Xming\xming"
    to the more 64bit like:
    "C:\Program Files (x86)\Xming\xming"
    as this is default for win32 applications installed on win64...

    After running Xming, the big X icon should be visible in your windows tray.
    The most important part is the :1, as this determines index of X-display to emulate. You will pass this number later to runned software on linux machine. If you need more than one linux machine displaying on your windows, just run many X-Mings with this number different for each of it. Like this:
    "c:\Program Files\Xming\xming" :1 -multiwindow -clipboard -emulate3buttons  -silent-dup-error -clipupdates 5 -ac
    "c:\Program Files\Xming\xming" :2 -multiwindow -clipboard -emulate3buttons  -silent-dup-error -clipupdates 5 -ac
    "c:\Program Files\Xming\xming" :3 -multiwindow -clipboard -emulate3buttons  -silent-dup-error -clipupdates 5 -ac

  • start some software on your linux machine, redirecting its display to your windows machine
    code to run is:
    ssh root@ "xterm -display < /dev/null >& /dev/null &"
    • root is your user name on linux machine
    • ip address to your linux machine
    • xterm the software to be run on linux machine
    • the ip of windows machine. The started application will connect to this addres, looking for X-Server (in your case, the X-Ming).
    • 1 the number after : is the number matching the X-display you opened before on X-Ming.
    After running this code, you will pass the password, and DONE. The xterm window should be opened on your windows machine.

  • if still not running
    Something was wrong. Check that:
    • Xming is running - the big X should be visible in your windows tray.
    • ssh login is ok - run some command line (windows -> start -> cmd) on windows machine, and try to call ssh directly to login to linux machine into text console:
      ssh root@

    • all IP's provided are ok
    • ssh is visible for command line. Just open command line (windows -> start -> cmd) and run
      if it fails (some error like "unrecognized command"), then check if ssh.exe is present in your cygwin installation (typically C:\cygwin\bin).
      If it's not present - run Cygwin setup again and install ssh.
      If it is present, but still not visible, check the PATH system variable. Simply enter (in command line)
      end look what paths are listed. If it's not there - add
      to PATH environment settings (normally My Computer -> Properties -> Environment Variables).

  • if running ok
    some other common runs I use frequently...
    The Konsole from KDE:
    ssh root@ "konsole -display < /dev/null >& /dev/null &"
    ssh root@ "kdevelop -display < /dev/null >& /dev/null &"

  • Advanced: auto-authenticated login to Linux machine
    • generete keys for non-password logon on windows machine
      ssh-keygen.exe -t rsa
      remember where the keys are stored (the path after "Enter file in which to save the key"), or just enter your own path

    • enter nothing (just hit "enter") when asked for password (will ask twice).
    • copy generated key (from the path where keys were stored, the file is usually called and is stored in your "\user\.ssh" directory).
      The key is stored as just a single line of text.
    • on linux machine:
      add your public key to ~/.ssh/authorized_keys as a single line of text.
      if the file "authorized_keys" doesn't exist, just create it.

  • some related materials:
    man to ssh:
    if you know polish language, read that:

How to disable .bash_history

in ~/.bashrc
add line:

allow login to Gnome as root

Login as root to Linux graphic environment is generally not recommended. That's why Gnome and KDE in most distros have root login disabled.
To allow login to Gnome as root:
add to file /etc/gdm/custom-conf

Windows 7 or Windows Vista installation

changing user logon policy (works on 7 and Vista)

  • click windows
  • enter
  • run
    control userpasswords2

disable UAC

control panel -> User Account and Family -> Change security settings
in windows PL:
panel sterowania -> konta uzytkownikow -> wlacz lub wylacz kontrola konta uzytkownika

turn off the hibernation

This kills the big hibernation file (hiberfill.sys).
powercfg -h off
Notice, this may need administrator privileges (try opening command prompt as administrator).

open command prompt as administrator on windows 7

There are many ways, which give same result:
1. open the Start Menu, type "cmd", then press CTRL+SHIFT+ENTER.
2. open the Start Menu -> All Programs -> Accesories, then RIGHT CLICK on Command prompt, and click on RUN AS ADMINISTRATOR.
3. open the Start Menu, type "cmd", then RIGHT CLICK on cmd in "found" pane, and click on RUN AS ADMINISTRATOR.

turn off the explorer view settings storage per folder

Samba authentication problems

enter regedit, edit the key:
change the value "3" to value "1".
Meanings of that value can be found here:
Also for reference:
0 – Clients use LM and NTLM authentication, but they never use NTLMv2 session security. Domain controllers accept LM, NTLM, and NTLMv2 authentication.
1 – Clients use LM and NTLM authentication, and they use NTLMv2 session security if the server supports it. Domain controllers accept LM, NTLM, and NTLMv2 authentication.
2 – Clients use only NTLM authentication, and they use NTLMv2 session security if the server supports it. Domain controller accepts LM, NTLM, and NTLMv2 authentication.
3 – Clients use only NTLMv2 authentication, and they use NTLMv2 session security if the server supports it. Domain controllers accept LM, NTLM, and NTLMv2 authentication.
4 – Clients use only NTLMv2 authentication, and they use NTLMv2 session security if the server supports it. Domain controller refuses LM authentication responses, but it accepts NTLM and NTLMv2.
5 – Clients use only NTLMv2 authentication, and they use NTLMv2 session security if the server supports it. Domain controller refuses LM and NTLM authentication responses, but it accepts NTLMv2.

Samba performance problems

Try this if you experience low bandwidth or long seek times during transfers to/from Samba server.
This happens mostly due to multi-media related transfers - e.g. when jumping to different part of a movie or mp3.
  • the key
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\NetworkThrottlingIndex
    may not exist. Even if it exists - it probably has the value == 10.
    Try setting this key to ffffffff (the type of key should be DWORD).
    Then restart the service ""Multimedia Class Scheduler Service" (polish: "Harmonogram klas multimediów").
  • Try disabling some dependencies of "Windows Audio":
    delete MMCSS from DependOnService
    and restart your computer.
    Now disable the service MMCSS - that's all !

network problems related to MTU

To check what MTU is not going out through your network gateways, run:
ping -f -l 1432
where 1432 is a size of a packet, and is a server you got the problems with.
Try starting from a packet size of 1500, then decrease it by steps of 8 (1492, 1484, 1476 and so on) to probe for a best value.
You should go down to the number, that makes you pass the ping packets without problems (e.g. 1432).
Then use this value in following commands:
netsh interface ipv4 show subinterfaces
Find the name for your connection (e.g. "local connection") and use the following formula:
netsh interface ipv4 set subinterface "THE CONNECTION NAME" mtu=1432 store=persistent

Synergy in KDE setup

in /etc/kde4/kdm/Xsetup:
/usr/bin/killall synergyc
in /etc/kde4/kdm/Xstartup, before the code of:
/sbin/initctl -q emit desktop-session-start DISPLAY_MANAGER=kdm USER=$USER
/usr/bin/killall synergyc
sleep 1

Windows 8

Networks shares - disable default admin shares - $C, $D, $E

To disable automatic admin shares of known as $C, $D, $E, $F, ...
Add the registry key. Path is:
Add the DWORD (32-bit) key called AutoShareWKS with value 0
Then reboot the system (yes, reboot is needed for that).
JavaScript failed !
So this is static version of this website.
This website works a lot better in JavaScript enabled browser.
Please enable JavaScript.