Finally! Oracle SQL Developer working on HiDPI linux
technology ·Not my usual subject on this blog, but I'm just SO EXCITED! For the last year or more I've been relying on a nasty hack to make SQL Developer bearable on a linux HiDPI display. With a few simple updates, I can now get something genuinely usable!!
I'm using Ubuntu Artful (17.10), and all it took was:
- Install the JDK for Oracle Java 9 (this page did the trick nicely)
- Download a recent release of Oracle SQL Developer (mine is 17.3 from the main download page)
- Unzip it somewhere sensible (eg ~/software)
- Go into the root directory and run (and here comes the magic, all in one line):
env GDK_SCALE=2 _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true' ./sqldeveloper.sh
It seems you can safely ignore the warning about java versions; everything seems to be working fine.
Ok, the icons are pixel-doubled, but that's no worse than on any other platform. The fonts all look anti-aliased and attractive. All the dialog boxes are well-sized, though, and it all seems to work fine!
If you want to be able to run it with a click, just:
- Create a desktop file called sqldeveloper.desktop in ~/.local/share/applications, containing the following:
[Desktop Entry]
MimeType=application/sql
Version=1.0
Name=SQL Developer
Comment=Oracle SQL Developer
Icon=[install dir]/sqldeveloper/sqldeveloper/doc/icon.png
Exec=env GDK_SCALE=2 _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true' [install dir]/sqldeveloper/sqldeveloper/bin/sqldeveloper
Terminal=false
Type=Application
Categories=Development; - Make that file executable
This should be picked up immediately, and available in the normal way. If not, you'll need to check some logs eg with journalctl to see what's going on.
Also, note that the [install dir] is the parent directory containing the sqldeveloper directory, which in my case is ~/software, spelled out in full. The icon and executable are more nested than you might expect.
I hope this saves somebody else the pain I've been building up!