Var terminal = new hterm.Terminal(profileName) Īnd then you can do stuff with it. There's a file in the crosh extension at js/crosh.js that shows the basics of how it's done: This is probably harder, but a third way, which probably is the "right" way is to see how the crosh extension works and learn about opening the hterm.Terminal instance chrome.terminalprivate object directly, sending it output, and closing it in the same way crosh does it. If it worked, it might be a little simplier than via the SSH extension and you wouldn't have to run any extra daemons. ![]() Someone might even create a neat extension that allows crosh to use scripts/plugins to execute different system operations beyond the stock ones that are built-in via single-clicks. Just throwing it out as an idea that I'm pretty sure would work. A menu w/1 sec timeout could do this as well, ie-ĭoing in 2 seconds (press SPACE for crosh). With some experimenting, you might even be able to pass arguments to make it do different things depending on how it's opened (via ALT-CTRL-T vs from the shelf- dunno if it can read the url used to call crosh), but at the very least you could do something like have it run whatever you want it to run if a second modifier key is held down (or if it isn't.), otherwise return to normal operation. Changing the default behavior of /usr/bin/crosh could accomplish your goal to do whatever you want. It's a regular ol' dash/bash shell program, and you can create a shortcut to it on the shelf by opening crosh (ctrl-alt-T), then right click the top right of the browser and select More Tools -> Add to shelf.Ĭlicking the newly-created link (which looks like an "N") will launch /usr/bin/crosh in a tab. To change dir into the most recently modified extension icon subfolder automatically, the following one-liner worked for me*.Īnother way to approach this, since you're modifying system stuff anyway, might be to edit crosh at /usr/bin/crosh. It is easiest to do this directly after clicking "add to shelf" To avoid any manifest editing, saved them as *size*.pngĮ.g. Six sizes are required - from 32px to 256. Prepared a set of icons in ~/Downloads/firefox. So, all we need to do, is get some icons, find the right folder for our shelf shortcut apps, then copy our new icons into them!įor instance, here's how I made a nice shiny icon for my single app shelf shortcut to Firefox.Ĭreated a temporary folder in ~/Downloads to store downloaded icons. ![]() Our shell shortcuts were getting created with blank pngs by default (the black box with P in the center). Happily it turns out that, when you add shortcuts to the shelf on Chrome OS like this, a minimal app is created for each one, with its own manifest.json, and icon.pngs. Enter Command: sudo initctl start openssh-server Enter Command: sudo initctl reload-configurationġ7. Enter Command: sudo ln -s /usr/share/chromeos-ssh-config/init/nf /etc/init/nfġ6. Enter Command: sudo /usr/share/vboot/bin/make_dev_ssd.sh -force -remove_rootfs_verificationġ5. Sudo sh ~/Downloads/crouton -r trusty -t unity,touch,xiwi,extensionĥ. Here's the list of steps I followed allowing me to use sudo commands in the SSH Arguments box.Īs a side note, this is the crouton installation I am running on an ASUS c302. I'm not entirely familiar with exactly how my process worked, but I do not have any sudo password required within shell. It works well! It looks like any command can be added to the 'Arguments' field in Secure Shell, with the syntax: ![]() ![]() Installed Secure Shell extension setup sshd on the Chromebook (by making a symlink in /etc/init/ pointing to /usr/share/chromeos-ssh-config/init/openssh-server-conf) rebooted added public key from ConnectBot (Android app) to ~/.ssh/authorized_keys in order to test connection setup Android homescreen shortcut to send shell command created profile in Secure Shell app on Chromebook to connect to local IP address generated keys on Chromebook (in ~/.ssh) added generated public key to ~/.ssh/authorized_keys imported newly-generated private/public key pair within Secure Shell app (one by one) created bookmark link to profile in shelf, and, finally, added required command to profile in Secure Shell. This method might be overkill somewhat, but, anyway, what I did was as follows: During the process of figuring it out, I also found that I was able to create a homescreen shortcut on my Android tablet which when tapped sends a shell command to the Chromebook. I managed to find a way to do something similar with the Secure Shell app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |