My goal with this topic is to investigate the current startup behavior, define a more consistent startup logic, and ultimately rework the UI to reflect this logic. For the most recent ideas, see post #205506.
----
After the 1.8.2: Browser startup directory bug fix, I have noticed that there is a setting that overrides the Browser startup directory:
"Settings > General > Save session on program exit = Always"
This is redundant because you can already restore the Browser via:
"Settings > General > Startup > Start without file > Open browser > Directory > Last"
A way to solve this it's to change the behavior of "Save session on program exit" so that it only restores files opened in tabs.
Anyway, given the current behavior I think that "Save session on program exit" could be moved to "Settings > General > Startup".
I have tried to rework the startup settings:
Note that when the "Restore Browser directory" is checked the "Browser startup directory" should turn grey/disabled.
Startup behavior
Moderators: helmut, XnTriq, xnview
-
- Posts: 38
- Joined: Sat Aug 09, 2014 9:27 pm
Startup behavior
You do not have the required permissions to view the files attached to this post.
Last edited by karnak on Wed Apr 09, 2025 5:25 pm, edited 8 times in total.
-
- Posts: 38
- Joined: Sat Aug 09, 2014 9:27 pm
Re: 1.8.2: Browser startup directory
You do not have the required permissions to view the files attached to this post.
-
- XnThusiast
- Posts: 2292
- Joined: Sat May 09, 2015 9:37 am
Re: 1.8.2: Browser startup directory
splitting '.. - Fullscreen' into checkbox (in open w/ file group) looks fine
the rest of the proposed changes do not make things as clear as 2 existing groups, also:
- Browser checkbox cannot be removed as app can start w/o Browser tab (<Empty> tab will be opened)
- "Save session.." combobox cannot be replaced with single checkbox
the rest of the proposed changes do not make things as clear as 2 existing groups, also:
- Browser checkbox cannot be removed as app can start w/o Browser tab (<Empty> tab will be opened)
- "Save session.." combobox cannot be replaced with single checkbox
-
- Posts: 38
- Joined: Sat Aug 09, 2014 9:27 pm
Re: 1.8.2: Browser startup directory
Thank you for the reply user0.
I see. Do you know if the <Empty> tab has a purpose? Can you do something with it?user0 wrote: Thu Mar 27, 2025 6:10 pm Browser checkbox cannot be removed as app can start w/o Browser tab (<Empty> tab will be opened)
I see what you mean. I unintentionally removed the "Ask" option.user0 wrote: Thu Mar 27, 2025 6:10 pm "Save session.." combobox cannot be replaced with single checkbox
-
- Posts: 38
- Joined: Sat Aug 09, 2014 9:27 pm
Re: 1.8.2: Browser startup directory
I have tried to rework the startup settings some more:
You do not have the required permissions to view the files attached to this post.
-
- Posts: 38
- Joined: Sat Aug 09, 2014 9:27 pm
Re: 1.8.2: Browser startup directory
The rework covers the following use-cases:
You start-with-file and as result you want:
You start-with-file and as result you want:
- 1 tab @ file
- 1 tab @ file + previous tabs (currently not possible in XnView)
- 1 tab @ file + previous tabs + Browser @ empty directory (currently not possible in XnView)
- 1 tab @ file + previous tabs + Browser @ custom directory (currently not possible in XnView)
- 1 tab @ file + previous tabs + Browser @ previous directory
- 1 tab @ file + Browser @ empty directory
- 1 tab @ file + Browser @ custom directory
- 1 tab @ file + Browser @ previous directory
- Browser @ file
- Browser @ file + previous tabs
- Empty Tab
- previous tabs (currently not possible in XnView)
- previous tabs + Browser @ empty directory (currently not possible in XnView)
- previous tabs + Browser @ custom directory (currently not possible in XnView)
- previous tabs + Browser @ previous directory
- Browser @ empty directory
- Browser @ custom directory
- Browser @ previous directory
-
- XnThusiast
- Posts: 2292
- Joined: Sat May 09, 2015 9:37 am
Re: 1.8.2: Browser startup directory
there shall be some tab to show menu
when started w file, the saved tab(s) should be restored in the unchanged state,karnak wrote: Mon Mar 31, 2025 3:23 pm You start-with-file and as result you want:
- 1 tab @ file
- 1 tab @ file + previous tabs (currently not possible in XnView) it works for me
- 1 tab @ file + previous tabs + Browser @ empty directory (currently not possible in XnView) works via "Purge 'Recent files and folders' on exit"
- 1 tab @ file + previous tabs + Browser @ custom directory (currently not possible in XnView) not required
- 1 tab @ file + previous tabs + Browser @ previous directory
- 1 tab @ file + Browser @ empty directory
- 1 tab @ file + Browser @ custom directory not required
- 1 tab @ file + Browser @ previous directory
- Browser @ file
- Browser @ file + previous tabs
so some options are not required
1.8.7 - browser - session - startup without file - Open browser setting ignoredkarnak wrote: Mon Mar 31, 2025 3:23 pm You start-without-file and as result you want:
- Empty Tab
- previous tabs (currently not possible in XnView) it works for me
- previous tabs + Browser @ empty directory (currently not possible in XnView) see issue below
- previous tabs + Browser @ custom directory (currently not possible in XnView) see issue below
- previous tabs + Browser @ previous directory
- Browser @ empty directory
- Browser @ custom directory
- Browser @ previous directory
actually, it looks ok to:karnak wrote: Mon Mar 31, 2025 3:23 pm key part of the suggestion is changing the behavior of "Save session on program exit" to "Restore previous tabs".
- move it Startup tab
- reworking it to checkbox, w/o asking dialog I doubt asking is required here, if user need sessions - go to settings and enable it, like in web browsers
- rename to 'Open tabs from previous session' as files will be reopened, not restored (eg from cache)
something like:
You do not have the required permissions to view the files attached to this post.
-
- Posts: 38
- Joined: Sat Aug 09, 2014 9:27 pm
1.8.2: Browser startup directory
If your previous session had Browser and tabs, "Save session on program exit" will restore both, which means you can't have only the previous tabs restored at startup. Please explain how you were able to make these two use-cases work.user0 wrote: Tue Apr 01, 2025 10:29 am You start-with-file and as result you want:You start-without-file and as result you want:
- 1 tab @ file + previous tabs (currently not possible in XnView) it works for me
- previous tabs (currently not possible in XnView) it works for me
Interesting, I'll test this option. I wonder how many other options can modify the startup behavior.user0 wrote: Tue Apr 01, 2025 10:29 am You start-with-file and as result you want:
- 1 tab @ file + previous tabs + Browser @ empty directory (currently not possible in XnView) works via "Purge 'Recent files and folders' on exit"
Why not?user0 wrote: Tue Apr 01, 2025 10:29 am You start-with-file and as result you want:
- 1 tab @ file + previous tabs + Browser @ custom directory (currently not possible in XnView) not required
- 1 tab @ file + Browser @ custom directory not required
Let's say for the next month I have to work on a project for which it will be important to look at reference images. In this instance, I think it would be useful for XnView to always start with the Browser at the root of the project and always restore the previous tabs.
The only comment that comes to mind after taking a quick look is: Multiple Browser tabs? Really?user0 wrote: Tue Apr 01, 2025 10:29 am You start-without-file and as result you want:1.8.7 - browser - session - startup without file - Open browser setting ignored
- previous tabs + Browser @ empty directory (currently not possible in XnView) see issue below
- previous tabs + Browser @ custom directory (currently not possible in XnView) see issue below
I'll read the issue more carefully later.
Is it ok to remove the "Ask" option? I think the "Ask" option is intended to be both a safeguard and a way for new user to discover the save session feature the first time they exit with multiple tabs open, since "Save session on program exit = Ask" is the default.user0 wrote: Tue Apr 01, 2025 10:29 am - reworking it to checkbox, w/o asking dialog I doubt asking is required here, if user need sessions - go to settings and enable it, like in web browsers
-
- Posts: 38
- Joined: Sat Aug 09, 2014 9:27 pm
1.8.7 - startup behavior
I did some testing on startup behaviors (XnView MP v1.8.7).
Premises
Since the startup settings are not very clear, I have used the following rules to determine what is correct behavior:
Case 1
Settings:
Action:
Start XnView (without file).
Results:
Settings:
Action:
Start XnView (without file).
Results:
Settings:
Action:
Start XnView (without file).
Results:
Settings:
Action:
Start XnView (without file).
Results:
Settings:
Action:
Start XnView with file.
Expected behavior:
After completing the startup procedure (as described in cases 1 to 4), the program opens the image in a new tab.
Case 6
Settings:
Action:
Start XnView with file.
Expected behavior:
After completing the startup procedure (as described in cases 1 to 4), the program opens the image in the browser.
Additional suggestion
In addition to the testing, I reworked the "Startup" settings to be more clear and in line with the behaviors I described above.
Key changes:
Premises
Since the startup settings are not very clear, I have used the following rules to determine what is correct behavior:
- "Save session on program exit" means "at startup, open (Viewer) tabs that were open in previous session"
- "Open browser = true" means "always open the browser at startup, even when it was not open in previous session"
- "Open browser = false" means "never open the browser at startup, not even when it was open in previous session"
- "Directory: None" means "always use an empty string as browser path, even when the previous session had a different browser path"
- "Directory: Last" means " always use the browser path from the previous session"
- "Directory: Specified" means "always use the specified browser path, even when the previous session had a different browser path"
Case 1
Settings:
Action:
Start XnView (without file).
Results:
- When the previous session contained only browser:
At startup, the program opens the browser at "empty path", which is correct.
- When the previous session contained tabs and browser:
At startup, the program opens previous tabs and browser at the path stored in "PathBrowser" (xnview.ini), which is incorrect.
The expected behavior is opening previous tabs and browser at "empty path".
- When the previous session contained only tabs:
At startup, the program opens previous tabs and doesn't open the browser, which is incorrect.
The expected behavior is opening previous tabs and browser at "empty path".
Settings:
Action:
Start XnView (without file).
Results:
- When the previous session contained only browser:
At startup, the program opens the browser at the path stored in "PathBrowser" (xnview.ini), which is correct.
- When the previous session contained tabs and browser:
At startup, the program opens previous tabs and browser at the path stored in "PathBrowser" (xnview.ini), which is correct.
- When the previous session contained only tabs:
At startup, the program opens previous tabs and doesn't open the browser, which is incorrect.
The expected behavior is opening previous tabs and browser at the path stored in "PathBrowser" (xnview.ini).
Settings:
Action:
Start XnView (without file).
Results:
- When the previous session contained only browser:
At startup, the program opens the browser at the path stored in "customPath" (xnview.ini), which is correct.
- When the previous session contained tabs and browser:
At startup, the program opens previous tabs and browser at the path stored in "PathBrowser" (xnview.ini), which is incorrect.
The expected behavior is opening previous tabs and browser at the path stored in "customPath" (xnview.ini).
- When the previous session contained only tabs:
At startup, the program opens previous tabs and doesn't open the browser, which is incorrect.
The expected behavior is opening previous tabs and browser at the path stored in "customPath" (xnview.ini).
Settings:
Action:
Start XnView (without file).
Results:
- When the previous session contained only browser:
At startup, the program opens the "< Empty >" tab, which is correct.
- When the previous session contained tabs and browser:
At startup, the program opens previous tabs and browser at the path stored in "PathBrowser" (xnview.ini), which is incorrect.
The expected behavior is opening previous tabs.
- When the previous session contained only tabs:
At startup, the program opens previous tabs, which is correct.
Settings:
Action:
Start XnView with file.
Expected behavior:
After completing the startup procedure (as described in cases 1 to 4), the program opens the image in a new tab.
Case 6
Settings:
Action:
Start XnView with file.
Expected behavior:
After completing the startup procedure (as described in cases 1 to 4), the program opens the image in the browser.
Additional suggestion
In addition to the testing, I reworked the "Startup" settings to be more clear and in line with the behaviors I described above.
Key changes:
- "Open browser" changed from checkbox to drop-down.
- "Save session on program exit" moved from "General" to "Startup" and renamed to "Open previous tabs".
You do not have the required permissions to view the files attached to this post.
Last edited by karnak on Wed Apr 09, 2025 5:29 pm, edited 6 times in total.
-
- Posts: 38
- Joined: Sat Aug 09, 2014 9:27 pm
Re: 1.8.2: Browser startup directory
<post to delete>
Last edited by karnak on Wed Apr 09, 2025 5:01 pm, edited 1 time in total.
-
- XnThusiast
- Posts: 2292
- Joined: Sat May 09, 2015 9:37 am
Re: 1.8.7 - startup behavior
I understand session functionality a bit different (the way it works now
) - saved tabs should not be modified on open:

karnak wrote: Tue Apr 01, 2025 7:14 pm
- "Save session on program exit" means "at startup, open (Viewer) tabs that were open in previous session" - all tabs (Viewer and Browser)
- "Open browser = true" means "always open the browser at startup, even when it was not open in previous session" - OK
- "Open browser = false" means "never open the browser at startup, not even when it was open in previous session"
if there is saved Browser tab - open it
if there is no saved Browser tab - do not open new one- "Directory: None" means "always use an empty string as browser path, even when the previous session had a different browser path"
- "Directory: Last" means " always use the browser path from the previous session"
- "Directory: Specified" means "always use the specified browser path, even when the previous session had a different browser path"
'Directory' setting only applies to new Browser tab when:
- app starts w/o file AND
- Save session functionality is off
-
- XnThusiast
- Posts: 2292
- Joined: Sat May 09, 2015 9:37 am
Re: 1.8.2: Browser startup directory
'previous tabs' means Viewer and Browser tabs, not just Viewerkarnak wrote: Tue Apr 01, 2025 3:22 pmIf your previous session had Browser and tabs, "Save session on program exit" will restore both, which means you can't have only the previous tabs restored at startup. Please explain how you were able to make these two use-cases work.user0 wrote: Tue Apr 01, 2025 10:29 am You start-with-file and as result you want:You start-without-file and as result you want:
- 1 tab @ file + previous tabs (currently not possible in XnView) it works for me
- previous tabs (currently not possible in XnView) it works for me
so, if Browser tab exists in saved session, it will be restored as well (Directory setting ignored)
restoring tabs from saved session should not modify themkarnak wrote: Tue Apr 01, 2025 3:22 pmWhy not?user0 wrote: Tue Apr 01, 2025 10:29 am You start-with-file and as result you want:
- 1 tab @ file + previous tabs + Browser @ custom directory (currently not possible in XnView) not required
- 1 tab @ file + Browser @ custom directory not required
Let's say for the next month I have to work on a project for which it will be important to look at reference images. In this instance, I think it would be useful for XnView to always start with the Browser at the root of the project and always restore the previous tabs.
asking definitely increases feature discoverabilitykarnak wrote: Tue Apr 01, 2025 3:22 pmIs it ok to remove the "Ask" option? I think the "Ask" option is intended to be both a safeguard and a way for new user to discover the save session feature the first time they exit with multiple tabs open, since "Save session on program exit = Ask" is the default.user0 wrote: Tue Apr 01, 2025 10:29 am - reworking it to checkbox, w/o asking dialog I doubt asking is required here, if user need sessions - go to settings and enable it, like in web browsers
on the other hand, I doubt many people use sessions functionality.. but I could be wrong