Autopsy not starting due to java error

Hi,

I have installed using this link on my siduction linux (debian sid type distribution): https://github.com/sleuthkit/autopsy/blob/develop/Running_Linux_OSX.md
So I have used the prerequisites script for linux, installed the sleuthkit-java.deb package, installed autopsy from the ZIP archive using the installer.sh file, included java-17 location etc.
All of these steps worked successfully with no errors. Now I wanted to start autopsy from within the /bin folder that was created on my /home/username/autopsy. I have to use su here because otherways the external usb harddisk drive was not found.

I cannot run autopsy though as I keep getting this error related to java:

root@pucki:/home/lw/autopsy/autopsy-4.21.0/bin# ./autopsy --nosplash
Detected KDE; adding awt.useSystemAAFontSettings=on
WARNING: Unknown module: javafx.base specified to --add-exports
WARNING: Unknown module: javafx.controls specified to --add-exports
WARNING: Unknown module: javafx.controls specified to --add-opens
Authorization required, but no authorization protocol specified

java.awt.AWTError: Can’t connect to X11 window server using ‘:0’ as the value of the DISPLAY variable.
at java.desktop/sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at java.desktop/sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:105)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at java.desktop/sun.awt.X11GraphicsEnvironment.initStatic(X11GraphicsEnvironment.java:64)
at java.desktop/sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:59)
at java.desktop/sun.awt.PlatformGraphicsInfo.createGE(PlatformGraphicsInfo.java:36)
at java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:91)
at java.desktop/java.awt.GraphicsEnvironment$LocalGE.(GraphicsEnvironment.java:82)
at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:104)
at org.netbeans.core.startup.Main.start(Main.java:245)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98)
at java.base/java.lang.Thread.run(Thread.java:840)

This error is not listed in the troubleshooting overview so I have no idea about what is wrong here.

I have written other postings related to issues with starting / using autopsy - everytime I run this program I get stuck with another error, warning etc and another issue I cannot resolve.

One main question I also still have is why would I need to use autopsy’s custom java version + sleuthkit java version instead the debian’s own apt-get version of java + sleuthkit non java installer (bz2 archive)?

Thanks for your support and many regards.

I have made some progress here…

java.awt.AWTError: Can’t connect to X11 window server using ‘:0’ as the value of the DISPLAY variable.

==> This error is caused by the wayland environment. Apperently root is not permitted to run xwayland to run java as it says somewhere on the related websites. This is strange, because for a limited time this actually worked.
As this behaviour appears to be intentional nevertheless it is needed to run autopsy as non-su / non-root user. So I have installed autofs because external HD drives could only be found running autopsy as su otherwise.

I have also updated java installation from 1.17 to 1.23 which was labelled latest released version for open java on their website. I have removed default-jre packages.

So, when looking at it, installing autopsy actually reduces to:

  • download sleuthkit.java.deb package and install using dpkg -i or apt-get
  • check java installation as described in the autopsy installation file so updated java dir is now used.
  • install autopsy using install script (not sure if it is required to install as root or install as ordinary user)

Currently I am struggling with autopsy crashing on larger hard drives (500GB) and having a win11 installation partition that currently cannot be analyzed by autopsy. Also keyword search never works and the tool windows open up in such a way it is not possible to drag them.

I did a script a few month ago there:GitHub - FabMasu/Autopsy-installation-for-Linux: Autopsy installation for Linux Mint style distros
It was writen for Linux Mint, but as long as it is an Ubuntu style Linux based on Debian, some commands could be interesting in your case, or not. Have an eye on it. Hope it will help.