Running VNC server on Ubuntu Desktop 18.04 by creating new sessions
I would like to create a VNC server that runs gnome-shell environment, the same as the default UI in the console, separate from the console session (so that the console cannot see anything).
I tried vnc4server
and tightvncserver
, neither worked. No matter how I configured xstartup
, gnome-session
just won't run. I did manage to run Xfdm
and gnome-panel
in the same way. When I try to connect to the VNC server I get only grey screen. However I can confirm that the vnc server worked because I can run programs in it by setting DISPLAY
and XAUTHORITY
.
Is there a way to get ubuntu-desktop
running in a new X session, separate from the console session? Preferably on a VNC server?
Steps I created the vnc server:
- Install a completely new Ubuntu 18.04 LTS Desktop.
- Install
tightvncserver
. - Run
vncserver
to configure and kill it.
Change
~/.vnc/xstartup
and append:
export STARTUP="/usr/bin/gnome-session --session=ubuntu --disable-acceleration-check"
$STARTUP
Run
vncserver
.- Connect to the VNC server with any VNC client. Only grey screen is shown.
- Configure
DISPLAY
andXAUTHORITY
and rungedit
. The VNC session sees an incompletegedit
window.
gnome remote-desktop vnc 18.04
add a comment |
I would like to create a VNC server that runs gnome-shell environment, the same as the default UI in the console, separate from the console session (so that the console cannot see anything).
I tried vnc4server
and tightvncserver
, neither worked. No matter how I configured xstartup
, gnome-session
just won't run. I did manage to run Xfdm
and gnome-panel
in the same way. When I try to connect to the VNC server I get only grey screen. However I can confirm that the vnc server worked because I can run programs in it by setting DISPLAY
and XAUTHORITY
.
Is there a way to get ubuntu-desktop
running in a new X session, separate from the console session? Preferably on a VNC server?
Steps I created the vnc server:
- Install a completely new Ubuntu 18.04 LTS Desktop.
- Install
tightvncserver
. - Run
vncserver
to configure and kill it.
Change
~/.vnc/xstartup
and append:
export STARTUP="/usr/bin/gnome-session --session=ubuntu --disable-acceleration-check"
$STARTUP
Run
vncserver
.- Connect to the VNC server with any VNC client. Only grey screen is shown.
- Configure
DISPLAY
andXAUTHORITY
and rungedit
. The VNC session sees an incompletegedit
window.
gnome remote-desktop vnc 18.04
Do you insist on using VNC? With xpra it should be easier to get there.
– Sebastian Stark
May 2 '18 at 18:28
If it's not VNC then I'd prefer a protocol that works over a slow Internet connection, and has clients on all operating systems - Android, Windows, etc. xpra seems to forward X connections which is not what I want.
– He WenYang
May 2 '18 at 23:40
add a comment |
I would like to create a VNC server that runs gnome-shell environment, the same as the default UI in the console, separate from the console session (so that the console cannot see anything).
I tried vnc4server
and tightvncserver
, neither worked. No matter how I configured xstartup
, gnome-session
just won't run. I did manage to run Xfdm
and gnome-panel
in the same way. When I try to connect to the VNC server I get only grey screen. However I can confirm that the vnc server worked because I can run programs in it by setting DISPLAY
and XAUTHORITY
.
Is there a way to get ubuntu-desktop
running in a new X session, separate from the console session? Preferably on a VNC server?
Steps I created the vnc server:
- Install a completely new Ubuntu 18.04 LTS Desktop.
- Install
tightvncserver
. - Run
vncserver
to configure and kill it.
Change
~/.vnc/xstartup
and append:
export STARTUP="/usr/bin/gnome-session --session=ubuntu --disable-acceleration-check"
$STARTUP
Run
vncserver
.- Connect to the VNC server with any VNC client. Only grey screen is shown.
- Configure
DISPLAY
andXAUTHORITY
and rungedit
. The VNC session sees an incompletegedit
window.
gnome remote-desktop vnc 18.04
I would like to create a VNC server that runs gnome-shell environment, the same as the default UI in the console, separate from the console session (so that the console cannot see anything).
I tried vnc4server
and tightvncserver
, neither worked. No matter how I configured xstartup
, gnome-session
just won't run. I did manage to run Xfdm
and gnome-panel
in the same way. When I try to connect to the VNC server I get only grey screen. However I can confirm that the vnc server worked because I can run programs in it by setting DISPLAY
and XAUTHORITY
.
Is there a way to get ubuntu-desktop
running in a new X session, separate from the console session? Preferably on a VNC server?
Steps I created the vnc server:
- Install a completely new Ubuntu 18.04 LTS Desktop.
- Install
tightvncserver
. - Run
vncserver
to configure and kill it.
Change
~/.vnc/xstartup
and append:
export STARTUP="/usr/bin/gnome-session --session=ubuntu --disable-acceleration-check"
$STARTUP
Run
vncserver
.- Connect to the VNC server with any VNC client. Only grey screen is shown.
- Configure
DISPLAY
andXAUTHORITY
and rungedit
. The VNC session sees an incompletegedit
window.
gnome remote-desktop vnc 18.04
gnome remote-desktop vnc 18.04
edited May 2 '18 at 15:57
He WenYang
asked May 2 '18 at 15:05
He WenYangHe WenYang
26115
26115
Do you insist on using VNC? With xpra it should be easier to get there.
– Sebastian Stark
May 2 '18 at 18:28
If it's not VNC then I'd prefer a protocol that works over a slow Internet connection, and has clients on all operating systems - Android, Windows, etc. xpra seems to forward X connections which is not what I want.
– He WenYang
May 2 '18 at 23:40
add a comment |
Do you insist on using VNC? With xpra it should be easier to get there.
– Sebastian Stark
May 2 '18 at 18:28
If it's not VNC then I'd prefer a protocol that works over a slow Internet connection, and has clients on all operating systems - Android, Windows, etc. xpra seems to forward X connections which is not what I want.
– He WenYang
May 2 '18 at 23:40
Do you insist on using VNC? With xpra it should be easier to get there.
– Sebastian Stark
May 2 '18 at 18:28
Do you insist on using VNC? With xpra it should be easier to get there.
– Sebastian Stark
May 2 '18 at 18:28
If it's not VNC then I'd prefer a protocol that works over a slow Internet connection, and has clients on all operating systems - Android, Windows, etc. xpra seems to forward X connections which is not what I want.
– He WenYang
May 2 '18 at 23:40
If it's not VNC then I'd prefer a protocol that works over a slow Internet connection, and has clients on all operating systems - Android, Windows, etc. xpra seems to forward X connections which is not what I want.
– He WenYang
May 2 '18 at 23:40
add a comment |
2 Answers
2
active
oldest
votes
Finally I found the solution.
The Gnome session doesn't seem to work on VNC X servers, but an Xvfb will work.
The idea is to create an Xvfb for the session and use x11vnc for VNC:
Xvfb :1 -screen 0 1280x720x24
Then spawn GNOME environment:
DISPLAY=:1 gnome-shell --replace
Finally use x11vnc
to create an VNC server for Xvfb:
x11vnc -display :1
add a comment |
Make sure that you unset the DBUS_SESSION_BUS_ADDRESS at the beginning of the xstartup
script.
Here is a snip of mine that have gnome-session started properly. However, the only issue so far is that the color scheme of the terminal is not properly applied, but VNC runs fine :)
#!/bin/sh
MODE="GNOME"
unset DBUS_SESSION_BUS_ADDRESS
if [ -e "$HOME/.Xresources" ]
then
xrdb "$HOME/.Xresources"
fi
if [ "GNOME" = "$MODE" ]
then
if which gnome-session > /dev/null
then
gnome-session --session=ubuntu &
else
MODE=""
fi
fi
MODE="
should beMODE=""
, UN-terminated quotes. syntax error.
– Dan
Sep 27 '18 at 5:27
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%2f1031147%2frunning-vnc-server-on-ubuntu-desktop-18-04-by-creating-new-sessions%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Finally I found the solution.
The Gnome session doesn't seem to work on VNC X servers, but an Xvfb will work.
The idea is to create an Xvfb for the session and use x11vnc for VNC:
Xvfb :1 -screen 0 1280x720x24
Then spawn GNOME environment:
DISPLAY=:1 gnome-shell --replace
Finally use x11vnc
to create an VNC server for Xvfb:
x11vnc -display :1
add a comment |
Finally I found the solution.
The Gnome session doesn't seem to work on VNC X servers, but an Xvfb will work.
The idea is to create an Xvfb for the session and use x11vnc for VNC:
Xvfb :1 -screen 0 1280x720x24
Then spawn GNOME environment:
DISPLAY=:1 gnome-shell --replace
Finally use x11vnc
to create an VNC server for Xvfb:
x11vnc -display :1
add a comment |
Finally I found the solution.
The Gnome session doesn't seem to work on VNC X servers, but an Xvfb will work.
The idea is to create an Xvfb for the session and use x11vnc for VNC:
Xvfb :1 -screen 0 1280x720x24
Then spawn GNOME environment:
DISPLAY=:1 gnome-shell --replace
Finally use x11vnc
to create an VNC server for Xvfb:
x11vnc -display :1
Finally I found the solution.
The Gnome session doesn't seem to work on VNC X servers, but an Xvfb will work.
The idea is to create an Xvfb for the session and use x11vnc for VNC:
Xvfb :1 -screen 0 1280x720x24
Then spawn GNOME environment:
DISPLAY=:1 gnome-shell --replace
Finally use x11vnc
to create an VNC server for Xvfb:
x11vnc -display :1
answered May 12 '18 at 12:52
He WenYangHe WenYang
26115
26115
add a comment |
add a comment |
Make sure that you unset the DBUS_SESSION_BUS_ADDRESS at the beginning of the xstartup
script.
Here is a snip of mine that have gnome-session started properly. However, the only issue so far is that the color scheme of the terminal is not properly applied, but VNC runs fine :)
#!/bin/sh
MODE="GNOME"
unset DBUS_SESSION_BUS_ADDRESS
if [ -e "$HOME/.Xresources" ]
then
xrdb "$HOME/.Xresources"
fi
if [ "GNOME" = "$MODE" ]
then
if which gnome-session > /dev/null
then
gnome-session --session=ubuntu &
else
MODE=""
fi
fi
MODE="
should beMODE=""
, UN-terminated quotes. syntax error.
– Dan
Sep 27 '18 at 5:27
add a comment |
Make sure that you unset the DBUS_SESSION_BUS_ADDRESS at the beginning of the xstartup
script.
Here is a snip of mine that have gnome-session started properly. However, the only issue so far is that the color scheme of the terminal is not properly applied, but VNC runs fine :)
#!/bin/sh
MODE="GNOME"
unset DBUS_SESSION_BUS_ADDRESS
if [ -e "$HOME/.Xresources" ]
then
xrdb "$HOME/.Xresources"
fi
if [ "GNOME" = "$MODE" ]
then
if which gnome-session > /dev/null
then
gnome-session --session=ubuntu &
else
MODE=""
fi
fi
MODE="
should beMODE=""
, UN-terminated quotes. syntax error.
– Dan
Sep 27 '18 at 5:27
add a comment |
Make sure that you unset the DBUS_SESSION_BUS_ADDRESS at the beginning of the xstartup
script.
Here is a snip of mine that have gnome-session started properly. However, the only issue so far is that the color scheme of the terminal is not properly applied, but VNC runs fine :)
#!/bin/sh
MODE="GNOME"
unset DBUS_SESSION_BUS_ADDRESS
if [ -e "$HOME/.Xresources" ]
then
xrdb "$HOME/.Xresources"
fi
if [ "GNOME" = "$MODE" ]
then
if which gnome-session > /dev/null
then
gnome-session --session=ubuntu &
else
MODE=""
fi
fi
Make sure that you unset the DBUS_SESSION_BUS_ADDRESS at the beginning of the xstartup
script.
Here is a snip of mine that have gnome-session started properly. However, the only issue so far is that the color scheme of the terminal is not properly applied, but VNC runs fine :)
#!/bin/sh
MODE="GNOME"
unset DBUS_SESSION_BUS_ADDRESS
if [ -e "$HOME/.Xresources" ]
then
xrdb "$HOME/.Xresources"
fi
if [ "GNOME" = "$MODE" ]
then
if which gnome-session > /dev/null
then
gnome-session --session=ubuntu &
else
MODE=""
fi
fi
edited Jan 12 at 4:08
answered Jun 8 '18 at 14:40
twangtwang
12
12
MODE="
should beMODE=""
, UN-terminated quotes. syntax error.
– Dan
Sep 27 '18 at 5:27
add a comment |
MODE="
should beMODE=""
, UN-terminated quotes. syntax error.
– Dan
Sep 27 '18 at 5:27
MODE="
should be MODE=""
, UN-terminated quotes. syntax error.– Dan
Sep 27 '18 at 5:27
MODE="
should be MODE=""
, UN-terminated quotes. syntax error.– Dan
Sep 27 '18 at 5:27
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%2f1031147%2frunning-vnc-server-on-ubuntu-desktop-18-04-by-creating-new-sessions%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
Do you insist on using VNC? With xpra it should be easier to get there.
– Sebastian Stark
May 2 '18 at 18:28
If it's not VNC then I'd prefer a protocol that works over a slow Internet connection, and has clients on all operating systems - Android, Windows, etc. xpra seems to forward X connections which is not what I want.
– He WenYang
May 2 '18 at 23:40