Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So I have this bash script that when I open in terminal it already inputs the words I want so I don't have to type it in. I was wondering if I can use the same script on Terminator and if I can, how?

Script:

#!/usr/bin/expect -f
spawn -noecho bash
expect "$ " 
send "my custom text"
interact
exit

Can someone help me please? Thanks!

share|improve this question
    
How did you run it in gnome terminal? –  Seth Jul 7 '13 at 1:00
    
You can do this, not sure if it replaces it though... postimg.org/image/hls2e1lx9 Hope this helps! –  Nick Jul 7 '13 at 1:01
    
@Seth I saved it as a .sh file then i chmod it to make it executable and i double click it and clicked 'Run in Terminal' –  Jester Jul 7 '13 at 1:02
    
@Nick what exactly do i do? Hahaha –  Jester Jul 7 '13 at 1:04
    
just make your layout with the 8 split, and where that textbox is, you put what yu want it to load on startup. –  Nick Jul 7 '13 at 1:07

1 Answer 1

up vote 1 down vote accepted

Open Terminator, and navigate to the directory your script is stored in.

Then you can run:

expect nameOfScript.sh

To set terminator as the default terminal use:

gsettings set org.gnome.desktop.default-applications.terminal exec terminator

To reset the default terminal back to gnome-terminal use:

gsettings set org.gnome.desktop.default-applications.terminal exec gnome-terminal
share|improve this answer
    
I want to double click the .sh file and have it open up in Terminator, is that possible? –  Jester Jul 7 '13 at 1:16
1  
@Jester I think so, I'm investigating as we speak. –  Seth Jul 7 '13 at 1:16
    
thank you so much man! This really means a lot! –  Jester Jul 7 '13 at 1:19
1  
@Jester Ok, I found two options. You can set terminator as the default terminal and then click "run in terminal" or you can set terminator as the default for .sh files, which will open terminator instantly on a double click. –  Seth Jul 7 '13 at 1:44
1  
@Jester done. I'll keep looking at the other method (with the .sh) and see if I can get it to work. –  Seth Jul 7 '13 at 2:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.