1

I am using Ubuntu and Windows together. Sometimes I need to use Windows, so I need to restart my computer, but since I am doing lots of things, I don't want them to be closed. For example I run VS Code in a desktop, I have some Chrome tabs and some Ros application on Terminal in another (virtual) desktop. When I close my computer, all of these are closed. When I restart it, it just opens empty.

I don't want the programs reopened, I want them stay in the same state. The VS code tabs must stay the same, the terminal must have the same texts on it, the virtual desktops must be the same again. This is kind of making computer sleep .

Is there a way to do this?

Sahin
  • 250

1 Answers1

1

That is depending on what you really want:

  1. If you want to save your session you should hibernate instead of restarting.

  2. If you want to restart you should add your program to startup application.

  3. You can also make a shell script to start your programs.

Mohamed Slama
  • 1,849
  • 1
  • 17
  • 37
  • I have to restart. since I need to use Windows sometimes. – Sahin Jan 02 '21 at 12:37
  • 1
    @Sahin should see Rinzwind here https://askubuntu.com/a/1056070/464430 – Mohamed Slama Jan 02 '21 at 12:44
  • Thanks, I will try it. Not a big deal by the way. If that doesn't work, I will try to find or make a shell script to save the last state and reload after restart. – Sahin Jan 02 '21 at 12:53
  • Be very careful about hibernate. Apparently if you do this you need to ensure that Windows is not first in the grub boot order. https://superuser.com/a/421040/342076 I might try running my desktops within VMs instead. – BobDoolittle Apr 13 '23 at 23:28