Ubuntu ships within a built-in VNC server, which can be configured to enable promptless screen mirroring over VNC.
Run below script/commands on target Ubuntu system.
OpenGuru Weblog
Me and My Experiments..
Wednesday, July 29, 2020
Tuesday, July 28, 2020
How to rename Windows 10 user home folder
Steps to rename User name
Rename the user name in the Control Panel (Windows Menu → Settings → Accounts).Steps to rename the home folder under C:\Users
-
To rename the user's home folder, we first need to create a temporary Admin account in Windows 10.
To create a temporary local Admin user in Windows 10, follow below steps:
- Go to Windows Menu → Settings → Accounts → Family & Other users → Add someone else to this PC
-
Click on I don't have this person's sign-in information.
-
Select Add a user without a Microsoft account
-
You can leave the password field empty, as this is a temporary account
and we will delete this account at the end.
-
Once a new account is created, change the account type to Administrator
- Logout and Login as newly created user from login menu.
-
Open File Explorer, Go to
C:\Users\
and rename the folder underC:\Users\<old_username>
to the desired name. - After renaming the folder, now let us map the renamed folder with the user account.
-
Open regedit from Win + R
-
Traverse to
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
-
Traverse through the profile list and find the matching profile where key
ProfileImagePath
value contains the previous home folder path. Once found, update the value to match your new folder path.
Example:As shown in below image, I renamed fromC:\Users\Administrator
toC:\Users\supernova
-
Create a link from your previous home folder to new one via Command Prompt. This should help us with programs which have stored previous home folder path in their settings.
-
Delete the temp account created in Step 1.
Labels:
How To,
Windows
Links to this post
Monday, July 27, 2020
Installing and using Qt libraries with Conan
For some reason or the other, I always had Qt installed on my dev machine either by manually compiling it from sources or via apt-get. Recently I started using conan to install Qt libaries and qmake.
After installation however, I could not find an automated way of adding installed Qt binaries to my binary search path. Even after many searches online, I did not find any sample
To add Qt binaries installed by conan to your PATH, execute:
To remove them from the search path, execute:
By adding virtualrunenv as one of your code generators, you can easily bring/remove qt binaries to/from your search path.
Below is my
After installation however, I could not find an automated way of adding installed Qt binaries to my binary search path. Even after many searches online, I did not find any sample
conanfile.txt
anywhere showcasing the proper way to install Qt with conan. After going through conan documentation however, I found out that conan generator virtualrunenv
can be used to tackle this problem. virtualrunenv
generator can be used to add/remove directories installed by conan to your binary search path.
To add Qt binaries installed by conan to your PATH, execute:
source activate_run.sh
To remove them from the search path, execute:
source deactivate_run.sh
By adding virtualrunenv as one of your code generators, you can easily bring/remove qt binaries to/from your search path.
Below is my
conanfile.txt
which I use to install latest Qt 5.15.x via conan:
[requires] qt/[>=5.15.0 <5.16.0]@bincrafters/stable [generators] qmake virtualrunenv
Some of the disadvantages of using Conan to install Qt:
- Qt installed via conan does not include Qt designer and other binaries. It only includes qmake.
- Qt installation via Conan still requires few packages to be manually installed via APT.
More info:
Labels:
Conan,
Development,
Qt
Links to this post
Sunday, July 26, 2020
Windows Batch script to use Qt + Microsoft C++ Build Tools
I recently started using Qt Creator on Windows with Microsoft C++ build tools. During this process, I created below batch script to open a console window where I can give all Qt + nmake/jom commands.
Labels:
Qt,
Windows
Links to this post
Saturday, July 25, 2020
Script to download latest Qt-Creator nightly development installer
Here is a script I created to download latest Qt-Creator nightly build installer for Linux. However, it can be modified to download the installer Windows or Mac OS.
Replace
You can use above script to download latest stable release as well. Just change the URL to
.run
with .exe
for Windows, and with .dmg
to make it download installer for Mac OS.
You can use above script to download latest stable release as well. Just change the URL to
https://download.qt.io/official_releases/qtcreator/
to download
latest stable release.
Labels:
Qt
Links to this post
Thursday, July 23, 2020
How to uninstall Mac OS Xcode command-line tools
You can uninstall Xcode command-line tools by manually deleting the directory
You can delete this directory either from Finder App or by entering following command in Terminal App.
Above commands should also help you remove command-line tools from Mac OS auto update.
/Library/Developer/CommandLineTools
You can delete this directory either from Finder App or by entering following command in Terminal App.
sudo rm -rf /Library/Developer/CommandLineTools
Resetting the default command line tools:
Once you remove the directory, enter below command to reset the default command-line toolssudo xcode-select -r
Related:
Above commands should also help you remove command-line tools from Mac OS auto update.
Before:
After:
Labels:
Development
Links to this post
Wednesday, July 22, 2020
How to clear Qt online installer Account credentials
Now that Qt has stopped hosting offline installers, the only option left is to use Qt online installer.
Unfortunately Qt online installer automatically saves the account credentials without asking, and does not provide any option to avoid auto save. This could be particularly problematic if you are using Qt online installer on a public computer, and you don’t want to keep your account credentials lingering around.
Below are steps to delete Qt online installer account credentials
Qt stores the account credentials in a file named qtaccount.ini
You need to delete this file to remove Qt account credentials from the computer.
Note: You can enter below shortcut in Windows Run (
To delete the file in console, open
To delete this file from terminal, enter below code in terminal
To delete this file via Terminal, open terminal app and enter below code
Unfortunately Qt online installer automatically saves the account credentials without asking, and does not provide any option to avoid auto save. This could be particularly problematic if you are using Qt online installer on a public computer, and you don’t want to keep your account credentials lingering around.
Below are steps to delete Qt online installer account credentials
Qt stores the account credentials in a file named qtaccount.ini
You need to delete this file to remove Qt account credentials from the computer.
Windows:
qtaccount.ini
is stored at C:\Users\<User Name>\AppData\Roaming\Qt\
Note: You can enter below shortcut in Windows Run (
Win Key + R
) to open this directory with File Explorer.
%APPDATA%\Qt\
To delete the file in console, open
cmd.exe
from Windows menu and enter below command
del %APPDATA%\Qt\qtaccount.ini
Linux:
qtaccount.ini
is stored at /home/<User Name>/.local/share/Qt/
To delete this file from terminal, enter below code in terminal
rm /home/$USERNAME/.local/share/Qt/qtaccount.ini
Mac OS X:
Qt Account details are stored at/Users/<User Name>/Library/Application\ Support/Qt/
To delete this file via Terminal, open terminal app and enter below code
rm $HOME/Library/Application\ Support/Qt/qtaccount.ini
Related bug report:
Labels:
Linux,
Mac OS,
Qt,
Windows
Links to this post
Subscribe to:
Posts (Atom)