How to show machine and username on X-forwarded windowsHow to change Gnome-Terminal title?Run (system) script...
Noun clause (singular all the time?)
Combinable filters
Don’t seats that recline flat defeat the purpose of having seatbelts?
Examples of subgroups where it's nontrivial to show closure under multiplication?
How could Tony Stark make this in Endgame?
With a Canadian student visa, can I spend a night at Vancouver before continuing to Toronto?
A Strange Latex Symbol
Repelling Blast: Must targets always be pushed back?
Reducing vertical space in stackrel
Does a semiconductor follow Ohm's law?
What route did the Hindenburg take when traveling from Germany to the U.S.?
How to stop co-workers from teasing me because I know Russian?
How to reduce LED flash rate (frequency)
How would one muzzle a full grown polar bear in the 13th century?
how to find the equation of a circle given points of the circle
How to solve constants out of the internal energy equation?
Is there any limitation with Arduino Nano serial communication distance?
Why do games have consumables?
Examples of non trivial equivalence relations , I mean equivalence relations without the expression " same ... as" in their definition?
Packing rectangles: Does rotation ever help?
Why was Germany not as successful as other Europeans in establishing overseas colonies?
What does the "ep" capability mean?
How to get a plain text file version of a CP/M .BAS (M-BASIC) program?
What is the most expensive material in the world that could be used to create Pun-Pun's lute?
How to show machine and username on X-forwarded windows
How to change Gnome-Terminal title?Run (system) script on SSH login and/or logoutWill Wayland have network transparency?Redirect existing windows via SSH and X11 forwarding?Share first ssh connection to user@host opportunisitically using ControlMasterCan I use X windows to show the GUI of a remote process?How can I override the title of an X11 window running across an SSH tunnel?Is it possible to forward Windows… windows into Linux? (Like unity/seamless or xypher)Want to run X with startx on :0.0 from ssh (*not* remote X forwarding)SSH without a home directoryFrom a remote SSH session, how can I get the screen resolution of the physically connected monitor?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I use forward X windows connections a lot (using "ssh -X ...").
How can I see which window is from which user and machine?
Ideally I'd like each non-local window title bar to display "fred@server3.example.com" or similar.
ssh xorg
add a comment |
I use forward X windows connections a lot (using "ssh -X ...").
How can I see which window is from which user and machine?
Ideally I'd like each non-local window title bar to display "fred@server3.example.com" or similar.
ssh xorg
This depends on what terminal you use. Some look for escape sequences that change the title. For example, see here
– meuh
10 hours ago
add a comment |
I use forward X windows connections a lot (using "ssh -X ...").
How can I see which window is from which user and machine?
Ideally I'd like each non-local window title bar to display "fred@server3.example.com" or similar.
ssh xorg
I use forward X windows connections a lot (using "ssh -X ...").
How can I see which window is from which user and machine?
Ideally I'd like each non-local window title bar to display "fred@server3.example.com" or similar.
ssh xorg
ssh xorg
asked 14 hours ago
fadedbeefadedbee
187113
187113
This depends on what terminal you use. Some look for escape sequences that change the title. For example, see here
– meuh
10 hours ago
add a comment |
This depends on what terminal you use. Some look for escape sequences that change the title. For example, see here
– meuh
10 hours ago
This depends on what terminal you use. Some look for escape sequences that change the title. For example, see here
– meuh
10 hours ago
This depends on what terminal you use. Some look for escape sequences that change the title. For example, see here
– meuh
10 hours ago
add a comment |
1 Answer
1
active
oldest
votes
Your ~/.bashrc
can tell if it's a ssh
connection by looking at environment variables:
walt@bat:~(0)$ env | grep SSH
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
walt@bat:~(0)$ ssh $USER@localhost
walt@localhost's password:
Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 4.15.0-48-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
0 packages can be updated.
0 updates are security updates.
Last login: Sun Apr 21 11:09:24 2019
walt@bat:~(0)$ env | grep SSH
SSH_CLIENT=127.0.0.1 49228 22
SSH_TTY=/dev/pts/5
SSH_CONNECTION=127.0.0.1 49228 127.0.0.1 22
walt@bat:~(0)$ logout
Connection to localhost closed.
walt@bat:~(0)$
Then, you can use xttitle
to set the window title (sudo apt install xttitle
).
Something like
if [[ -n "$SSH_CONNECTION" ]] && [[ -n "$DISPLAY" ]] ; then
xttitle "SSH Connection $USER@$(hostname)"
fi
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1138600%2fhow-to-show-machine-and-username-on-x-forwarded-windows%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Your ~/.bashrc
can tell if it's a ssh
connection by looking at environment variables:
walt@bat:~(0)$ env | grep SSH
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
walt@bat:~(0)$ ssh $USER@localhost
walt@localhost's password:
Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 4.15.0-48-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
0 packages can be updated.
0 updates are security updates.
Last login: Sun Apr 21 11:09:24 2019
walt@bat:~(0)$ env | grep SSH
SSH_CLIENT=127.0.0.1 49228 22
SSH_TTY=/dev/pts/5
SSH_CONNECTION=127.0.0.1 49228 127.0.0.1 22
walt@bat:~(0)$ logout
Connection to localhost closed.
walt@bat:~(0)$
Then, you can use xttitle
to set the window title (sudo apt install xttitle
).
Something like
if [[ -n "$SSH_CONNECTION" ]] && [[ -n "$DISPLAY" ]] ; then
xttitle "SSH Connection $USER@$(hostname)"
fi
add a comment |
Your ~/.bashrc
can tell if it's a ssh
connection by looking at environment variables:
walt@bat:~(0)$ env | grep SSH
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
walt@bat:~(0)$ ssh $USER@localhost
walt@localhost's password:
Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 4.15.0-48-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
0 packages can be updated.
0 updates are security updates.
Last login: Sun Apr 21 11:09:24 2019
walt@bat:~(0)$ env | grep SSH
SSH_CLIENT=127.0.0.1 49228 22
SSH_TTY=/dev/pts/5
SSH_CONNECTION=127.0.0.1 49228 127.0.0.1 22
walt@bat:~(0)$ logout
Connection to localhost closed.
walt@bat:~(0)$
Then, you can use xttitle
to set the window title (sudo apt install xttitle
).
Something like
if [[ -n "$SSH_CONNECTION" ]] && [[ -n "$DISPLAY" ]] ; then
xttitle "SSH Connection $USER@$(hostname)"
fi
add a comment |
Your ~/.bashrc
can tell if it's a ssh
connection by looking at environment variables:
walt@bat:~(0)$ env | grep SSH
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
walt@bat:~(0)$ ssh $USER@localhost
walt@localhost's password:
Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 4.15.0-48-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
0 packages can be updated.
0 updates are security updates.
Last login: Sun Apr 21 11:09:24 2019
walt@bat:~(0)$ env | grep SSH
SSH_CLIENT=127.0.0.1 49228 22
SSH_TTY=/dev/pts/5
SSH_CONNECTION=127.0.0.1 49228 127.0.0.1 22
walt@bat:~(0)$ logout
Connection to localhost closed.
walt@bat:~(0)$
Then, you can use xttitle
to set the window title (sudo apt install xttitle
).
Something like
if [[ -n "$SSH_CONNECTION" ]] && [[ -n "$DISPLAY" ]] ; then
xttitle "SSH Connection $USER@$(hostname)"
fi
Your ~/.bashrc
can tell if it's a ssh
connection by looking at environment variables:
walt@bat:~(0)$ env | grep SSH
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
walt@bat:~(0)$ ssh $USER@localhost
walt@localhost's password:
Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 4.15.0-48-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
0 packages can be updated.
0 updates are security updates.
Last login: Sun Apr 21 11:09:24 2019
walt@bat:~(0)$ env | grep SSH
SSH_CLIENT=127.0.0.1 49228 22
SSH_TTY=/dev/pts/5
SSH_CONNECTION=127.0.0.1 49228 127.0.0.1 22
walt@bat:~(0)$ logout
Connection to localhost closed.
walt@bat:~(0)$
Then, you can use xttitle
to set the window title (sudo apt install xttitle
).
Something like
if [[ -n "$SSH_CONNECTION" ]] && [[ -n "$DISPLAY" ]] ; then
xttitle "SSH Connection $USER@$(hostname)"
fi
answered 9 hours ago
waltinatorwaltinator
23.1k74269
23.1k74269
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1138600%2fhow-to-show-machine-and-username-on-x-forwarded-windows%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
This depends on what terminal you use. Some look for escape sequences that change the title. For example, see here
– meuh
10 hours ago