adlr / croshwindow

Crosh Window opens a new Crosh window without any chrome so that Ctrl-N/T/etc work. Chrome OS only.
41 stars 19 forks source link

Have permissions changed for opening another extension? #1

Closed stsquad closed 10 years ago

stsquad commented 11 years ago

The recent ChromeOS update seems to have broken this launcher. Now I only get blank page instead of the shell.

adlr commented 10 years ago

I see this, too, on R31. Unfortunately, I don't know of a fix.

One annoying workaround seems to be to hit Ctrl-Shift-J while on a Secure Shell window. Then, in the JavaScript console, type the window.open command from the source of this App.

stsquad commented 10 years ago

Should I raise a bug with upstream for this?

wycats commented 10 years ago

:frowning:

adlr commented 10 years ago

If upstream means filing a Chromium bug, go for it!

GirlBossRush commented 10 years ago

I'm also seeing a blank window on startup. Is there a fix for this issue?

WayneD commented 10 years ago

For the moment I've copied the secure shell extension into the Downloads dir and modified the manifest to change the page that gets run at startup (app: launch: local_path) to be "html/crosh.html". I then loaded that tweaked extension dir as an unpacked extension in place of the normal secure shell extension. This gives me a chrome-less window for crosh (since I have the secure shell app set to open in a separate window). This does prevent the secure shell app from prompting for any ssh connections, but I always ssh from inside of crouton, so this doesn't bother me.

Aside: one of the secure shell's doc pages says that it is supposed to allow you to open a crosh window if you enter "crosh" for the hostname, but I couldn't get that to work.

GirlBossRush commented 10 years ago

Would you mind uploading your changes so I may see them?

GirlBossRush commented 10 years ago

Ah no worries. I was able to get this running fine. I had to remove the old Secure Shell. cp -r Extensions/pnhechapfaindjhompbnflcldabbghjo ~/ Modify the path, view extensions, enable developer mode, load unpacked extension.

Thanks.

davkg commented 10 years ago

Thanks Wanye and Eric, that worked for me. It looks like Secure Shell automatically saves the window size too, which is nice.

wycats commented 10 years ago

I uploaded the changes that work for me to https://github.com/wycats/croshwindow. Would be great if Google just shipped a windowed version of the shell with ChromeOS.

stsquad commented 10 years ago

So the work around is a clone of the SSH extension with a different set of launch parameters? I wonder if this breakage of launching other extensions is deliberate? There must be some linkage implied as the SSH extenstion talks about enhancing the normal terminal behaviour with a newer version of the emulator.

WayneD commented 10 years ago

Another possibility is to change the Secure Shell plugin to have a way to optionally start crosh again (their current destination check isn't usable). One simple way is to allow the user to enter "run" for the user and "crosh" for the hostname: http://opencoder.net/run-crosh.diff

Later today I'm going to try to improve that to work with an empty username (which will involve changing the form validation code).

Aside: Anyone happen to know how to change the titlebar in Secure Shell to be like Crosh Window? I miss my hard-status in the titlebar.

WayneD commented 10 years ago

One more thing: wycats' croshwindow plugin will still supersede the secure shell plugin due to it having the same key. If the key is removed then the privateTerminal permission will be refused, which seems to be required for it to function right.

adlr commented 10 years ago

If someone wants to draft a Chromium patch to open Crosh in a window by default, people may be open to that. Then this app would be unnecessary.

WayneD commented 10 years ago

I've posted the following to the chromium-hterm mailing list. If they adopt it (or something like it) then that will be an alternate means of making this extension unnecessary.

We need some way to run crosh in a non-chromed window, so I'd like to propose the following change:

http://opencoder.net/crosh.patch

This patch allows the user to enter "crosh" as the hostname w/o a username and have that indicate that a crosh shell should be run. I had originally coded it to match username == "run", but I think this alternate method will ensure that no valid username@host combinations are interfered with. My patch changes the validation code just in the case where hostname == "crosh" -- all other hostnames still require a non-empty username.

If someone wants to try it out, copy the secure shell extension (found in the ~/Extensions/pnhechapfaindjhompbnflcldabbghjo directory) to a directory outside of the extensions area, apply the patch's changes, and load it as an unpacked extension.

slacker525600 commented 10 years ago

How is it possible that nobody at google uses chromeos with this extension and wants to rapidly fix this?

WayneD commented 10 years ago

The Secure Shell app will have a tweaked manifest.json soon (it's currently changed in their dev version) to list the crosh.html page in the "web_accessible_resources", which makes it possible for the Crosh Window app to request that page as it used to. You can find the dev version here:

https://chrome.google.com/webstore/detail/secure-shell-dev/okddffdblfhhnmhodogpojmfkjmhinfp

That dev version also has a way to request a crosh shell via hostname ">crosh" (with any username), but I prefer the titlebar style I get using Crosh Window. If you want to use the dev version with Crosh Window, you'll need to change the extension hash in the window-open call of your own Crosh Window extension (load it unpacked). Perhaps the official extension should get an option to switch between the regular and dev versions?

adlr commented 10 years ago

A fix went into Secure Shell that fixed this.

jpivarski commented 6 years ago

To use that fix, you need to have Secure Shell installed in addition to Crosh Window, and then run Crosh Window. Installing Crosh Window alone (and uninstalling and reinstalling) doesn't do it.