Re: Download Cygwin once and intall it several times

2008-07-28 Thread Mirco Piccin
Hi! I do something similar some days ago.
Also i try to copy the installation folder in another pc, but once
launched the bash console, i was not able to do anything. The only way
i find usefull is to download packages in local, then copy the
installer and the local repository folder in the seocnd pc, and then
run the installer (pointing to that local repo).
This way works for me.
Hope my experience helps you.
Regards
M

2008/7/28, Dave Korn [EMAIL PROTECTED]:
 Brian Dessent wrote on 28 July 2008 17:44:

 prompt is not colored (like when it run) and the prompt is  bash x y.
 In this condition, I'm not able to run any command (e.g. ls command
 not fund vi command not found and so on).

 That is the result of the postinstall scripts not being run or failing
 when setup tries to run them.  Check the setup logs to find out what
 happened.  BLODA could be a factor here.

   Or there could be left-over traces of a previous cygwin installation on
 the second machine?

 cheers,
   DaveK
 --
 Can't think of a witty .sigline today


 --
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
 Problem reports:   http://cygwin.com/problems.html
 Documentation: http://cygwin.com/docs.html
 FAQ:   http://cygwin.com/faq/



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin - batch file

2008-01-25 Thread Mirco Piccin
Hi.

 i'm trying to write a batch file, which open cygwin, automatically execute a
 script in cygwin, and then close cygwin.

as reported in a my old post, that's what i've done: i've created a
file .bat (example: run_command.bat) on my desktop and inside that
(supposing you install cygwin in your C: drive):

C:

chdir C:\cygwin\bin


bash --login -i -c 'here insert the command you want to run'


Save  Exit this file.
(obviously replace the  here insert the command you want to run
string with your command)
Now you need only to double-click in your .bat file.

Regards
M

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin - batch file

2008-01-25 Thread Mirco Piccin
Hi

 my start.bat is in the folder C:\batch
 ok

 when i call start.bat , cygwin automatically goes into the folder
 C:\Documents and Settings\user .

cygwin goes there because that is your home folder.

 so myscript.ksh file must be in C:\Documents and Settings\user.
 i want to have myscript.ksh file in the C:\batch folder!

 do u understand what i mean?
now perfectly :-D

You can do simply:

C:

chdir C:\cygwin\bin

bash --login -c '/cygdrive/c/batch./myscript.ksh'

or as Larry recommend.
I sincerely prefer to use the --login option, but with this option
cygwin (linux) chdir to your home directory, of course.

Regards
M

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin - batch file

2008-01-25 Thread Mirco Piccin
Sorry but my english is quite poor, so i don't understand well your question.
So, correct me if i'm going wrong.

 it works perfect, but i have to give the cygwin script under C:\Documents
 and Settings\user myscript.ksh!

 how can i make it to have a directory, for eg C:\mybatchconversion where all
 files are there?

You want to run with cygwin a .ksh file stored in  C:\Documents and
Settings\user ?
Well, in cygwin the system drive are mapped in this way :

$ mount
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
c: on /cygdrive/c type system (binmode,noumount)

...so i can do:
$ cd /cygdrive/c/Documents\ and\ Settings/user/
...to switch to Win user home directory.

I recommend to soft link your Windows home directory (C:\Documents and
Settings\user) to the linux home folder (/home/user) in this way:

$ mv /home/user/  /home/user.old/
(move the original folder to another)

$ ln -s /cygdrive/c/Documents and Settings/user  /home/user
(link the Win home dir to cygwin linux home dir)

$ cp -R /home/user.old/ *  /home/user/.
(right to have the .profile .bash* file)

In this way, cd to /home/user  and you will find yourself in your
Win home dir.

Of course, you can soft link any other path.
Remeber only that the Windows C: drive in cygwin environment is /cygdrive/c/.

So, coming back to our .bat file:


bash --login -i -c '/cygdrive/c/Documents and Settings/user/script.ksh'
...

-or, if you soft link Win home dir to /home/user:
...
bash --login -i -c '/home/user/script.ksh'
...

Hope i understand well :-D
M

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How can I run a script?

2008-01-14 Thread Mirco Piccin
Hi.

 can login to a shell from windows and run commands but how do I create a 
 script

I think you mean to run a command without open cygwin shell.
If i understand well, here you are how i've done that.

First of all, i've created a file .bat (example: run_rsynch.bat) on my desktop
.. and inside that (supposing you install cygwin in your C: drive):

C:

chdir C:\cygwin\bin



bash --login -i -c 'rsync -avz [EMAIL PROTECTED]:/home/funnel/Jan*
/cygdrive/e/Earchives'

Save  Exit.
Now you need only to double-click in your .bat file and insert your
password if required.

Instead, if you want to create a  script to run in cygwin environment,
follow the Eric post.

...my 2 cents...

Regards
M

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How can I run a script?

2008-01-14 Thread Mirco Piccin
Hi again.

 The base install of cygwin is on an E: drive.  C: didn't have enough room.

 So if I understand correctly something like -


 E:

 chdir E:\cygwin\bin

 bash --login -i -c 'rsync -avz [EMAIL PROTECTED] :/home/funnel/Jan*
 /cygdrive/e/Earchives'

...yes, it seems right.

 Then another question arises where does the std output and std error
 go too?   21  foo_file ?

 I could fix that by running rsync in quite mode -q

Well, if you want to save the log, you can simply redirect all the
output in a file, so append something like that to your original
command (inside the '):
 /any/path/log_file
do the job.
If you want to discharge the output, appending :
 21
should be enough.

Anyway, after the shell command is ran, the shell close itself.
It is also possible to create a bash script on cygwin environment and
then start it by the way described above.

Regards
M

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How can I run a script?

2008-01-14 Thread Mirco Piccin
Hi.

 I also assume if running in a windoze envirment it needs to end with
 *.bat extension since windoze doesn't have a clue what *.sh is?

...sure, as reported on my first post.
Regards
M

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Remote Linux desktop in my Cygwin windows PC

2008-01-02 Thread Mirco Piccin
Hi all.

  I'm really basic with Linux. I'm running remote applications with:
 
  xhost
  ssh
  export DISPLAY
 
  So I'm using Eclipse, gedit, firefox, ... like this for example in my
  windows. Now I'm curios if I'm able to have the full desktop of my
  Linux machine like a window in my remote Windows PC.
 
  I'm using the Ubuntu 7.10 in the Linux PC

Initially i follow those step :
http://x.cygwin.com/docs/ug/using-remote-session.html

basically is a XDMCP remote session; the only things to do in your
linux machine are:
- enable the X11Forwarding in your sshd configuration  (by default
/etc/ssh/sshd_config)

[/etc/ssh/sshd_config]

X11Forwarding yes


- allow connection to your display manager - if you use Ubuntu, it's
Gnome : modify /etc/gdm/gdm.conf enabling xdmcp

[/etc/gdm/gdm.conf]

[xdmcp]
Enable=True



The problem of this solution is that if you loose the session, you
can't restore that (i don't know sincerely if now this problem is
solved...).
Anyway, it's not so speed.

  Another option is to use a VNC server on the linux machine, and then
  the VNC viewer on windows.  This is similar to Remote Desktop, so that
  might be what you're looking for.  Yet another option which gives good
  results is NX, which is also similar to remote desktop, and is
  faster than VNC.

Now i'm using NX server; there's an OpensSource version (FreeNX -
http://freenx.berlios.de/) that is installable by apt-get (Ubuntu
repository).
Thers'e also an installation guide here
http://ubuntuforums.org/showthread.php?t=620057highlight=freenx

FreeNX is faster than xdmcp and more configurable.

Hope it helps you!

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Remote Linux desktop in my Cygwin windows PC

2008-01-02 Thread Mirco Piccin
Hi all.

  I'm really basic with Linux. I'm running remote applications with:
 
  xhost
  ssh
  export DISPLAY
 
  So I'm using Eclipse, gedit, firefox, ... like this for example in my
  windows. Now I'm curios if I'm able to have the full desktop of my
  Linux machine like a window in my remote Windows PC.
 
  I'm using the Ubuntu 7.10 in the Linux PC

Initially i follow those step :
http://x.cygwin.com/docs/ug/using-remote-session.html

basically is a XDMCP remote session; the only things to do in your
linux machine are:
- enable the X11Forwarding in your sshd configuration  (by default
/etc/ssh/sshd_config)

[/etc/ssh/sshd_config]

X11Forwarding yes


- allow connection to your display manager - if you use Ubuntu, it's
Gnome : modify /etc/gdm/gdm.conf enabling xdmcp

[/etc/gdm/gdm.conf]

[xdmcp]
Enable=True



The problem of this solution is that if you loose the session, you
can't restore that (i don't know sincerely if now this problem is
solved...).
Anyway, it's not so speed.

 Another option is to use a VNC server on the linux machine, and then
 the VNC viewer on windows.  This is similar to Remote Desktop, so that
 might be what you're looking for.  Yet another option which gives good
 results is NX, which is also similar to remote desktop, and is
 faster than VNC.

Now i'm using NX server; there's an OpensSource version (FreeNX -
http://freenx.berlios.de/) that is installable by apt-get (Ubuntu
repository).
Thers'e also an installation guide here
http://ubuntuforums.org/showthread.php?t=620057highlight=freenx

FreeNX is faster than xdmcp and more configurable.

Hope this helps you!

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/