How to open terminal from browser in mac? - browser

I want to open a terminal window from browser. The web application displays an ssh command and ssh password for logging into some server.
I want this command to be pasted into a terminal window with a button click in the webpage. Anyone has any idea about how we can do this?

For security reasons you cannot open arbitrary applications from a webpage.
So, you are left with few options:
Ask them to open a terminal window, copy the text by a button click to their clipboard and ask them to paste it at required place. See here https://stackoverflow.com/a/30810322/2328165
If users are novice and all machines are under your control (newbies at training institute, where being proficient in opening a terminal is not required), you can write a custom protocol handler with a command and a validating parameter for something like term:uri-encoded-command&secret=some-hash and install them. Be careful though, might be a risk.
Use websocket based VNC/SSH such as https://github.com/aluzzardi/wssh

Coming late to this thread.
Safari and OSX support:
ssh://username#10.0.0.1
style URIs so that you can create links that launch terminal. These are simple and clean.
At the moment this seems to work for IPv4 addresses, names that resolve to IPv4 or IPv6 addresses, but there doesn't seem to be support for naked IPv6 addresses. If anyone knows the magic runes for the IPv6 It'd be great to know.

Related

Script solution for tabs in bash wanted

i'm in search for a solution for the following situation:
I am working for a customer who only allows accessing the linux servers
by putty (from a Windows Terminal Server).
Unfortunately i need multiple Session to work properly and effective.
Tmux and Screen are not a good option for me, because i need a visual
"tab" to keep track of all the stuff im doing.
Is this even possible or am i lost here?
Best regards.
MremoteNG does tabs and uses Putty (Putty comes with it). If you have RDP or console access to Windows server, you can upload MremoteNG portable.
Perfectly possible in screen: How to open tabs windows in GNU screen – DevSolar
Perfectly solved my problem! Thanks DevSolar!
If you're using PuTTY, you can simply open two sessions at once. Open your first session, then right-click on the PuTTY icon in your taskbar, click "PuTTY" from the context menu, and it'll open a new instance of the program. Unfortunately, this won't result in a second tab, but instead it will result in a second window and you can swap back and forth between windows.
Other SSH clients do have actual tabs as a feature - one example is MobaXTerm, which is free and doesn't require admin privileges to use on your computer, and which is indeed tabbed. It can also import your existing PuTTY configurations, so setting it up is pretty quick.
You can get this application that allows you to have mulptiple tabs in putty. you dont need to "install" it so your lack of permissions wont be an issue :
http://ttyplus.com/multi-tabbed-putty/
Regarding your auth issue, I would recommend read this :
https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2
Note - Dont worry about being lost, everybody learns at different speeds.
Regards!

How Mirror webpages as Web Video Wall into another browser?

We have a video wall with some monitors. each one is plugged into a Raspberry PI 3.
Mostly we just are showing webpages into the video wall (reports, status etc)
Today we control the content of each raspberry using VNC. I was wondering if is there a web service or plugin that allows me to just configure the URL that I wish to show on each screen. Plus, Sometimes we split the each screen into 2 or more webpages.
Is there any web app, chrome plugin or web service that allows me do that?
Thanks
OBS, I don't know if here is the right place to this kind of question. If is there another community where i could ask this, i will be glad to know.
I can not give a complete and exhaustive answer, since you do not provide any description of how it should look and how you want to control it.
Let's start with the fact that almost every browser at startup you can specify URL and start the browser like this:
# firefox https://google.com
Then the browser opens with the page you need.
To close the page, you can kill the browser with a command like this
# killall firefox
You can run commands on the Raspberry PI using ssh, it's much easier than running the VNC session.
Most likely you may encounter a problem when you receive a message stating that the browser can not connect to the display. This is easily correctable with something like:
# export DISPLAY=:0
In order for the browser to always be in full-screen mode and not to lose its settings, you can configure it correctly, close all the tabs and save its configuration from ~/.mozilla/ (for firefox), and then restore it from backup every time you start it.

multi monitor public information display (4 monitor / each with one chrome/firefox window)

I've 4 monitors connected to a pc running CentOS 7. Each physical monitor/display should show a website in full screen and auto refresh it every x seconds.
I've tried:
opening from bash and moving with xdotool -> how can I distinguish between the 4 chrome or firefox windows? If I don't do it and apply to the last active this might become unreliable with other programs open.
researched devilspie, seems it has the same problem (can't distinguish between multiple chrome/firefox windows)
using DISPLAY variable -> does only find one display 0.0
https://addons.mozilla.org/de/firefox/addon/monitor-master/ -> does not work with extended workspace, contacted developer
I've only a xrandr bash script to rearrange the displays when they become connected (three of four may be switched off to save power).
I would use a firefox/chrome add on for the auto refresh functionality.
Maybe someone can give me a hint how to reliably do this?
In addition to the "easy auto refresh" chrome plugin. I have another idea for you, why not use a chrome extension for handling the positioning.
It is of course, only for chrome(maybe thats fine for you).
Background: We had related difficulties. Internal webapp that opens multiple documents in windows, and need to be placed in other monitors.
The javascript does not support this, for security reasons and only a native extension can properly work with the tabs/windows objects.
Therefore, we have created an open source chrome extension for doing exactly that: flexible windows position across multi-monitor setups.
In your case you can define for each monitor a website-rule that the window would appear there.
The chrome extension is called "MultiWindow Positioner" and its complete free. You can get it at the chrome store here
The actual source code you find in github in the project chrome-multiwindow-positioner
Disclaimer: I am the maintainer of the open source (MIT) github project. If there any interesting idea, or comments feel free to share them here.

Re-using existing browser tabs when starting a new process

Right now I'm using Process.Start(URL_Here) to open a new page in the web browser - it will either open a browser or a new tab if one is already running. I was wondering, is there any reasonable (i.e. the one which won't require any 'hacks') way to re-use already opened tabs? - by "re-use" I mean a situation when f.e. www.google.com is already opened, I want to open a google page again, but instead of opening a new google tab it will redirect to the one that is already opened. Thanks for any help.
This sounds like standard browser behavior, and it's unlikely you'll be able to change it with simple command line arguments.
If you're willing to use Chrome and give every piece of data you transmit to The Company of Great Evil, then here's a plugin that can reuse a tab if you're using the same URL.

Disabling local cursor when using Guacamole VNC

I'm using Guacamole VNC web client viewer and I want to hide the local browser cursor, because otherwise you see two cursors and it is confusing.
I can hide the browser mouse using simple style: cursor:none;
But this is not so good because when some connection exception occurs, I need the browser mouse in order to close the error window etc.
Any solution?
What you want is to hide the remote cursor not the local one. The VNC protocol allows you to hide the remote cursor. Most VNC clients support this. For example, in noVNC (a HTML5 VNC client) there is a "Local Cursor" option to hide the remote cursor so that you only see one cursor.
Unfortunatley, you can't do this right now in Guacamole. There is a long standing bug in Guacamole to add this support: http://guac-dev.org/trac/ticket/33
Update: the option has been fixed in Guacamole.

Resources