Skip to content

Restore Last Window Tabs on Startup#3661

Merged
mtwebster merged 11 commits intolinuxmint:masterfrom
kavehtehrani:master
Mar 24, 2026
Merged

Restore Last Window Tabs on Startup#3661
mtwebster merged 11 commits intolinuxmint:masterfrom
kavehtehrani:master

Conversation

@kavehtehrani
Copy link
Copy Markdown
Contributor

Adds an optional feature to restore the tabs and split-view state of the last closed Nemo window when launching without explicit file arguments. This is similar to the 'session restore' feature in most modern web browsers.

Changes

  • New preference: "Restore last window tabs on startup" toggle in Preferences → Behaviour (default: off)
  • Session state storage: Saves tab URIs, active tab indices, and split-view state when a window is closed
  • Restore logic: On startup (when no file arguments provided), restores saved tabs if the preference is enabled
  • Fallback behavior: Falls back to opening Home directory if restore fails or preference is disabled

Implementation Details

  • Session state is saved to GSettings keys under org.nemo.window-state schema
  • Only native file system locations are saved (excludes search tabs and remote locations)
  • When multiple windows are open on quit, the state of the last non-desktop window is saved
  • Default startup behavior is unchanged (feature is opt-in)

@kavehtehrani
Copy link
Copy Markdown
Contributor Author

kavehtehrani commented Dec 22, 2025

I read through 3240 and 2832 and seems like this was previously requested and closed due to resource constraints and being a low priority request.

I have tested this on my machine on Fedora and Ubuntu and has been working fine without any issues. I love Nemo and this is the only major things for me that Nemo is lacking. Happy to make any feedback and make my favorite file manager even better.

@mtwebster mtwebster changed the title Restore Last Window Tabs on Startup [Next] Restore Last Window Tabs on Startup Dec 29, 2025
@clefebvre clefebvre changed the title [Next] Restore Last Window Tabs on Startup Restore Last Window Tabs on Startup Jan 22, 2026
Comment thread src/nemo-application.c
Comment thread src/nemo-application.c Outdated
@kavehtehrani
Copy link
Copy Markdown
Contributor Author

kavehtehrani commented Mar 2, 2026

@mtwebster you are correct on both accounts. It is the most recent window that comes back (https://docs.gtk.org/gtk3/method.Application.get_windows.html)

I had to move the "#include "nemo-desktop-window.h"" outside the conditional include, since the NEMO_IS_DESKTOP_WINDOW is included in that header file and it was a conditional include. Hope I did this right.

@mtwebster mtwebster merged commit 66d4299 into linuxmint:master Mar 24, 2026
3 checks passed
@kavehtehrani
Copy link
Copy Markdown
Contributor Author

🥳

KonTy pushed a commit to smpl-os/nemo-smpl that referenced this pull request Mar 25, 2026
* Restore last closed window tabs

Save split view and tab URIs on window close and restore them when starting Nemo with no explicit locations.

* adding tabs

* adding tabs

* adding tabs

* adding tabs

* adding tabs

* adding tabs

* adding tabs

* option under 'behaviour' in preferences to toggle on restoring tabs

* simplified sessions save logic to only save the window that exits

* addressing pr comments regarding last window logic
@lothominor54712
Copy link
Copy Markdown

I don't know much about this platform GitHub, does the purple "Merged" means this feature was accepted and will come? Does it have any predicted date for it to appear and in which Nemo version?

I'm new on Linux. As of 25/04/2026, my current Nemo version is 6.6.3+zena 500 on Linux Mint (Cinnamon).

I installed Double Commander and Dolphin over this, but i'm not satisfied with them. DB's UI looks odd and old and Dolphin's tabs work differently than both DB and Nemo. If Nemo gets Persistent Tabs, that'd be awesome and all i need

@kavehtehrani
Copy link
Copy Markdown
Contributor Author

kavehtehrani commented Apr 27, 2026

@lothominor54712 welcome to linux! Nemo will get persistent tabs but looking at the current release it does not have my pull request included. You can however compile the code on your computer and have it currently with tabs already if you don't want to wait for them to make a release.

Since you said you're new, I suspect you might not know how to compile it yourself. I can walk you through it if you don't want to wait for the official release.

@lothominor54712
Copy link
Copy Markdown

@lothominor54712 welcome to linux! Nemo will get persistent tabs but looking at the current release it does not have my pull request included. You can however compile the code on your computer and have it currently with tabs already if you don't want to wait for them to make a release.

Since you said you're new, I suspect you might not know how to compile it yourself. I can walk you through it if you don't want to wait for the official release.

That's so generous, not many people would bother going that far. But i'm good! Tysm

I've managed to do it with some outside help guiding me through it. I followed these steps: https://justpaste.me/HMCy
And then went into Edit>Preferences>Behavior and the option was there.

Above everything, thank you for the project itself. Really appreciate all of this
I guess all of this is part of the magic of open source stuff. I'm glad i decided to spend time to try Linux out. No regrets

@kavehtehrani
Copy link
Copy Markdown
Contributor Author

you've built it from scratch on linux mint! well done! and yes, you'll find that linux thrives on community contributions and open source projects. without foss, i wouldn't have been able to make this small contribution to my favorite file manager that others have found useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants