Find the answer to your Linux question:
Results 1 to 3 of 3
I would like to do the following, i suspect it aint possible but Im not sure: Run a shell command that will open a new console window. The console should ...
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    3

    using ssh with gnome-terminal

    I would like to do the following, i suspect it aint possible but Im not sure:

    Run a shell command that will open a new console window. The console should start a script and save it as console/tlz.YYYYMMDD. It should then ssh to another server and set noclobber. So I want to execute these commands on start:

    script console/tlz.`date +%Y%m%d`
    ssh user@server
    user@server:~$ set -o noclobber

    No login is required for ssh

    I've tried using profiles and gnome-terminal -e, but I can't get it to process all three commands, only one of them.

    Rgds

  2. #2
    Just Joined!
    Join Date
    Apr 2009
    Posts
    90
    Well, you have three options (depending on what you want).

    If you want to run multiple commands and then start up the gnome-terminal, create a script and run that.

    If you want to run multiple commands in the gnome terminal, create a script with the commands in then call gnome terminal with the path to the script.
    If you want to run multiple commands after sshing to a machine, then create the script on the machine you are ssh'ing to, and then set the ssh to run that script.

  3. #3
    Just Joined!
    Join Date
    Apr 2009
    Posts
    3
    I want to run the script command locally, then ssh, then noclobber on the remote machine.

    I dont hae the power to create permanent files or modify profiles on the remote.

    I need to do this for 10+ servers every morning, so getting a command to do it automatically would save me some hassle.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...