How can I start a VNC server session and immediately land up in KDE?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












This is the content of my ~/.vnc/xstartup file:



#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
/usr/bin/startkde &


My objective is to land up in KDE desktop environment. I start up the vnc session via ssh using the following command:



vncserver -geometry 1550x950


But I landed up in Gnome desktop. Anything obviously wrong in my configuration?



N.B: I am using Oracle Enterprise Linux 7.










share|improve this question

















  • 1




    What's in /etc/X11/xinit/xinitrc? what's in /etc/vnc/xstartup if it exists?
    – steeldriver
    Mar 9 '17 at 11:18















up vote
2
down vote

favorite












This is the content of my ~/.vnc/xstartup file:



#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
/usr/bin/startkde &


My objective is to land up in KDE desktop environment. I start up the vnc session via ssh using the following command:



vncserver -geometry 1550x950


But I landed up in Gnome desktop. Anything obviously wrong in my configuration?



N.B: I am using Oracle Enterprise Linux 7.










share|improve this question

















  • 1




    What's in /etc/X11/xinit/xinitrc? what's in /etc/vnc/xstartup if it exists?
    – steeldriver
    Mar 9 '17 at 11:18













up vote
2
down vote

favorite









up vote
2
down vote

favorite











This is the content of my ~/.vnc/xstartup file:



#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
/usr/bin/startkde &


My objective is to land up in KDE desktop environment. I start up the vnc session via ssh using the following command:



vncserver -geometry 1550x950


But I landed up in Gnome desktop. Anything obviously wrong in my configuration?



N.B: I am using Oracle Enterprise Linux 7.










share|improve this question













This is the content of my ~/.vnc/xstartup file:



#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
/usr/bin/startkde &


My objective is to land up in KDE desktop environment. I start up the vnc session via ssh using the following command:



vncserver -geometry 1550x950


But I landed up in Gnome desktop. Anything obviously wrong in my configuration?



N.B: I am using Oracle Enterprise Linux 7.







x11 kde vnc






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 9 '17 at 5:56









Geek

2,375103758




2,375103758







  • 1




    What's in /etc/X11/xinit/xinitrc? what's in /etc/vnc/xstartup if it exists?
    – steeldriver
    Mar 9 '17 at 11:18













  • 1




    What's in /etc/X11/xinit/xinitrc? what's in /etc/vnc/xstartup if it exists?
    – steeldriver
    Mar 9 '17 at 11:18








1




1




What's in /etc/X11/xinit/xinitrc? what's in /etc/vnc/xstartup if it exists?
– steeldriver
Mar 9 '17 at 11:18





What's in /etc/X11/xinit/xinitrc? what's in /etc/vnc/xstartup if it exists?
– steeldriver
Mar 9 '17 at 11:18











1 Answer
1






active

oldest

votes

















up vote
0
down vote













You run



exec /etc/X11/xinit/xinitrc


which tells the system "load /etc/X11/xinit/xinitrc, and overwrite this process by starting that program instead".



In essense, there are two possible outcomes from that:




  • /etc/X11/xinit/xinitrc cannot be started (because it doesn't exist, or it doesn't have the right permission bits, or whatnot). You get an error message. If you run your scripts with set -e, as you should, your script will also exit.


  • /etc/X11/xinit/xinitrc can be started. Your program ends, and xinitrc runs in its stead.

Assuming the former isn't the case, this means that your script is equivalent to:



#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc


...and nothing else.



if you want KDE instead of Gnome, you therefore have two options:



  1. drop the exec line. This is probably the easier option.

  2. Keep the exec line (but drop everything beyond it, for clarity), and configure your default X configuration so it starts KDE rather than gnome.





share|improve this answer
















  • 1




    How do I do this :"configure your default X configuration so it starts KDE rather than gnome."?
    – Geek
    Mar 13 '17 at 16:38










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f350167%2fhow-can-i-start-a-vnc-server-session-and-immediately-land-up-in-kde%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













You run



exec /etc/X11/xinit/xinitrc


which tells the system "load /etc/X11/xinit/xinitrc, and overwrite this process by starting that program instead".



In essense, there are two possible outcomes from that:




  • /etc/X11/xinit/xinitrc cannot be started (because it doesn't exist, or it doesn't have the right permission bits, or whatnot). You get an error message. If you run your scripts with set -e, as you should, your script will also exit.


  • /etc/X11/xinit/xinitrc can be started. Your program ends, and xinitrc runs in its stead.

Assuming the former isn't the case, this means that your script is equivalent to:



#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc


...and nothing else.



if you want KDE instead of Gnome, you therefore have two options:



  1. drop the exec line. This is probably the easier option.

  2. Keep the exec line (but drop everything beyond it, for clarity), and configure your default X configuration so it starts KDE rather than gnome.





share|improve this answer
















  • 1




    How do I do this :"configure your default X configuration so it starts KDE rather than gnome."?
    – Geek
    Mar 13 '17 at 16:38














up vote
0
down vote













You run



exec /etc/X11/xinit/xinitrc


which tells the system "load /etc/X11/xinit/xinitrc, and overwrite this process by starting that program instead".



In essense, there are two possible outcomes from that:




  • /etc/X11/xinit/xinitrc cannot be started (because it doesn't exist, or it doesn't have the right permission bits, or whatnot). You get an error message. If you run your scripts with set -e, as you should, your script will also exit.


  • /etc/X11/xinit/xinitrc can be started. Your program ends, and xinitrc runs in its stead.

Assuming the former isn't the case, this means that your script is equivalent to:



#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc


...and nothing else.



if you want KDE instead of Gnome, you therefore have two options:



  1. drop the exec line. This is probably the easier option.

  2. Keep the exec line (but drop everything beyond it, for clarity), and configure your default X configuration so it starts KDE rather than gnome.





share|improve this answer
















  • 1




    How do I do this :"configure your default X configuration so it starts KDE rather than gnome."?
    – Geek
    Mar 13 '17 at 16:38












up vote
0
down vote










up vote
0
down vote









You run



exec /etc/X11/xinit/xinitrc


which tells the system "load /etc/X11/xinit/xinitrc, and overwrite this process by starting that program instead".



In essense, there are two possible outcomes from that:




  • /etc/X11/xinit/xinitrc cannot be started (because it doesn't exist, or it doesn't have the right permission bits, or whatnot). You get an error message. If you run your scripts with set -e, as you should, your script will also exit.


  • /etc/X11/xinit/xinitrc can be started. Your program ends, and xinitrc runs in its stead.

Assuming the former isn't the case, this means that your script is equivalent to:



#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc


...and nothing else.



if you want KDE instead of Gnome, you therefore have two options:



  1. drop the exec line. This is probably the easier option.

  2. Keep the exec line (but drop everything beyond it, for clarity), and configure your default X configuration so it starts KDE rather than gnome.





share|improve this answer












You run



exec /etc/X11/xinit/xinitrc


which tells the system "load /etc/X11/xinit/xinitrc, and overwrite this process by starting that program instead".



In essense, there are two possible outcomes from that:




  • /etc/X11/xinit/xinitrc cannot be started (because it doesn't exist, or it doesn't have the right permission bits, or whatnot). You get an error message. If you run your scripts with set -e, as you should, your script will also exit.


  • /etc/X11/xinit/xinitrc can be started. Your program ends, and xinitrc runs in its stead.

Assuming the former isn't the case, this means that your script is equivalent to:



#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc


...and nothing else.



if you want KDE instead of Gnome, you therefore have two options:



  1. drop the exec line. This is probably the easier option.

  2. Keep the exec line (but drop everything beyond it, for clarity), and configure your default X configuration so it starts KDE rather than gnome.






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 9 '17 at 12:24









Wouter Verhelst

7,251831




7,251831







  • 1




    How do I do this :"configure your default X configuration so it starts KDE rather than gnome."?
    – Geek
    Mar 13 '17 at 16:38












  • 1




    How do I do this :"configure your default X configuration so it starts KDE rather than gnome."?
    – Geek
    Mar 13 '17 at 16:38







1




1




How do I do this :"configure your default X configuration so it starts KDE rather than gnome."?
– Geek
Mar 13 '17 at 16:38




How do I do this :"configure your default X configuration so it starts KDE rather than gnome."?
– Geek
Mar 13 '17 at 16:38

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f350167%2fhow-can-i-start-a-vnc-server-session-and-immediately-land-up-in-kde%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay