Link to home
Start Free TrialLog in
Avatar of rtod2
rtod2Flag for United States of America

asked on

gnome-session error in cygwin over ssh

I get the gnome-session with no problem but this error happens as well.  Is there any way to resolve it?

http://drop.io/nyiaeyw
Avatar of Kerem ERSOY
Kerem ERSOY

I guess your problem there is related to your first problem of getting no xauth data. Please fix that problem first as I've suggested (using ssh -Y instead of ssh -X) and lets check it once more.

There's another problem that your repository for updates are not reachable through internet is it a close system placed on intranet?

Other problem is IPP problem. Do you really need to use IPP prtocol (printing over IP) and bluetooth device attachment with your CentOS?
Avatar of rtod2

ASKER

You said, "                Was this comment helpful?                         Yes               No                                 KeremE:             I guess your problem there is related to your first problem of getting no xauth data. Please fix that problem first as I've suggested (using ssh -Y instead of ssh -X) and lets check it once more. "

I'll try your suggestion about resolving the xauth data in the other post by choosing -Y over -X when I get back to work and see if that resolves it.  

You also said "There's another problem that your repository for updates are not reachable through internet is it a close system placed on intranet?"

Yes, it is in the intranet at the company I work for.

You also said "Other problem is IPP problem. Do you really need to use IPP prtocol (printing over IP) and bluetooth device attachment with your CentOS?"

That is interesting.  I will likely set up printers for the CentOS boxes later on but bluetooth is certainly not needed.  Neither is printing at this stage.
"
> You also said "There's another problem that your repository for updates are not reachable through
> internet is it a close system placed on intranet?"
>
>Yes, it is in the intranet at the company I work for.

So you'd either allow access to update databases for these systems or you need to place an internal update repository server which will download the patches and make available to your CentOS hosts. We might even need some updates during the solution of the problems you're having.


> You also said "Other problem is IPP problem. Do you really need to use IPP prtocol (printing over IP) and
> bluetooth device attachment with your CentOS?"
>
> That is interesting.  I will likely set up printers for the CentOS boxes later on but bluetooth is certainly not > needed.  Neither is printing at this stage.

Ok then the errors should not bother you. Lets correct the4 xauth thing first. we'll concetrate on these issues later.
Avatar of rtod2

ASKER

To correct the xauth thing, you are suggesting ssh ...-Y instead of -X correct?  Does that just suppress the error or resolve it?
It allows the xauth in CygWin to communicate with your X server. So it fixes does not suppress.

Excerpt from ssh man pages.

     -Y      Enables trusted X11 forwarding.

 


Avatar of rtod2

ASKER

excellent!
Avatar of rtod2

ASKER

ssh -Y used which did appear to get past a portion of the error but still get no auth data.  See screenshot

ssh--y-followed-by-gnome-session.png
Hi

The real problem was Xauth not working. Now it works. As you would notice it is a warning. If you think this is unacceptable you need to setup xauth on your CygWin and X system. If this is what you really want to do I'll help you to setup one but I'll suggest you to check:
man xauth

Cheers,
K.
will you post the output from
xauth list

after you've logon to your X session ?
Avatar of rtod2

ASKER

OK, the idea is to have the server side require as little configuration as possible.  If not having xauth data is unimportant then I am fine.  What about the other IPP and debus warning shown screenshot?
Avatar of rtod2

ASKER

When trying to do this through xming a long time ago, I remember an option to use 'host based' as opposed to server based authentication.  Could something similar apply here?
in fact it seems that there's an issue with our gdm (linux side) can not read / write your .xauth  file. This is why I've asked the outpu t of your .xaut list output here.

we're not authenticating to CygWin site. IT uses the authentication from the XP so tit does not apply here.
Avatar of rtod2

ASKER

how would I provide this ".xauth list output" ??
Avatar of rtod2

ASKER

Attached is the xauth list data.  I did some searching through my notes regarding authentication for xming some months back and found that we used a switch to change to 'host based' authentication.  It turns out that I have a note that says "resolution for magic cookie error".   Since cygwin is different, I don't know how to resolve it here.

xauth-list.png
So since you have your session cookie correctly placed in the file and you're able to access your system without a problem.

Don't forget that this is a warning. IO am suspecting that this warning is because your Linux system is not properly configured. Since it does not a hostname the server name is localhost.localdomain (which is default and meant to be changed later))

Please follow this procedure:
- just give a name to your system and then edit your /etc/sysconfig/network
Locate the line:
HOSTNAME=
and add a hostname to it just like:
HOSTNAME=r2d2.company.sec

(.sec is a domain not assigned by IANA as a TLD so you're only one of a kind to have this domain so it is a ggod practice to use some TLD such as this or .local to prevent a clash with a real domain in the future)

ave and exit.

- Edit your  /etc/hosts and add you hostname there keep the first line 127.0.0.1 such as the example:

127.0.0.1       localhost.comapny.sec localhost
eth0.ip.addr        r2d2.company.sec r2d2

save exit reboot and retry.

Please do that for all your Linux systems. RedHAT and thus CentOS add an alias with hostname to the localhost and this might cause problems of this kind. Becasue localhost (=127.0.0.1) only visible from the local machine and can keep a program from communicating properly if it is listening to localhost.So modify the /etc/hosts for  all your systems. Though this conversation is heading outside the initial topic but I think this is the casue of the warning while it is harmless.

Avatar of rtod2

ASKER

both etc/hosts and /etc/sysconfig/network do appear to be set correctly.
But your target system (Which you'd sent the output to display xauth data) shows its hostname as loclahost.localdomain. Just see the screen you've posted on comment ID: 24479256
Avatar of rtod2

ASKER

Both work and home give the same warnings  Here is the xauth list data though at work, which is slightly different.

http://drop.io/gtkpgxb 
Are you sure you've xauth installed in CygWIN ??

Go to CygWin setup setup and make sure xuath is installed under X11 filesests.

I don't want to make an issue about the Warning it is a Warning only.

The reason I've broght about this localhost issue was not about CygWin. It was just to warn you against some bad practice that I know causing some problems in the long-run.

If everything on Cygwin site is ok the text window must have a text like that 1nce you've launched X

xauth:  creating new authority file /cygdrive/c/Documents and Settings/user/.serverauth.7932
What is the latest on the issue ? Did you check xauth thing ?
Avatar of rtod2

ASKER

I did.  No luck so far.  xauth is installed.
If you want to correct the issue regardless of this is a waning and will not cause your system to malfunction though I don't see no point try to go int bits and bytes :) instead of running your server to do your j1b :)

This is being said: lets  do this: Post here the output of this command:

ls -al /var/run/gdm

if it is wrxw-xw-t execute this command : chmod +x /var/run/gdm

and retry to start Cygwin X.
did you see this output on your CyGWin ??

xauth:  creating new authority file /cygdrive/c/Documents and Settings/user/.serverauth.7932
anybody home ?
Avatar of rtod2

ASKER

This looks like 4 run-on sentences to me ("If you want to correct the issue regardless of this is a waning and will not cause your system to malfunction though I don't see no point try to go int bits and bytes instead of running your server to do your j1b").   I am not trying to be sarcastic, but rather trying to understand.
Yeah but the problem is you don't cooperate. I am asking about settings you have :

ID: 24499427
> If everything on Cygwin site is ok the text window must have a text like that 1nce you've launched X
> xauth:  creating new authority file /cygdrive/c/Documents and Settings/user/.serverauth.7932

 ID: 24522382      
>If you want to correct the issue regardless of this is a waning and will not cause your system to >malfunction though I don't see no point try to go int bits and bytes :) instead of running your server to >do your j1b :)
>This is being said: lets  do this: Post here the output of this command:
>ls -al /var/run/gdm
>if it is wrxw-xw-t execute this command : chmod +x /var/run/gdm
>and retry to start Cygwin X.

ID: 24522649
> did you see this output on your CyGWin ??
> xauth:  creating new authority file /cygdrive/c/Documents and Settings/user/.serverauth.7932

that I could not get any answer. How do you expect me to help you when you don't cooperate. Also my initial comment "using -Y instead of -X" helped you to logon.  The rest is a warning condition. If you are willing to understand why this happens you need to be a bit more responsive.
Avatar of rtod2

ASKER

I am cooperating and appreciate your help.  I often don't have time to dive back into this.  That is my problem, not yours.  I also cannot clearly understand what you are asking.  Thank you again for your assistance.

In the /cygdrive on my windows box, which is c for me, I can locate the user folder (named by my username), but cannot find anything called .serverauth.7932.

If I do a search of the entire Windows system for serverauth, I do not get anything back.

I have re-downloaded cygwin, confirming that all necessary components (including xauth) are installed.
> In the /cygdrive on my windows box, which is c for me, I can locate the user folder (named by my
> username), but cannot find anything called .serverauth.7932.

Ok let me rephrase it:
I assume that you're
- Launching "cygwin bash shell"
- When the console window appears and you have your cursor. I assume that you start your X session using a command like "startx"
- While the X session starts in another window the initial console window must be displaying some text like:

xauth:  creating new authority file /cygdrive/c/Documents and Settings/username/.serverauth.xxxxx

Where username is your username and xxxxx = is a random number.

This will tell us that xauth kicked in and created a session cookie for us so the remote sessin does not need to create one with us.

What I am asking is the text in the initial CygWin Console. Since there may be some other .session.yyyy files under the Cygwin Home which is c:\Documents and Settings\username but there are stale files from an older session.

Can you tell me do you see this type of a message in the CygWin console window ??


Avatar of rtod2

ASKER

Thank you for the explanation. I type the following:

  • bash --login -i (run from within cygwin.bat which brings up the black console window)  
  • xinit
  • xhost +
  • ssh -X root@server
followed by 'gnome-session' or whatever

If I understand you correctly, you are asking to clarify what messages I get back.  

The messages were:
   1.  The one posted here http://drop.io/gtkpgxb/asset/magic-cookie-work-png from earlier.
   2.  This message appears to have gotten magically ?better,  and is posted here http://drop.io/hculwfc

If by "console window", you mean the black window behind the "session window" (terminology?), then it contains simply the initial xinit command and nothing else.
   * bash --login -i (run from within cygwin.bat which brings up the black console window)  
OK

    * xinit
OK
 
    * xhost +
You don't need it since we're directing hosts over SSH and you don't need to allow X sessions. Besides it is a bad practice to allow any connection.
 
    * ssh -X root@server  

You would remember that initallly I'd suggested you to use:

ssh -Y root@server

instead of ssh -X. The reason was -Y was allowing trusted forwarding  (hence eliminating any session cookie problems etc)

> If by "console window", you mean the black window behind the "session window" (terminology?),
>  then it contains simply the initial xinit command and nothing else.

Yeah will you please send me the contents of the window with the title "Cygwin Bash Shell".

I'm posting mine for your reference.





cygwin.jpg
Avatar of rtod2

ASKER

Thank you very much for those reminders.  We even eliminated a step.  That's fantastic!

Here are both screens together.  The errors in the session window are smudged for clarity.
Please use "startx" instead of "xinit" it is clear that xinit dos not run xauth.
dos = does :)
You see even the slightest detail counts:

> When the console window appears and you have your cursor. I assume that you start your X session
> using a command like "startx"

You've told init and I had thought they were interchangeable but as you see they are not :)
Avatar of rtod2

ASKER

um, I'm unclear again.  I don't want "all" those windows multiple times.  Just the gnome desktop
Avatar of rtod2

ASKER

To recap, how do I modify the following to give me the gnome desktop.  Maybe one prompt with a scroll bar and all history saved on exit, to a log file on the cygwin drive would be great.  That is way down the road though in a subsequent post.  For now, just the gnome desktop would be enough.

So far, the following brings up too much weirdness:
  • bash --login -i
  • startx
  • ssh -Y root@server
startx and xinit has no difference in lanching. It won't give you multiple windows. It just runs some other init scripts which runs xauth that's it

yeah just put startx in:

.bash_profile

The rest should go into:

.xinitrc

but I'll sugeest you to look at manual bfore launching ssh


Avatar of rtod2

ASKER

At this stage, I don't understand much of what is written there.  I am not sure I even understand completely what you wrote.

Does this...
  • bash --login -i
  • startx
  • ssh -Y root@server  
Simply become this?
  • bash --login -i startx
  • ssh -Y root@server  
I don't want the weirdness that came up before (screenshot: http://drop.io/lflv5lu)

> Does this...
>
>    * bash --login -i  
>    * startx  
>    * ssh -Y root@server  
>
> Simply become this?
>
>   * bash --login -i startx
>    * ssh -Y root@server

No it won't. The explanation is: bash --login -i
is executed through the windows shell. While startx executed by bash shell.
since the execution starts the X the rest will not be executed until the X ends. So the correct place is:
- bash. --login -i     should be executed by CygWin.bat
- startx should be executed by $HOME/.profile
- ssh should be executed by $HOME/xinitrc

Because there are 3 different shell layers.

> I don't want the weirdness that came up before (screenshot: http://drop.io/lflv5lu)

You insist about that but you won't. This beavaviour is caused by --multiwindow switch to the startx command. But this switch is supplied in /usr/bin/startxwin.bat which is executed through

Start > All Programs > Cygwin-X > X-Win server

In fact I had told you about this in a previous tread that you've accepted.

You can check it by clicking the icon. I am attaching a screenshot.  

   
XWin-Server.jpg
xwin-multiwin.jpg
I had previously told you that this behaviour was caused by -multiwindow switch in another tread:

https://www.experts-exchange.com/questions/24406642/CYGWIN-to-CentOS-GDM-over-ssh-or-ssh2.html

Message ID: 24419493

Also please note that the screenshot I've sent you which is showing the correct operation of xauth at cygwin side was produced through startx.

All in all multiwindow behavious is not depend on whether you suse startx or xinit. It depends on the the presence of the switch "-multiwindow".

startx and xinit have different initialization files. The suggested way to start X thrugh xwin is either through XWin.bat or startx command not xinit.


Cheers,
K.

      
Ooops sorry XWin.exe not XWin bat  (which is linked directly to startx)
Avatar of rtod2

ASKER

I don't see the need for the sarcasm in the "as I told you before" comment.  I did not try to use -multiwindow switches as I recall though it does look like your startxwin.bat uses it.  I should have looked closer at your screenshot before posting.  I have not been successful at understanding and implementing your suggestions thus far.  Please understand that I am trying your suggestions and I thank you for hanging in there with me.

I just tried running the X Server icon which links to run.exe with a subsequent call the XWin.bat.  I removed the multi-window line from the XWin.bat and did manage to get the gnome session despite an additional error talking about the escape key.  Just as with Xinit though, I got similar errors.  This try was at home instead of at work.  There appears to be little difference.


del-error-with-X-Server.png
I see no sarcasm here. After I've reminded you that how did it happen last time you're still saying that my startx is different than yours.

And I am afraid the reason you can't succeed about what I say is your style. I am repeatedly telling you to use startx instead of xinit. But you're obsessesed with -multiwindow thing and you don't apply.

Since you don't want to see multiwindow again I am trying to assure you that it would only happen when you start X-Win with -multiwindow switch or through the CygWin-X and even including the screenshots how starting X through CygWin-X and you even then keep starting your windows with xinit.

I am telling you your porblem is: You start your x session through xinit but not startx. startx won't cause you to have multiwindows options on when run. This is not the default beaheviour !!!

So start your X session with startx and please be assured that I am not trying to be sarcastic.
   

Avatar of rtod2

ASKER

that is what I thought I was doing but running x server as you suggested above.

When I get to work, I will try the following steps.
1. I will look for a file called startx and click on it if I find it.
2. I will run ssh -Y root@servername
3. I will type gnome-session

I will look at the output and respond with the results.  Thank you again for your assistance.
> When I get to work, I will try the following steps.
> 1. I will look for a file called startx and click on it if I find it.

you don't need to find and click you'll be in the command shelll you just type startx instead of xinit on the command line.
Click Start > All Programs > Cygwin Bash Shell and when you get your shell text screen with your prompt type "starts" it will launch the x server.

2. I will run ssh -Y root@servername

Once it launches the X and places you on bash prompt just type "ssh -Y user@server" you don't need "xhost +"
 
3. I will type gnome-session

Yup you've already running it. If you follow these steps you should not see "waning ... Magic cookie"
This warning has benn there because xinit you used to use does not launch xauth while startx does.

I hope all will be straight and OK for you.

Cheers,
K.
Avatar of rtod2

ASKER

OK,
1. I clicked the default cygwin.bat
2. I ran ssh -Y root@server
3. I typed gnome-session

What I get back does not contain any errors but is not gnome desktop in the manner I am accustomed to looking at it.  Multiple xterm sessions are opened, and the top panel, bottom panel, desktop, all separate from eachother, rather than being one cohesive unit.

That is to say that while startx does not produce the errors that xinit does, it creates a disconnected desktop that is even more of a problem than the errors are.

This is why I'm directing you to use "startx" instead of the bat. If you check inside the .bat you'll see it has several options. If you don't like this behaviour edit the cygwin.bat and remove the options you don't like or just start the X typeing startx in the prompt instead of launching it through .bat file.
It is not hte problem of the startx. It is that launching it through .bat file causes several switches including -multiwindow is suplplied in .bat files.

But I really don't understand why do you resist too much to start the X session through startx. As I told you'll either edit each batch file and remove the -multiwindow switches from the options and start through .bat files or you'll start your X session through "startx" in bash prompt.

The key to your answer is: Launching X through startx and make sure that no -multiwindow switches supplied to it during the launch.

This will ensure the correct operation while allowing xauth to be run prior to X
Here is the proof that xinit causes the session cookie problem. I am attaching 2 screenshots. One of them was previously posted in this tread the second is the one I've just created. Please find them for your reference.
xinit.jpg
cygwin.jpg
If you want to automatically start X and SSH when launching CygWin you need to modify two files:
- edit $HOME/.profile and place this line in it:
startx
- edit $HOME/.xinitrc and add this line in it as the only exec line at the bottom of the file:
exec xterm -e ssh -Y user@host

Avatar of rtod2

ASKER

As I have stated several times, I have no issues with startx if it will work for me and have repeatedly experimented with it trying to achieve a positive outcome.  I appreciate your help but I keep telling you the steps I am going to take and I am having trouble with all the change this, change that stuff.  I've tried to pick it apart with you.  I still get either the errors, or the multiple windows, one way or the other.  So before I try yet again, with another change, let us re-paste the specific actions required to achieve the more positive outcome.

OBJECTIVE:  a single gnome session window with all of it's pieces attached, and no errors.

The latest steps that I tried to compile from your instructions, produced multiple windows.  They are as follows:
1. I clicked the default cygwin.bat
2. I ran ssh -Y root@server
3. I typed gnome-session

Now if I understand you correctly, you want me to change that and run the startx directly bypassing the bat file.  This means I will:
1. Click what file to bring up the initial session ???  
2. type startx
3. type ssh -Y root@server
4. type gnome-session

I'll await your response, correct the steps per your instructions, and re-paste them before trying it again.

Yeah exactly what I am trying to tell is do't run any batch file in some way or another CygWin has been designed to run the required batch through related commands when required. So you don't need to run specific batch files.

All I want you to do is this:

- Click Start > All Programs >  Cygwin > Cygwin Bash Shell

Now you will be on the terminal screen (Command screen) with your bash prompt. In fact this step automatically runs the cygwin.bat. So you don't need to call it exclusively

- Type startx and launch your Logal Cygwin X server. startx will run xauth as the part of its initialization.

- X Server opens an xterm window. and bash prompt. Enter:
ssh -Y root@server

and you'll be asked the password and you'll be logged on to your remote account with X screen redirected to your local CygWin X Server. You must see no Xauh warning since startx handles it

Type:

gnomome-session &

and you should have remote gnome session now.

Avatar of rtod2

ASKER

OK so far I have:
  1. click cygwin.bat (via clicking on start > all programs > cygwin > cygwin bash shell)
  2. type startx
  3. type ssh -Y root@server
  4. type gnome-session &


These are the correct steps. Please proceed to execute them and let me know.
Avatar of rtod2

ASKER

OK, to restate...

OBJECTIVE:  a single gnome session window with all of it's pieces attached, and no errors.

STEPS TAKEN:
  1. click cygwin.bat (via programs icon > cygwin > cygwin bash shell)
  2. type startx
  3. type ssh -Y root@server
  4. type gnome-session & 
RESULT:  The result  was the gnome desktop in separated pieces where I had to click separately to drop each piece, and then clic to minimize each piece to end up with it the way you see it in the attached screenshot.



del-multiple-windows.png
Ok I got your problem. This is a different behaviour than the previous multivindow issue. This is because your startx is launching another window manager before gnome so it takes precedence.

Please terminate your CygWin X session now before continuing.

Edit the $HOME/.xinitrc  file located in your CygWin X host

- Find the line that reads

twm

and replace it with

# twm

save & exit restart Cygwin X and it should be correct now.

Avatar of rtod2

ASKER

I don't understand where the $HOME/.xinitrc file is.

We are talking about the windows or centos box in my case?

I do a search and don't find it.
Avatar of rtod2

ASKER

Off to dinner.  Thank you for hanging in there with me.
The file is called .xinitrc and located in home folder of your cygwin installtion. Which is C:\Documents and Settings\user
Here $HOME represents your home folder which is the default folder you've been placed under when you launch "cygwin bash shell"
Avatar of rtod2

ASKER

I installed cygwin on my Vista computer here.  I installed it into the same directory though as that of the one at work.  It is in c:\cygwin\home\me\ no file named that

del-home-folder.png
Avatar of rtod2

ASKER

I don't see the file there in the above screenshot
Then you are missnig the file. I'm sending a copy for you.
 
- Add this file under your home directory.
- Launch "Cygwin bash shell"
- execute this command:
cp xinitrc.txt .xinitrc
- launch startx
Here's the file:
xinitrc.txt
Avatar of rtod2

ASKER

The problem is that I am trying to develop an enterprise solution.  If the files don't appear during the install then I need to figure out how to get them there.  That file only has a single line that is commented out ??
> The problem is that I am trying to develop an enterprise solution. The problem is that I am trying to develop an enterprise solution.  If the files don't appear during the install then I need to figure out how to get them there.  

The file is normally there I have no idea why are you missing the file.

> That file only has a single line that is commented out ??
Nope but since Linux terminates lines with a LF instead of CR+LF notepad will see it all a single line. Try to use WordPad or similar to view the file the file contetnts is:

#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
 
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
 
# merge in defaults and keymaps
 
if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi
 
if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi
 
if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi
 
if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi
 
# start some nice programs
 
# twm &
# xclock -geometry 50x50-1+1 &
# xterm -geometry 80x50+494+51 &
# xterm -geometry 80x20+494-0 &
 
exec xterm -geometry 132x60+0+0 -name login
#exec xterm -e ssh -Y root@10.0.0.1

Open in new window

As you see this is standard file installed by CygWin. As I told you earlier I have no idea why is it missing from your installation.
Avatar of rtod2

ASKER

<!--[if gte mso 9]>   Normal  0          false  false  false    EN-US  X-NONE  X-NONE                                                                          <![endif]--><!--[if gte mso 9]>                                                                                                                                                                                                                                                                                    <![endif]--><!--[if gte mso 10]><![endif]-->Hmm,  perhaps I missed it during the selection of packages.  I just removed cygwin and ran the install using the v1.7 beta.   I have always selected the following packages.   I'll have another look at the XP machine at work and see if it contains the
·         <!--[endif]-->Net packages
<!--[if !supportLists]-->a.       <!--[endif]-->inetutils
<!--[if !supportLists]-->b.       <!--[endif]-->openssh (should auto-select openssl, and others)
<!--[if !supportLists]-->c.       <!--[endif]-->openssl097

<!--[if !supportLists]-->·         <!--[endif]-->X-11 packages
<!--[if !supportLists]-->a.       <!--[endif]-->X-start-menu-icons (should auto-select xauth, xinit,xorg-server, xterm, and others)
<!--[if !supportLists]-->b.       <!--[endif]-->font-adobe (all)
<!--[if !supportLists]-->c.       <!--[endif]-->font-alias
<!--[if !supportLists]-->d.       <!--[endif]-->twm
<!--[if !supportLists]-->e.       <!--[endif]-->xclipboard
<!--[if !supportLists]-->f.        <!--[endif]-->xclock
<!--[if !supportLists]-->g.       <!--[endif]-->xeyes
<!--[if !supportLists]-->h.       <!--[endif]-->xhost
<!--[if !supportLists]-->i.        <!--[endif]-->xorg-docs
Could it be part of something that isn't listed here?

Incidently, I did find an xinitrc in the path C:\cygwin\etc\X11\xinit.  Could that be it?
Avatar of rtod2

ASKER

BAD post above

I did find an xinitrc in the path C:\cygwin\etc\X11\xinit.  Could that be it?
It is the systemwide xinitrc. It will effect each every user who uses X. If it is what you want go and edit it (it is actually the unmodified form of the file I'd sent you just check the file headr info and see for yourself).

My modified file:
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

The preferred method is to copy it to your home directory as .xinitrc and modify it. Not the systemwide file. I've sent you the properly modified version which also included an automated ssh command and just commented it.
Avatar of rtod2

ASKER

Using the copy command above, I get a permissions error stating that it cannot copy.  I set permissions to the entire folder 'everyone full control'.   This is using the Vista computer at home.
the permission error you've got belongs to cygwin not windows. So please try to execute

chmod +r xinitrc.txt

before the cp command. If you want you can post "ls -al" output here and we'll lok at it together.
 

Avatar of rtod2

ASKER

hi,

The firest line says there's no file called .xinitrc under /etc/X11/ninit. The problem there is the system-wide file's name is "xinitrc" while the file under user home is called ".xinitrc"


so the correct command to execute is:
cp /etc/X11/xinit/xinitrc "$HOME/.xinitrc"

Since it is a systemwide file the perimissions are already set. you don't need to set permissions forit.

edit it and coment the twmc &  lines.

But if you want to go with my example including the txt file:

- Download the file to your computer
- Copy the file under your home directory (C:\cygwin\home\username)
- Go to your CygWin prompt
- Execute ls -al xinitrc.txt and make sure the file is ther. Also post the result here.
- if the file exists then use the mv command :
mv xinitrc.txt .xinitrc

Avatar of rtod2

ASKER

I commented out the twm with #twm.  Edits are possible to that global xinitrc file as you suggested.  Since I did not make vi part of cygwin, I used wordpad to make that single character edit.  attached is the result.

del---causing-errors.png
The errror was caused by the use of Notepad. As I told earlier Windows uses CR+LF to terminate a line while Unix prefers LF. Never edit Unix files with windows programs. The \r stands for CR (Character 13). To clean the file from these unwanted characters:
- cd /etc/X11/xinit
- execute this command
tr -d \r <xinitrc >xinitrc.org
mv xinitrc.org xinitrc


This is why I don't like to modify the system wide file once you make mistakes you won't have any backup. My suggestions may not seem the simplest at first but please don't forget that I have nearly 30 years of experience in the field. This was why I'd suggested you to use a copy the file under your home directory under the name ".xinitrc" using the command:

cp /etc/X11/xinit/xinitrc "$HOME/.xinitrc"

Please use it as I've posted here including double quotes.


Please apply my instructions without modifications.

Avatar of rtod2

ASKER

Excellent!  Thank you for the line: tr -d \r <xinitrc >xinitrc.org
That is very useful and alot of different task specific syntax in a command.  Off-topic for one post...

Can you tell me 'just in this case' what the following mean:
tr
-d
/r

?
tr is a command. Abbreviation of Translate. It  filters out or replace some content from a file.
-d stands for delete.
\r (backslash r = CR = Char 13)

Avatar of rtod2

ASKER

thanks for that explaination, exceptional!

I tried doing that and the command was accepted, the move worked,

example-remove-char-13--translat.png
tr -d "\r" < infile > outfile

Your platform needs double quotes before the backslash.

But it seems that there's more for line 52. Clean the file with the command and post the file here. BTW it will be helpful if you get vi to edit it.
> But it seems that there's more for line 52. Clean the file with the command and post the file here. BTW it
> will be helpful if you get vi to edit it.

My previous posting ID: 24564771
      
Avatar of rtod2

ASKER

Speaking of vi, and as you can imagine based on my questions about linux in general, I am horrible at it.  I have the charts but absolutely hate having to reference them.  It seems like there would be a vi tutor out there much like there are typing tutors.  Any recommendations?  Anyway, attached is the file.

xinitrc
Hi,

It seesm that the previous run has removed all "r" letters in the configuration. I'm sending you the default /etc/X11/xinit/xinitrc

- move the file to your cygwin home
- Launch "CygWin Bash Shell"
- copy it under /etc/X11/xinit/xinitrc with thiscommand
cp xinitrc1.txt /etc/X11/xinit/xinitrc
cp xinitrc1.txt .xinitrc
- Edit the .xinitrc with your text editor in Cygwin
- Comment the twmc &
- Save Exit
- start X via startx
- You can use any text editor of your choice. It can be an easy-to-use editor like joe or pico they are all avaliable through Cygwin Setup under "editors"
Downlaod the file and copy it to your home.
xinitrc1.txt
Avatar of rtod2

ASKER

say I wanted to use the editor joe or pico that are in cygwin

cmd would be joe filename or pico filename , correct?
yeah exactly. Just as you do with vi. But since you say you are not used to work with vi.
Any news? I'll be on leave for a week beginning on wed. So I'm trying to finalize the work for your convenience.

Cheers,
K.
Avatar of rtod2

ASKER

Thanks.  Today was CRAZY!  I'll try tomorrow.
ok :)  take care
Hi,

could you be able to try the solution ?
Avatar of rtod2

ASKER

yes, this is on my list of things to dive back into.  I'm very interested in seeing if this works.  I just don't have time to go back through this long thread right now.  I will soon.
ASKER CERTIFIED SOLUTION
Avatar of rtod2
rtod2
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial