LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Saving xStartup ? Super-Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/saving-xstartup-super-newbie-859496/)

Junior13 01-29-2011 10:02 PM

Saving xStartup ? Super-Newbie
 
Ok, so I'm trying to edit my xstartup file right.....I do my changes and everything, but it never saves. How do i save it. When I'm SSH it only allows me to edit it, but doesn't allow me to save my changes! Please help!

frankbell 01-29-2011 10:24 PM

What distro? And what exactly is the file you are trying edit?

I've distro hopped a number of distros, and not yet run into a file named "xstartup." xorg.conf, but not "xstartup."

The more precise and detailed information you provide, the more likely someone can help you.

Also, generally, you must edit configuration files in /etc with root privileges on the local box. Often, user can open the files, but cannot save changes to them.

Junior13 01-29-2011 10:50 PM

It's CentOs 5.5....Im trying to set up VNC and i've installed Gnome. I need to edit the "XStartup" file in order for it to work.

Junior13 01-30-2011 12:43 AM

so after i finish editing my Xstartup File via "vi xstartup", how do i save my changes?

JoshyJ 01-30-2011 12:56 AM

Quote:

Originally Posted by Junior13 (Post 4242087)
so after i finish editing my Xstartup File via "vi xstartup", how do i save my changes?

Try ":wq", this should save and quit editing the file. But only if you have permissions to do so.

Junior13 01-30-2011 01:09 AM

#!/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" & startx & ~
~
~
~
~
~
~
~
~
~
~
~
-- INSERT --


Okay so im stuck on this, i finished editing, what do i do next? I how do i get out off insert and be able to type the ":wq" command?

Junior13 01-30-2011 01:12 AM

Quote:

Originally Posted by JoshyJ (Post 4242093)
Try ":wq", this should save and quit editing the file. But only if you have permissions to do so.

THANKS SO MUCH, without that little code i would of never got this to work! THANKS!


All times are GMT -5. The time now is 04:21 AM.