Script solution for tabs in bash wanted - linux

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!

Related

How to open terminal from browser in mac?

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.

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.

Windows Server 2012 force font smoothing (anti-aliasing) over RDP

I am using Guacamole 0.9.7 which uses RDP through a middle server to then project the RDP to a web browser. Works great, but I have users who want font smoothing. Guacamole doesn't yet support font-smoothing over RDP. There are some manual fixes, but they look daunting and no guarantee it will work.
What I am wondering is if there is a way to simply force font smoothing on the Windows 2012 server. I can set font smoothing manually after connecting, but it goes away the next time a user connects. I also would prefer to use RemoteApps as opposed to giving them access to the full desktop, so they wouldn't even have the option to set it manually every time.
I've dug around endlessly in the registry, group policy and searched the web, but I can find nothing that will force font smoothing to stick. Any ideas/suggestions?
A batch file that enables font smoothing that I could put in the startup folder would also be fine. If anyone knows the command lines for that, it would be much appreciated.
As of Guacamole 0.9.8, you can enable font smoothing using the enable-font-smoothing parameter: http://guac-dev.org/doc/gug/configuring-guacamole.html#rdp-perf-flags
From the documentation linked above:
If set to "true", text will be rendered with smooth edges. Text over RDP is rendered with rough edges by default, as this reduces the number of colors used by text, and thus reduces the bandwidth required for the connection.
The corresponding issue in JIRA was GUAC-835 ("Support RDP performance flags").
Enable/disable ClearType in Windows7
Found that buried in the internets. It worked for me on a Windows 10 test machine through guacamole. Make it a logon script or something. powershell "& 'C:\myscript.ps1' 1" Found that command in the comments, should let you make it into a batch file if needed. If you've figured out how to get clipboard sharing and sound and other integrated stuff, please share.
I figured out how to enable font smoothing in Windows Remote Desktop Protocol (RDP) for Windows Server 2012 when a user logs in and/or when they reconnect to a remote session.
Download and install a program called ClearTypeSwitch.
Control Panel -> Administrative Tools -> Task Scheduler
Select "Create Task..."
General tab, name it and check "Run with highest privileges" and "Hidden"
Create two triggers "On connection to user session" and "At log on"
Actions "C:\Program Files (x86)\ClearType Switch\ClearTypeSwitch.exe" s+ c+"
Click "Ok"

Disable global hotkeys for window

I am making RDP GUI for myself and i would like all key combinations handled by RDP session. I use freerdp for handling RDP stuff, it has handy flag where i specify winId() of qt widged to embed RDP window to. Everything works except for few keys. For example window key still opens menu on host, not start menu in RDP session. Also alt-f2 opens gnome start screen instead of performing bound action in application inside RDP session. Is it possible to somehow make all key combinations to be handled only by embedded RDP window and not xserver?
I have tried following (Xlib/python):
window.change_attributes(do_not_propagate_mask=X.KeyPress | X.KeyRelease)
However that does not seem to change anything. I also tried disabling key events in qt without much luck. Truth to be told i do not know exactly if this has to be done at qt or X level. Any help would be greatly appreciated.

Using vim, how do you quickly refresh a web page you're working on?

I've been using VIM for a few weeks now while messing with various web languages and I'm really enjoying it.
I find it cumbersome having to tab or click into my browser and refresh the page to see the effect of a code change. It's even more annoying as I'm using Virtual Box and I tend to be working from PDF files on the host system so I have limited window space.
Do you gurus have any fancy ways of doing this? I was wondering if it's possible to split the VIM workspace and have links/lynx in a window of its own or something to that effect?
edit:
out of curiosity, if anyone is still glancing at this:-
is it possible to execute a browser from vim and load a URL based on a variable of sorts?
:! firefox http://localhost/bla/$CURRENTWORKINGFILE
sort of thing?
If you are developing locally where no one cares, how about setting some JS to refresh the page?
<script>
setTimeout(function() { location.reload() }, 60000 );
</script>
That way you can keep working in vim and take a glance at the web page every min or so to see it refresh. This should work for most web pages.
I do this on dual monitors by leaving VIM open on one monitor and the browser on the other.
I don't know how to do this in specific, but I know of two plugins which let you communicate with a shell from within VIM:
http://code.google.com/p/conque/
http://technotales.wordpress.com/2007/10/03/like-slime-for-vim/
Use an app called XRefresh.

Resources