Open GUI programs on Desktop machine's $DISPLAY reliably via SSH from server
TL;DR
Is there a command that does: "Set up this terminal as if it was started from the Desktop", so I can run commands as if I started them inside my desktop session when I ssh into my desktop machine?
Details
When on a a server, I can ssh into my desktop machine (e.g. Xubuntu 18.04).
To run a simple xterm
I can get away with just:
export DISPLAY=:0.0
(or :1.0
on some machines)
To get xdg-open https://askubuntu.com
to work I also need:
export XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg
I bet there are programs where I need to set up one or more of these other environment variables:
CLUTTER_BACKEND=x11
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1248/bus
GLADE_MODULE_PATH=:
GTK_MODULES=gail:atk-bridge
GTK_OVERLAY_SCROLLING=0
SESSION_MANAGER=local/kosh:@/tmp/.ICE-unix/1931,unix/kosh:/tmp/.ICE-unix/1931
VTE_VERSION=5202
WINDOWID=79691779
XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg
XDG_CURRENT_DESKTOP=XFCE
XDG_DATA_DIRS=/usr/share/xfce4:/usr/share/xubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop:/usr/share
XDG_MENU_PREFIX=xfce-
XDG_RUNTIME_DIR=/run/user/1248
XDG_SEAT=seat0
XDG_SESSION_ID=3
XDG_SESSION_TYPE=x11
Is there a command I can run after I've ssh-ed to my desktop machine that does:
"Set up all the environment variables e.g. correct $DISPLAY
and $XDG_CONFIG_DIRS
and what ever else might be required, as if this terminal was started from the Desktop"?
Instead of me having to experimentally and gradually discover which of the above envs are required by miscellaneous programs...
(Kudos to those that spot I'm - still - a Babylon 5 fan)
ssh desktop-environments
add a comment |
TL;DR
Is there a command that does: "Set up this terminal as if it was started from the Desktop", so I can run commands as if I started them inside my desktop session when I ssh into my desktop machine?
Details
When on a a server, I can ssh into my desktop machine (e.g. Xubuntu 18.04).
To run a simple xterm
I can get away with just:
export DISPLAY=:0.0
(or :1.0
on some machines)
To get xdg-open https://askubuntu.com
to work I also need:
export XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg
I bet there are programs where I need to set up one or more of these other environment variables:
CLUTTER_BACKEND=x11
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1248/bus
GLADE_MODULE_PATH=:
GTK_MODULES=gail:atk-bridge
GTK_OVERLAY_SCROLLING=0
SESSION_MANAGER=local/kosh:@/tmp/.ICE-unix/1931,unix/kosh:/tmp/.ICE-unix/1931
VTE_VERSION=5202
WINDOWID=79691779
XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg
XDG_CURRENT_DESKTOP=XFCE
XDG_DATA_DIRS=/usr/share/xfce4:/usr/share/xubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop:/usr/share
XDG_MENU_PREFIX=xfce-
XDG_RUNTIME_DIR=/run/user/1248
XDG_SEAT=seat0
XDG_SESSION_ID=3
XDG_SESSION_TYPE=x11
Is there a command I can run after I've ssh-ed to my desktop machine that does:
"Set up all the environment variables e.g. correct $DISPLAY
and $XDG_CONFIG_DIRS
and what ever else might be required, as if this terminal was started from the Desktop"?
Instead of me having to experimentally and gradually discover which of the above envs are required by miscellaneous programs...
(Kudos to those that spot I'm - still - a Babylon 5 fan)
ssh desktop-environments
add a comment |
TL;DR
Is there a command that does: "Set up this terminal as if it was started from the Desktop", so I can run commands as if I started them inside my desktop session when I ssh into my desktop machine?
Details
When on a a server, I can ssh into my desktop machine (e.g. Xubuntu 18.04).
To run a simple xterm
I can get away with just:
export DISPLAY=:0.0
(or :1.0
on some machines)
To get xdg-open https://askubuntu.com
to work I also need:
export XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg
I bet there are programs where I need to set up one or more of these other environment variables:
CLUTTER_BACKEND=x11
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1248/bus
GLADE_MODULE_PATH=:
GTK_MODULES=gail:atk-bridge
GTK_OVERLAY_SCROLLING=0
SESSION_MANAGER=local/kosh:@/tmp/.ICE-unix/1931,unix/kosh:/tmp/.ICE-unix/1931
VTE_VERSION=5202
WINDOWID=79691779
XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg
XDG_CURRENT_DESKTOP=XFCE
XDG_DATA_DIRS=/usr/share/xfce4:/usr/share/xubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop:/usr/share
XDG_MENU_PREFIX=xfce-
XDG_RUNTIME_DIR=/run/user/1248
XDG_SEAT=seat0
XDG_SESSION_ID=3
XDG_SESSION_TYPE=x11
Is there a command I can run after I've ssh-ed to my desktop machine that does:
"Set up all the environment variables e.g. correct $DISPLAY
and $XDG_CONFIG_DIRS
and what ever else might be required, as if this terminal was started from the Desktop"?
Instead of me having to experimentally and gradually discover which of the above envs are required by miscellaneous programs...
(Kudos to those that spot I'm - still - a Babylon 5 fan)
ssh desktop-environments
TL;DR
Is there a command that does: "Set up this terminal as if it was started from the Desktop", so I can run commands as if I started them inside my desktop session when I ssh into my desktop machine?
Details
When on a a server, I can ssh into my desktop machine (e.g. Xubuntu 18.04).
To run a simple xterm
I can get away with just:
export DISPLAY=:0.0
(or :1.0
on some machines)
To get xdg-open https://askubuntu.com
to work I also need:
export XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg
I bet there are programs where I need to set up one or more of these other environment variables:
CLUTTER_BACKEND=x11
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1248/bus
GLADE_MODULE_PATH=:
GTK_MODULES=gail:atk-bridge
GTK_OVERLAY_SCROLLING=0
SESSION_MANAGER=local/kosh:@/tmp/.ICE-unix/1931,unix/kosh:/tmp/.ICE-unix/1931
VTE_VERSION=5202
WINDOWID=79691779
XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg
XDG_CURRENT_DESKTOP=XFCE
XDG_DATA_DIRS=/usr/share/xfce4:/usr/share/xubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop:/usr/share
XDG_MENU_PREFIX=xfce-
XDG_RUNTIME_DIR=/run/user/1248
XDG_SEAT=seat0
XDG_SESSION_ID=3
XDG_SESSION_TYPE=x11
Is there a command I can run after I've ssh-ed to my desktop machine that does:
"Set up all the environment variables e.g. correct $DISPLAY
and $XDG_CONFIG_DIRS
and what ever else might be required, as if this terminal was started from the Desktop"?
Instead of me having to experimentally and gradually discover which of the above envs are required by miscellaneous programs...
(Kudos to those that spot I'm - still - a Babylon 5 fan)
ssh desktop-environments
ssh desktop-environments
asked Jan 7 at 8:54
Peter V. MørchPeter V. Mørch
1,77312022
1,77312022
add a comment |
add a comment |
0
active
oldest
votes
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%2f1107655%2fopen-gui-programs-on-desktop-machines-display-reliably-via-ssh-from-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f1107655%2fopen-gui-programs-on-desktop-machines-display-reliably-via-ssh-from-server%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