VNC with virtual display (partly solved) / dock missing
I have a Ubuntu machine that I use as a Plex and data server. There is no monitor connected to it. This wasn't a problem with Ubuntu 16.04, but now, with 18.04, it is and it shows a black screen whenever I connect using VNC.
I've already created the virtual display using the answer to this question: https://unix.stackexchange.com/quest...output-to-xorg
Then I made a script that's executed bij Startup Applications:
#! /bin/bash
/usr/bin/xrandr -d :0 --output VIRTUAL1 --primary --auto
/usr/bin/xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
/usr/bin/xrandr --addmode VIRTUAL1 "1600x900_60.00"
After this, it still shows a black screen when I connect using VNC. BUT, when I run this with SSH:
$ export DISPLAY=:0
$ xrandr
After that, I can see my desktop in VNC... Any ideas on how to fix this? Also, when I see my desktop after all this, the dock is missing and all the icons are in the same spot.
[EDIT]
Adding the line /usr/bin/xrandr
at the end of my script made sure that VIRTUAL1
is active at reboot.
Dock is still missing though.
display vnc xrandr virtual dock
add a comment |
I have a Ubuntu machine that I use as a Plex and data server. There is no monitor connected to it. This wasn't a problem with Ubuntu 16.04, but now, with 18.04, it is and it shows a black screen whenever I connect using VNC.
I've already created the virtual display using the answer to this question: https://unix.stackexchange.com/quest...output-to-xorg
Then I made a script that's executed bij Startup Applications:
#! /bin/bash
/usr/bin/xrandr -d :0 --output VIRTUAL1 --primary --auto
/usr/bin/xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
/usr/bin/xrandr --addmode VIRTUAL1 "1600x900_60.00"
After this, it still shows a black screen when I connect using VNC. BUT, when I run this with SSH:
$ export DISPLAY=:0
$ xrandr
After that, I can see my desktop in VNC... Any ideas on how to fix this? Also, when I see my desktop after all this, the dock is missing and all the icons are in the same spot.
[EDIT]
Adding the line /usr/bin/xrandr
at the end of my script made sure that VIRTUAL1
is active at reboot.
Dock is still missing though.
display vnc xrandr virtual dock
add a comment |
I have a Ubuntu machine that I use as a Plex and data server. There is no monitor connected to it. This wasn't a problem with Ubuntu 16.04, but now, with 18.04, it is and it shows a black screen whenever I connect using VNC.
I've already created the virtual display using the answer to this question: https://unix.stackexchange.com/quest...output-to-xorg
Then I made a script that's executed bij Startup Applications:
#! /bin/bash
/usr/bin/xrandr -d :0 --output VIRTUAL1 --primary --auto
/usr/bin/xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
/usr/bin/xrandr --addmode VIRTUAL1 "1600x900_60.00"
After this, it still shows a black screen when I connect using VNC. BUT, when I run this with SSH:
$ export DISPLAY=:0
$ xrandr
After that, I can see my desktop in VNC... Any ideas on how to fix this? Also, when I see my desktop after all this, the dock is missing and all the icons are in the same spot.
[EDIT]
Adding the line /usr/bin/xrandr
at the end of my script made sure that VIRTUAL1
is active at reboot.
Dock is still missing though.
display vnc xrandr virtual dock
I have a Ubuntu machine that I use as a Plex and data server. There is no monitor connected to it. This wasn't a problem with Ubuntu 16.04, but now, with 18.04, it is and it shows a black screen whenever I connect using VNC.
I've already created the virtual display using the answer to this question: https://unix.stackexchange.com/quest...output-to-xorg
Then I made a script that's executed bij Startup Applications:
#! /bin/bash
/usr/bin/xrandr -d :0 --output VIRTUAL1 --primary --auto
/usr/bin/xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
/usr/bin/xrandr --addmode VIRTUAL1 "1600x900_60.00"
After this, it still shows a black screen when I connect using VNC. BUT, when I run this with SSH:
$ export DISPLAY=:0
$ xrandr
After that, I can see my desktop in VNC... Any ideas on how to fix this? Also, when I see my desktop after all this, the dock is missing and all the icons are in the same spot.
[EDIT]
Adding the line /usr/bin/xrandr
at the end of my script made sure that VIRTUAL1
is active at reboot.
Dock is still missing though.
display vnc xrandr virtual dock
display vnc xrandr virtual dock
edited Sep 23 '18 at 12:00
abu_bua
3,28481026
3,28481026
asked Aug 1 '18 at 7:30
Stefan LemmensStefan Lemmens
736
736
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
To conclude: this is how I solved it:
I've created the virtual display using the answer to this question: https://unix.stackexchange.com/questions/378373/add-virtual-output-to-xorg
Create a 20-intel.conf file:
sudo vi /usr/share/X11/xorg.conf.d/20-intel.conf
Add the following configuration information into the file:
Section "Device"
Identifier "intelgpu0"
Driver "intel"
Option "VirtualHeads" "2"
EndSection
This tells the Intel GPU to create 2 virtual displays. You can change
the number of VirtualHeads to your needs.
Then I made a shell script (don't forget to set executable) and put that in Startup Applications:
#! /bin/bash
/usr/bin/xrandr -d :0 --output VIRTUAL1 --primary --auto
/usr/bin/xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
/usr/bin/xrandr --addmode VIRTUAL1 "1600x900_60.00"
/usr/bin/xrandr
That way, VIRTUAL1 is set as output and connected. At boot, a new mode (found using "cvt 1600 900") is being created and appointed to VIRTUAL1.
Only issue with this is: dock is missing at reboot... Haven't solved that yet.
Addkillall -3 gnome-shell
at the end to restart GNOME - it brings back the panel. The line--output VIRTUAL1 --primary --auto
seems to be not necessary for me, the--newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
gives errors, so I had to regenerate with cvt. Other thing is that the new screens are placed one alongside another by default.
– Velkan
Nov 26 '18 at 16:12
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%2f1061354%2fvnc-with-virtual-display-partly-solved-dock-missing%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
To conclude: this is how I solved it:
I've created the virtual display using the answer to this question: https://unix.stackexchange.com/questions/378373/add-virtual-output-to-xorg
Create a 20-intel.conf file:
sudo vi /usr/share/X11/xorg.conf.d/20-intel.conf
Add the following configuration information into the file:
Section "Device"
Identifier "intelgpu0"
Driver "intel"
Option "VirtualHeads" "2"
EndSection
This tells the Intel GPU to create 2 virtual displays. You can change
the number of VirtualHeads to your needs.
Then I made a shell script (don't forget to set executable) and put that in Startup Applications:
#! /bin/bash
/usr/bin/xrandr -d :0 --output VIRTUAL1 --primary --auto
/usr/bin/xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
/usr/bin/xrandr --addmode VIRTUAL1 "1600x900_60.00"
/usr/bin/xrandr
That way, VIRTUAL1 is set as output and connected. At boot, a new mode (found using "cvt 1600 900") is being created and appointed to VIRTUAL1.
Only issue with this is: dock is missing at reboot... Haven't solved that yet.
Addkillall -3 gnome-shell
at the end to restart GNOME - it brings back the panel. The line--output VIRTUAL1 --primary --auto
seems to be not necessary for me, the--newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
gives errors, so I had to regenerate with cvt. Other thing is that the new screens are placed one alongside another by default.
– Velkan
Nov 26 '18 at 16:12
add a comment |
To conclude: this is how I solved it:
I've created the virtual display using the answer to this question: https://unix.stackexchange.com/questions/378373/add-virtual-output-to-xorg
Create a 20-intel.conf file:
sudo vi /usr/share/X11/xorg.conf.d/20-intel.conf
Add the following configuration information into the file:
Section "Device"
Identifier "intelgpu0"
Driver "intel"
Option "VirtualHeads" "2"
EndSection
This tells the Intel GPU to create 2 virtual displays. You can change
the number of VirtualHeads to your needs.
Then I made a shell script (don't forget to set executable) and put that in Startup Applications:
#! /bin/bash
/usr/bin/xrandr -d :0 --output VIRTUAL1 --primary --auto
/usr/bin/xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
/usr/bin/xrandr --addmode VIRTUAL1 "1600x900_60.00"
/usr/bin/xrandr
That way, VIRTUAL1 is set as output and connected. At boot, a new mode (found using "cvt 1600 900") is being created and appointed to VIRTUAL1.
Only issue with this is: dock is missing at reboot... Haven't solved that yet.
Addkillall -3 gnome-shell
at the end to restart GNOME - it brings back the panel. The line--output VIRTUAL1 --primary --auto
seems to be not necessary for me, the--newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
gives errors, so I had to regenerate with cvt. Other thing is that the new screens are placed one alongside another by default.
– Velkan
Nov 26 '18 at 16:12
add a comment |
To conclude: this is how I solved it:
I've created the virtual display using the answer to this question: https://unix.stackexchange.com/questions/378373/add-virtual-output-to-xorg
Create a 20-intel.conf file:
sudo vi /usr/share/X11/xorg.conf.d/20-intel.conf
Add the following configuration information into the file:
Section "Device"
Identifier "intelgpu0"
Driver "intel"
Option "VirtualHeads" "2"
EndSection
This tells the Intel GPU to create 2 virtual displays. You can change
the number of VirtualHeads to your needs.
Then I made a shell script (don't forget to set executable) and put that in Startup Applications:
#! /bin/bash
/usr/bin/xrandr -d :0 --output VIRTUAL1 --primary --auto
/usr/bin/xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
/usr/bin/xrandr --addmode VIRTUAL1 "1600x900_60.00"
/usr/bin/xrandr
That way, VIRTUAL1 is set as output and connected. At boot, a new mode (found using "cvt 1600 900") is being created and appointed to VIRTUAL1.
Only issue with this is: dock is missing at reboot... Haven't solved that yet.
To conclude: this is how I solved it:
I've created the virtual display using the answer to this question: https://unix.stackexchange.com/questions/378373/add-virtual-output-to-xorg
Create a 20-intel.conf file:
sudo vi /usr/share/X11/xorg.conf.d/20-intel.conf
Add the following configuration information into the file:
Section "Device"
Identifier "intelgpu0"
Driver "intel"
Option "VirtualHeads" "2"
EndSection
This tells the Intel GPU to create 2 virtual displays. You can change
the number of VirtualHeads to your needs.
Then I made a shell script (don't forget to set executable) and put that in Startup Applications:
#! /bin/bash
/usr/bin/xrandr -d :0 --output VIRTUAL1 --primary --auto
/usr/bin/xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
/usr/bin/xrandr --addmode VIRTUAL1 "1600x900_60.00"
/usr/bin/xrandr
That way, VIRTUAL1 is set as output and connected. At boot, a new mode (found using "cvt 1600 900") is being created and appointed to VIRTUAL1.
Only issue with this is: dock is missing at reboot... Haven't solved that yet.
answered Aug 6 '18 at 13:46
Stefan LemmensStefan Lemmens
736
736
Addkillall -3 gnome-shell
at the end to restart GNOME - it brings back the panel. The line--output VIRTUAL1 --primary --auto
seems to be not necessary for me, the--newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
gives errors, so I had to regenerate with cvt. Other thing is that the new screens are placed one alongside another by default.
– Velkan
Nov 26 '18 at 16:12
add a comment |
Addkillall -3 gnome-shell
at the end to restart GNOME - it brings back the panel. The line--output VIRTUAL1 --primary --auto
seems to be not necessary for me, the--newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
gives errors, so I had to regenerate with cvt. Other thing is that the new screens are placed one alongside another by default.
– Velkan
Nov 26 '18 at 16:12
Add
killall -3 gnome-shell
at the end to restart GNOME - it brings back the panel. The line --output VIRTUAL1 --primary --auto
seems to be not necessary for me, the --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
gives errors, so I had to regenerate with cvt. Other thing is that the new screens are placed one alongside another by default.– Velkan
Nov 26 '18 at 16:12
Add
killall -3 gnome-shell
at the end to restart GNOME - it brings back the panel. The line --output VIRTUAL1 --primary --auto
seems to be not necessary for me, the --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
gives errors, so I had to regenerate with cvt. Other thing is that the new screens are placed one alongside another by default.– Velkan
Nov 26 '18 at 16:12
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%2f1061354%2fvnc-with-virtual-display-partly-solved-dock-missing%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