New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace doesn't restores itself on re-opening Code in Ubuntu 17.10 GNOME #36695

Closed
ajitid opened this Issue Oct 22, 2017 · 9 comments

Comments

Projects
None yet
6 participants
@ajitid
Contributor

ajitid commented Oct 22, 2017

Ubuntu 17.10 also provides older Unity interface, in which workspace gets restored on re-opening VS Code, but it doesn't happens in new GNOME UI unless a file modified isn't saved.

@vscodebot vscodebot bot added the workbench label Oct 22, 2017

@ilyahoilik

This comment has been minimized.

Show comment
Hide comment
@ilyahoilik

ilyahoilik Oct 22, 2017

I can reproduce this as well

ilyahoilik commented Oct 22, 2017

I can reproduce this as well

@isidorn isidorn assigned bpasero and unassigned isidorn Oct 23, 2017

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Oct 24, 2017

Member

I can reproduce but only when I launch VS Code from the task bar, not when running from the command line. All state (local storage) seems to be there, just not the window state (which folder was opened before).

@Tyriar do you have any clue what could go on here?

Member

bpasero commented Oct 24, 2017

I can reproduce but only when I launch VS Code from the task bar, not when running from the command line. All state (local storage) seems to be there, just not the window state (which folder was opened before).

@Tyriar do you have any clue what could go on here?

@bpasero bpasero added this to the October 2017 milestone Oct 24, 2017

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Oct 24, 2017

Member

@Tyriar my first guess would be that clicking the icon in the dock puts the "-n" argument to the process and that is why we always open up empty.

Member

bpasero commented Oct 24, 2017

@Tyriar my first guess would be that clicking the icon in the dock puts the "-n" argument to the process and that is why we always open up empty.

@nunesvictor

This comment has been minimized.

Show comment
Hide comment
@nunesvictor

nunesvictor Oct 24, 2017

@bpasero I had the same problem.

Looking into the code.desktop file I notice this:

[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/share/code/code --unity-launch %F
Icon=code
Type=Application
StartupNotify=true
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;
Actions=new-window;
Keywords=vscode;

X-Desktop-File-Install-Version=0.23

[Desktop Action new-window]
Name=New Window
Name[de]=Neues Fenster
Name[es]=Nueva ventana
Name[fr]=Nouvelle fenêtre
Name[it]=Nuova finestra
Name[ja]=新規ウインドウ
Name[ko]=새 창
Name[pt_BR]=Nova Janela
Name[ru]=Новое окно
Name[zh_CN]=新建窗口
Name[zh_TW]=開新視窗
Exec=/usr/share/code/code --new-window %F
Icon=code

The action 'new-window' is beeing triggered every time I click on the dock icon, when it supposed to behave like that only when the action is clicked. I figure if I remove the '--new-window' attribute from the Exec it will restore the workspace normally.

Maybe is a gnome dock issue or just an error on the desktop file syntax.

Hope I helped!

nunesvictor commented Oct 24, 2017

@bpasero I had the same problem.

Looking into the code.desktop file I notice this:

[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/share/code/code --unity-launch %F
Icon=code
Type=Application
StartupNotify=true
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;
Actions=new-window;
Keywords=vscode;

X-Desktop-File-Install-Version=0.23

[Desktop Action new-window]
Name=New Window
Name[de]=Neues Fenster
Name[es]=Nueva ventana
Name[fr]=Nouvelle fenêtre
Name[it]=Nuova finestra
Name[ja]=新規ウインドウ
Name[ko]=새 창
Name[pt_BR]=Nova Janela
Name[ru]=Новое окно
Name[zh_CN]=新建窗口
Name[zh_TW]=開新視窗
Exec=/usr/share/code/code --new-window %F
Icon=code

The action 'new-window' is beeing triggered every time I click on the dock icon, when it supposed to behave like that only when the action is clicked. I figure if I remove the '--new-window' attribute from the Exec it will restore the workspace normally.

Maybe is a gnome dock issue or just an error on the desktop file syntax.

Hope I helped!

@bpasero bpasero removed their assignment Oct 25, 2017

@Tyriar

This comment has been minimized.

Show comment
Hide comment
@Tyriar

Tyriar Oct 25, 2017

Member

I'll check this out now

Member

Tyriar commented Oct 25, 2017

I'll check this out now

@Tyriar

This comment has been minimized.

Show comment
Hide comment
@Tyriar

Tyriar Oct 25, 2017

Member

What appears to be happening is that "New Window" is now the default action for all applications in the new Gnome desktop manager. Since we had an additional action defined as "New Window", that is becoming the default due to the name.

Member

Tyriar commented Oct 25, 2017

What appears to be happening is that "New Window" is now the default action for all applications in the new Gnome desktop manager. Since we had an additional action defined as "New Window", that is becoming the default due to the name.

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Nov 1, 2017

Member

@Tyriar I am still seeing this after getting the insiders build updated, could this be a caching issue where I need to uninstall and reinstall?

Member

bpasero commented Nov 1, 2017

@Tyriar I am still seeing this after getting the insiders build updated, could this be a caching issue where I need to uninstall and reinstall?

@bpasero bpasero reopened this Nov 1, 2017

@Tyriar

This comment has been minimized.

Show comment
Hide comment
@Tyriar

Tyriar Nov 1, 2017

Member

@bpasero I was uninstalling and reinstalling the OSS build while testing the fix, there is a desktop-file-install command which is meant to refresh it but it didn't seem to work reliably on Gnome.

Member

Tyriar commented Nov 1, 2017

@bpasero I was uninstalling and reinstalling the OSS build while testing the fix, there is a desktop-file-install command which is meant to refresh it but it didn't seem to work reliably on Gnome.

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Nov 2, 2017

Member

I can no longer reproduce, maybe the restart fixed it.

Member

bpasero commented Nov 2, 2017

I can no longer reproduce, maybe the restart fixed it.

@bpasero bpasero closed this Nov 2, 2017

@bpasero bpasero added the verified label Nov 2, 2017

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 17, 2017

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