Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 31st January 2006, 06:13 AM
Bachmann Offline
Registered User
 
Join Date: Nov 2005
Age: 26
Posts: 123
vnc loading wrong window manager

Hey,

I have been using vnc to connect to my computer. I use xfce as my default window manager. I recently reinstalled fedora and even though xfce is my default window manager when I connect to my vncserver kde loads, I love xfce and kde is not the best for vnc so I would like to fix this.

Here is my xstartup in my .vnc folder

Code:
#!/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 &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
now I imagine that this is the offending code which loads kde

Code:
#!/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 &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
[Bachmann@localhost ~]$ nano /etc/X11/xinit/xinitrc
[Bachmann@localhost ~]$ cat /etc/X11/xinit/xinitrc
#!/bin/sh
# Copyright (C) 1999 - 2004 Red Hat, Inc. All rights reserved. This
# copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the
# GNU General Public License version 2.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

# Mandatorily source xinitrc-common, which is common code shared between the
# Xsession and xinitrc scripts which has been factored out to avoid duplication
. /etc/X11/xinit/xinitrc-common

# The user may have their own clients they want to run.  If they don't,
# fall back to system defaults.
if [ -f $HOME/.Xclients ]; then
        exec $DBUS_LAUNCH $HOME/.Xclients || \
        exec $HOME/.Xclients
elif [ -f /etc/X11/xinit/Xclients ]; then
        exec $DBUS_LAUNCH /etc/X11/xinit/Xclients || \
        exec /etc/X11/xinit/Xclients
else
       # failsafe settings.  Although we should never get here
       # (we provide fallbacks in Xclients as well) it can't hurt.
       xclock -geometry 100x100-5+5 &
       xterm -geometry 80x50-50+150 &

       if [ -x /usr/X11R6/bin/twm ]; then
               exec /usr/X11R6/bin/twm
       fi
fi
this code points to this

Code:
#!/bin/bash
# Copyright (C) 1999 - 2004 Red Hat, Inc. All rights reserved. This
# copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the
# GNU General Public License version 2.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

GSESSION="$(which gnome-session 2>/dev/null)"
STARTKDE="$(which startkde 2>/dev/null)"

# check to see if the user has a preferred desktop
PREFERRED=
if [ -f /etc/sysconfig/desktop ]; then
    . /etc/sysconfig/desktop
    if [ "$DESKTOP" = "GNOME" ]; then
        PREFERRED="$GSESSION"
    elif [ "$DESKTOP" = "KDE" ]; then
        PREFERRED="$STARTKDE"
    fi
fi

if [ -n "$PREFERRED" ]; then
    exec "$PREFERRED"
fi

# now if we can reach here, either no desktop file was present,
# or the desktop requested is not installed.

# by default, we run GNOME.
if [ -n "$GSESSION" ]; then
    exec "$GSESSION"
fi

# if GNOME isn't installed, try KDE.
if [ -n "$STARTKDE" ]; then
    exec "$STARTKDE"
fi

# Failsafe.

# these files are left sitting around by TheNextLevel.
rm -f $HOME/Xrootenv.0

# Argh! Nothing good is installed. Fall back to twm
{
    # gosh, neither fvwm95 nor fvwm2 is available;
    # fall back to failsafe settings
    if [ -x /usr/bin/xclock ] ; then
        /usr/bin/xclock -geometry 100x100-5+5 &
    elif [ -x /usr/X11R6/bin/xclock ] ; then
        /usr/X11R6/bin/xclock -geometry 100x100-5+5 &
    fi
    if [ -x /usr/bin/xterm ] ; then
        /usr/bin/xterm -geometry 80x50-50+150 &
    fi
    if [ -x /usr/bin/mozilla -a -f /usr/share/doc/HTML/index.html ]; then
        /usr/bin/mozilla /usr/share/doc/HTML/index.html &
    fi
    if [ -x /usr/X11R6/bin/twm ] ; then
        exec /usr/X11R6/bin/twm
    fi
}
I imagine that the solution to my problem is in editing one of these scripts/confs I just do not know about bash scripting/XFCE startup to know how.

I am open to solutions that dont touch any of this though

Thanks!
Reply With Quote
  #2  
Old 31st January 2006, 03:54 PM
wstahw's Avatar
wstahw Offline
Registered User
 
Join Date: Jun 2005
Location: Xi'an, China
Posts: 37
The next script should start twm; I just commented out the bold lines.
If you want another window manager than twm replace the last line by your window manager.
You should also restart the vncserver.
Good luck! I did not test it, but it seems evident.

Code:
#!/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 &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
Reply With Quote
  #3  
Old 1st February 2006, 05:38 AM
Bachmann Offline
Registered User
 
Join Date: Nov 2005
Age: 26
Posts: 123
lol, looks like I was just looking too deep into it

worked perfectly, thanks!
Reply With Quote
Reply

Tags
loading, manager, vnc, window, wrong

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Window manager gone wrong? nuffmon Using Fedora 1 1st July 2008 11:27 PM
X Window is loading instead of Gnome colinzeal109 Using Fedora 3 21st February 2008 09:25 PM
Can I run a Display Manager and Window Manager without running X? Lister Using Fedora 0 21st September 2006 09:43 AM
wrong player loading slvrsrfr Using Fedora 0 21st May 2006 02:39 PM
wrong kernel loading after update Stlgera Using Fedora 1 23rd December 2005 02:50 PM


Current GMT-time: 23:31 (Tuesday, 18-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat