Saturday, July 8, 2023

SuperPuTTY and WinSCP

Software tools on Windows PC for routine work.

SuperPuTTY

Steps to install and set up SuperPutty

1. Install Putty. Version 0.76 is installed in a folder under C:\Program Files\PuTTY (vs. just one file putty.exe).
PuTTY stores setup data (saved sessions, SSH host keys) in the Registry. The location is
HKEY_CURRENT_USER\Software\SimonTatham\PuTTY

To configure PuTTY, such as log file location and font size (under Appearance), select and save them to "Default Settings".
 
2. Download SuperPuTTY from https://github.com/jimradford/superputty/releases (Release 1.5.0.0 is available in 2023).
3. Unzip the .zip file to a folder (e.g. c:\Putty\SuperPuTTY-1.5.0.0)
4. Create a shortcut on desktop pointing to file SuperPutty.exe

c:\Putty\SuperPuTTY-1.5.0.0>dir
 ... ...
01/29/2023  08:32 AM           44,464 License.rtf
01/29/2023  08:31 AM             1,129 License.txt
07/24/2022  11:40 PM          270,336 log4net.dll
01/29/2023  08:30 AM           20,623 ReleaseNotes.txt
05/29/2022  04:51 AM         804,352 Renci.SshNet.dll
01/29/2023  08:36 AM      1,090,560 SuperPutty.exe
01/29/2023  06:57 AM           10,378 SuperPutty.exe.config
01/29/2023  08:36 AM         794,112 SuperPutty.pdb
08/24/2023  06:54 PM    <DIR>        themes
08/27/2021  04:24 PM          244,736 WeifenLuo.WinFormsUI.Docking.dll
08/27/2021  04:24 PM            90,112 WeifenLuo.WinFormsUI.Docking.ThemeVS2005.dll

Initial setup info of SuperPutty is stored in file C:\Users\User_ID\SuperPuTTY.settings:
Tells where Putty is installed:
      <PuttyExe>C:\Program Files\Putty\putty.exe</PuttyExe>
Specifies a folder to hold server listing and session info:
      <SettingsFolder>c:\Putty\SuperPuTTY</SettingsFolder>
  
If needed, setup info can by changed by Tool -> Options.  File SuperPutty.exe.config holds configuration info.
 
To use the passwords on the command line or in a session, you must check the box 
"Allow plain text passwords on putty command line" in Tools -> Options -> Gui under security

You can disable the update check (Tools -> Options -> Advanced -> Uncheck Automatically check for updates) to avoid message in version 1.5.0.0:

Error during update check
There was an error while checking for updates. Please try again later.

Need to backup folder C:\Putty\SuperPuTTY from time to time (specially when a new server session is added to the list!). When a SuperPutty is installed on a new PC, you can restore the backup folder to the new PC. Then, point SuperPutty to this folder to transfer all connection info to the new PC. 

WinSCP 

On its login box, it has a Tools dropdown for Import/Restore Configuration and Export/Backup Configuration. 

I have WinSCP version 5.19.5 installed in C:\Program Files (x86)\WinSCP. Its configuration is stored in Windows registry HKEY_CURRENT_USER\SOFTWARE\Martin Prikryl\WinSCP 2

On my old laptop, I ran potable version 5.5.6 in a folder by unzipping file winscp556.zip. File WinSCP.ini in the folder has all configuration info. When a newer WinSCP version was installed on a new laptop, I copied the .ini file to the new computer and use Import to transfer the info to the newer version.

Exceed

Exceed is a tool for bringing X Window (e.g. GUI forms) from Linux/Unix session to your PC. It is owned by Open Text and is installed in folder C:\Program Files\Hummingbird\Connectivity. OpenText website says "In October 2006, OpenText™ acquired Hummingbird. Hummingbird’s enterprise software solutions, including Exceed, enabled the management of the life cycle of enterprise content."

Monday, July 3, 2023

Oracle SQL Developer and JDK

After Oracle SQL Developer was installed (without including JDK in the pack) on my new laptop, its first launch creates file C:\Users\user_ID\AppData\Roaming\sqldeveloper\product.conf, which specifies and saves the path of Java. In the first run, it brings up a popup box says "Please specify the path to the Java JDK home (e.g. ... ...)". The correct path has to be entered here for SQL Developer to fire up. On my laptop, after I click on OK to accept default path C:\Program Files (x86)\Java\jdk18, the popup box goes away. Then nothing shows up and it seems at a dead end.

During troubleshooting, I learned my laptop has two Java installation locations, which leads some confusion. The one in C:\Program Files\Java\jdk18 is a 64-bit that was requested and installed for being used by SQL Developer. SQL Developer installed is a 64-bit application and needs 64-bit Java. After I entered C:\Program Files\Java\jdk18 in the popup box, SQL Developer 21.4.3 worked and the Properties info can be viewed by Help -> About.

It the first launch, it asks if you want to import preference from previous version. I copied over folder C:\Users\user_ID\AppData\Roaming\SQL Developer\system20.4.1.407.0006 from my old laptop, and let import copy SQL Developer setups from old computer. It keeps all database connections (ID & password). This is exactly what I want.

SQL Developer connection info is saved in location C:\Users\user_ID\AppData\Roaming\SQL Developer\systemX.X.X.X.X\o.jdeveloper.db.connection\connections. It is a good practice to back it up from time to time.

-- How to fine JAVA HOME and Java info on Windows?

On the Windows machine, use "cmd" window. 

Microsoft Windows [Version 10.0.19044.3324]
(c) Microsoft Corporation. All rights reserved.

c:\> echo %JAVA_HOME%
C:\Program Files\Java\jdk18;C:\Program Files (x86)\Java\jdk18

It shows two Java installations. The one in C:\Program Files\Java\jdk18 is a 64-bit,

c:\>cd \Program Files\Java
c:\Program Files\Java>dir
 ... ...
08/14/2023  09:21 AM    <DIR>          jdk18
08/14/2023  09:12 AM    <DIR>          jre8

c:\Program Files\Java>cd jdk18
c:\Program Files\Java\jdk18>dir /A:D
... ...
08/14/2023  09:21 AM    <DIR>          bin
08/14/2023  09:21 AM    <DIR>          include
08/14/2023  09:21 AM    <DIR>          jre
08/14/2023  09:21 AM    <DIR>          legal
08/14/2023  09:21 AM    <DIR>          lib

c:\Program Files\Java\jdk18>cd bin
c:\Program Files\Java\jdk18\bin>java.exe -version
java version "1.8.0_281"
Java(TM) SE Runtime Environment (build 1.8.0_281-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.281-b09, mixed mode)

The JDK in C:\Program Files (x86)\Java\jdk18 is 32-bit.

c:\Program Files\Java\jdk18>cd \Program Files (x86)\Java\jdk18
c:\Program Files (x86)\Java\jdk18>cd bin
c:\Program Files (x86)\Java\jdk18\bin>java -version
java version "1.8.0_281"
Java(TM) SE Runtime Environment (build 1.8.0_281-b09)
Java HotSpot(TM) Client VM (build 25.281-b09, mixed mode)

-- How to find out the Windows is 64-bit or 32-bit?

Go to Start > Settings (a wheel icon) > System > About

System Type: 64-bit operating system, x64-based processor