Close the VM.
Edit the .vmx file and add this config:
1 | mouse.vusb.enable = "TRUE" |
Save the .vmx file.
Start the VM and you can see that you can use the mouse side buttons to move forward and backward on the web page.
Close the VM.
Edit the .vmx file and add this config:
1 | mouse.vusb.enable = "TRUE" |
Save the .vmx file.
Start the VM and you can see that you can use the mouse side buttons to move forward and backward on the web page.
Widgets are a new feature introduced by Microsoft in Windows 11.
Currently, the news and interest modules that are enabled by default in widgets provide various kinds of information.
1 | winget uninstall MicrosoftWindows.Client.WebExperience_cw5n1h2txyewy |
For each new Windows 11 computer, I strongly recommand this command to improve the performance a lot.
Today I wanted to practice on Leetcode, and then I opened https://github.com/phodal/2md to save the problem to local.
Because I found that there were some small problems with this tool, I forked a copy and fixed some errors that it would generate when converting the content of the leetcode problem.
In this way, copy the problem of leetcode and paste it into my 2md, and then copy the converted markdown to save it locally.
Repo: https://github.com/immortalt/2md
The displayed format is correct, and the effect is much better.
The online address of my 2md: https://immortal-blog.github.io/tomd/
Sometimes the shared folder function of VMware Workstation may suddenly not work after rebooting.
There are several ways to fix it.
1 | sudo vmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs,allow_other -o nonempty |
This command means to mount all host shared folders to /mnt/hgfs
, which is the default operation that VMware should have done automatically.
However, the folder would disappear after rebooting.
1 | sudo nano /etc/fstab |
We can edit the fstab
file to write the auto-mount configuration. Just add one line:
1 | .host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other,defaults 0 0 |
Sample: they should be different, but due to the float format, they become the same.
1 | a = (1 - 500000000) / (1 - 499999999) |
In this situation, we can just simply use Decimal.
1 | from decimal import Decimal |
Currently (2022-05-16), we cannot install and run VMWare Workstation 16.2.3 on Ubuntu Desktop 22.04 LTS.
You can installed it and see the icon, but when you try to open it, it would ask you to install some modules and would fail.
Here is a script that are verified by me that can solve the problem.
1 | git clone https://github.com/mkubecek/vmware-host-modules |
Then you may need to reboot the host system to make VM networks working.
Although Ubuntu 22.04 is a LTS version, it is not stable and compatible enough to deal with daily works currently. My advice is to use Ubuntu 20.04.
It’s an interesting feature in fonts like JetBrains Mono.
I think VSCode or Word disables this feature by default, and we need to change font options to enable this feature.
Open “Menu”-“Setting”, open “setting.json”, and change this option:
1 | "editor.fontLigatures": true |
The most straightforward way is that you can decide on an encryption key in reality and use symmetric encryption such as AES-256 to encrypt and decrypt all messages.
But it’s not convenient to exchange the key online. Because if you send the key using an unsafe channel that is being monitored, the attacker can also get the key and decrypt all your messages. The attacker can directly use passive attack (read-only, without any modification) to monitor the messages.
One way is to use asymmetric encryption communication.
The mechanism of asymmetric encryption can be that A and B each generate a set of public keys and private keys and then use the other one’s public key to encrypt the content and send it, and the other one can decrypt it with its private key after receiving it.
Therefore, even if the attacker gets A and B’s public keys, he cannot decrypt the messages because he needs to know the private key.
But it’s still not perfect.
MITM means man-in-the-middle attack. Suppose you generate a public key and a private key for two clients, A and B, and then exchange the public keys of the two through a server C, and the server C is not secure. It is useless to monitor the public keys because only obtaining the public key cannot decrypt messages with the private key, so it cannot be monitored. But suppose B’s public key is replaced by C, and A uses this replaced public key C to encrypt messages. In that case, server C decrypts it with C’s private key, encrypts it with B’s public key, and B decrypts it with its private key. A and B have no sense, and C succeeds in a man-in-the-middle attack. Even if a secure key exchange technology such as the D-H key exchange method is used, the key exchange process can still be relayed by server C as a middleman.
The attacker cannot directly use passive attack to monitor the messages in asymmetric encryption communication. The attacker needs to manipulate and change the communication flow.
Sometimes we may find that a program is occupying a port, and we cannot use this port.
We can use two commands to solve this problem.
1 | netstat -anp | grep 4000 |
Here we can find the pid 81970 before the program name.
1 | kill -9 81970 |
If the permissions are not enough, add sudo before the command.