
24

Reset trial Navicat 15, Navicat 16 on Linux
source link: https://gist.github.com/nakamuraos/717eb99b5e145ed11cd754ad3714b302
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Background Knowledge
Configuration structure
-
Navicat create a folder
~/.config/navicat
to storage configures/home/user/.config/navicat ├── Premium │ ├── preferences.json │ ├── preferences.json.lock │ ├── Profiles │ │ ├── Clouds │ │ └── vgroup.json │ └── ui_preferences.json ├── Common │ ├── connections.json │ ├── connections.json.lock │ └── ui_connections.json ├── Settings │ └── ... └── MySQL └── Profiles └── ...
-
Navicat use
dconf
in Linux to storage user config data- You can see a below
com/premiumsoft/navicat-premium
section:# nano ~/.config/dconf/user.conf ... [apps/light-locker] idle-hint=false late-locking=false lock-after-screensaver=uint32 5 lock-on-lid=false lock-on-suspend=true [com/premiumsoft/navicat-premium] 019C981BDC7F0FD22F2F2886AF209C85='84AA0BE73C5C83CF48CF06B475B05B9D' 0231EE5D1EF3A65D643D0D2DB15D3224='ABCD8AEC6CDC496375CC38A64AC1BE78' 023AECCA316B6E832F6D9664FC85369B='FE81DC33B14E9129F5BEA7F87BC6686B' 02771B3A8E4CA9456C24A43DF59C216F='625AE8702A2103E997B6394300A7FCE4' ... F9D5C7D0000DB83FB3100311BC54777C='034E5755BB39A9393272D9970B57074E' FC800E08E45E56E518CA9B2C7DE3FDBE='034E5755BB39A9393272D9970B57074E' FC800E08E45E56E518CA9B2C7DE3FDBE='034E5755BB39A9393272D9970B57074E' last-check-time=int64 1648194098 [org/blueman/general] window-properties=[558, 350, 555, 125] [org/blueman/network] nap-enable=false [org/blueman/plugins/powermanager] auto-power-on=@mb true ...
- Note: The above file was generated by the command:
To see how to usedconf dump / >~/.config/dconf/user.conf
dconf
command, rundconf -h
- You can see a below
Solution
- This simple solution is remove all keys in
com/premiumsoft/navicat-premium
dir (Thedconf
does call it isdir
, as virtual dir):# Check key list dconf list /com/premiumsoft/navicat-premium/ # The DIR must starting and ending with '/' dconf reset -f /com/premiumsoft/navicat-premium/ # Verify, empty is successful dconf list /com/premiumsoft/navicat-premium/
Summary
- The simple final bash script will be look like this:
#!/bin/bash # Backup cp ~/.config/dconf/user ~/.config/dconf/user.bk cp ~/.config/navicat/Premium/preferences.json ~/.config/navicat/Premium/preferences.json.bk # Clear data in dconf dconf reset -f /com/premiumsoft/navicat-premium/ # Remove data fields in config file sed -i -E 's/,?"([A-Z0-9]+)":\{([^\}]+)},?//g' ~/.config/navicat/Premium/preferences.json
Maintainer
- NakamuraOS <https://github.com/nakamuraos>
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK