Registered Member
|
I recently switched from kde3.5 to 4.4.5
In KDE3, when I would ssh to my production environment I changed the screen colors from Black on White to Green on Black. This gave me a very obvious visual warning that I needed to be careful. I had an alias for ssh that invoked the following script. if [ "$KONSOLE_DCOP_SESSION" ] then #not entirely fool-proof, but it works well enough if [[ $@ =~ "prod" ]] then dcop ${KONSOLE_DCOP_SESSION} setSchema "GreenOnBlack.schema" ssh $@ dcop ${KONSOLE_DCOP_SESSION} setSchema "BlackOnWhite.schema" else ssh $@ fi fi I understand that dcop is not supported in KDE4 and that I should use dbus instead. I've spent some time trying to find documentation on dbus but have been marginally successful at best. Any suggestions on how to do this using dbus? thanks |
Administrator
|
I have examined the D-Bus API for Konsole and it seems that this functionality is no longer present. It was replaced with Profiles, which cover more functionality - and which do provide for a workaround.
First, create a new profile using the profile configuration panel. Change the shell to be the ssh connection command for your production environment, then select the appearance you want for this profile. Once created, it will be accessible from the File > New Tab menu. You can associate a shortcut to it using Settings > Configure Profiles as well, to make it convenient to access.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
KDE Developer
|
Well, there is no dbus equivalence at the moment, but there is another handy way.
You can use the 'konsoleprofile' script to modify the profile options used in current tab on the fly. In this example, you can use "konsoleprofile ColorScheme=GreenOnBlack" and "konsoleprofile ColorScheme=BlackOnWhite". Note, that script only applies to the current konsole tab. |
Registered Member
|
The script konsoleprofile does absolutely nothing. It only prints a message when the number of parameters is less than 1. But whatever parameter is entered, nothing is executed. This is the only [active] code in the konsoleprofile script on my system:
My goal is to change the ColorScheme from the command line. Debian Jessie KDE 4.14.2 jlinkels |
|
works perfectly here (konsole part 4.14 and 15.08.0
Enter
to select the "GreenOnBlack" colorscheme for the konsole terminal tab the call was made from. |
Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]