I want to set my laptop to load an image in the shell's background or set the background color to red if I'm connected via SSH.
How can this be done? With a bash function in
I have: Set the prompt to different colors.
My terminal emulator is Konsole, KDE's terminal.
I tried this but it didn't load correctly, didn't see any change in the shell.
EDIT: I've managed to do it in a test but it's not the behaviour I'm looking for. The behaviour I'm looking for is to set my local system so that, when I SSH to a remote the "shell environment/shell profile" is a different one from my default, and something flashy, like red background or an image.
Here is how:
This will set the background to red and text to black.
It's on Debian Wheezy and there was no .bash_profile file, so create that. And in it copy/paste this there:
if [ ! -z "$SSH_CONNECTION" ] ; then source ~/Scripts/.shell_ssh_bashrc ## This file contains the command to execute if it's an SSH session. fi
Create a custom bashrc file for use if this is SSH session(remote shell) And copy/paste this there:
setterm -term linux -back red -fore black -clear
This would mean that I would have to make this configuration on all the remote's.