Skip to content

Desktop shortcut for the GUI does not work: gui commandlet requires IDE_HOME #2279

Description

@quando632

Actual behavior

The desktop/start-menu shortcut created by #1917 is generated correctly, but clicking it never starts the GUI.

The shortcut runs ideasy.exe gui, and createWindowsShortcut does not set a WorkingDirectory. Windows therefore starts the process in the directory of the target executable («IDE_ROOT»\_ide\installation\bin), which is not inside an IDEasy project. Since Gui does not override isIdeHomeRequired(), it inherits the default true from Commandlet, so the commandlet aborts:

The gui commandlet requires an IDEasy project to work.
Please run "icd <project-name>" before calling "ide gui".

A desktop shortcut is by definition launched from outside any project, so in its current form it can never work.

Reproduce

  1. Install IDEasy from a release containing Allow the creation of a desktop shortcut for the GUI #1917 (ide install), so that the shortcut is created.
  2. Double-click the IDEasy shortcut on the desktop or in the start menu.
  3. The GUI does not appear.

Equivalent without a shortcut — run the same command from any directory outside a project:

cd C:\Users\«user»\Downloads
"C:\projects\_ide\installation\bin\ideasy.exe" gui

Verified with the working directory set both to a neutral folder and to «IDE_ROOT»\_ide\installation\bin (the directory Explorer uses when the shortcut has no WorkingDirectory). Both produce the error above. Running the identical command from within a project directory starts the GUI correctly.

Expected behavior

Double-clicking the shortcut starts the IDEasy GUI without requiring a preceding icd «project».

The GUI already supports this: ProjectManager reads the project list from IDE_ROOT and its class comment states this is intentional — "you might want to read the list of projects without being already in the project context". Project selection happens inside the GUI, so gui should require IDE_ROOT but not IDE_HOME.

IDEasy status

IDE_ROOT is set to C:\projects
Your version of IDEasy is 2026.07.002
Your operating system is windows(10.0)@x64 [Windows 11@amd64]

Note: the shortcut code is not part of release 2026.07.002 (tagged 2026-07-21); #1917 was merged on 2026-07-30. The behavior above was reproduced by invoking the gui commandlet directly, which is unchanged by #1917.

Related/Dependent issues

Sub-issue of #1917

Comments/Hints

Affects all platforms, not just Windows. The Linux .desktop entry uses Exec=«installation»/bin/ideasy gui with no Path= key, and the macOS IDEasy.command calls the binary without changing directory, so both hit the same guard.

Suggested fix: override isIdeHomeRequired() in Gui to return false while leaving isIdeRootRequired() at true.

The existing test coverage does not catch this — IdeasyCommandletTest.verifyDesktopShortcut only asserts on Windows that the two .lnk files exist, without checking target, arguments, or whether launching them succeeds.

Metadata

Metadata

Assignees

Labels

GUIGraphical User Interface of IDEasy (aka dashboard) build with JavaFxbugfixPR that fixes a bug issue

Type

Projects

Status
🏗 In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions