General :: Make A Bash Script Keep Running In Same Terminal After It Calls Second Script?

Jun 25, 2010

I have a startup script for jboss (start.sh) that sets some JAVA_OPTS and then calls bash run.sh.If I run it (start.sh) from the command line it runs in the terminal fine. If I make a shortcut launcher for it in gnome and set it for 'application in terminal' it pops up then immediately dies after launch.Not sure what the problem is. Is this not working because one script is calling a second script? But then why does it work when I call ./start.sh?

View 4 Replies


ADVERTISEMENT

Software :: Script Calls Another Script Which Calls 'bash' Inside

Mar 15, 2010

I need to write a script. In which, the 2nd part commands need to run under another bash shell environment.The enter_antoher_bash_env.sh will setup a new shell environment, call "bash". The rest commands need to run under the new env. (I cannot change this script too. )If I run these command one by one manually, it works of course. If I put them into a script, enter_another_bash_env.sh won't return because it calls "bash" command inside.

View 10 Replies View Related

Ubuntu :: Bash: Determine If Running In Terminal?

Jul 10, 2010

I'm writing a bash script to move files around based on various bits of metadata. For a few reasons, this script will be run regularly both from the terminal, and from the nautilus-scripts folder ("graphically", if you will). What I'm stumped on is having the script defer outputs based on which mode the script is running in. For example, how can I have the script know whether to echo error statements, or pump them out to zenity based on the method of invocation?

View 2 Replies View Related

Ubuntu :: Bash For Programs Running In Terminal?

Aug 9, 2011

Trying to write a script for desktop launchers that are adaptable to screen resolution. Ideally, the program should:

1. Determine screen resolution:

if "a" use xdotool options window size 1305 x 869 px and move to 135,0
if "b" use xdotool options window size 1545 x 1019 px and move to 135,0

2. Check if program running:

if no, open program, and use "a" or "b" placement options, focus window
if yes, focus window

3. Close script and leave program open (if possible).

Problems arise when trying to use the script on programs that run from and hog the terminal
(e.g. brasero, gcalctool, nautilus)

Here the script will load the program, and nothing else (probably because it still occupies the terminal as it runs)

Code:

gcalctool && xdotool search "calculator" windowmove 135 0

This next command will cause the program to load, move, but it keeps focusing itself like xdotool is running the windowmove function constantly - it keeps focusing itself until script stopped.

Code:

gcalctool & xdotool search "calculator" windowmove 135 0

This had the same effect as the above code, but seems to work as a conditional subscript running when the process is running in the terminal - it just goes infinitely.

Code:

while [1] ; do xdotool search "calculator" windowmove 135 0 done exit

Is there some kind of "if, then" or "while, do" or some kind of conditional I can put in to the script ensure the window is moved only once if the program is running within the terminal? Is there a way to remove the program from the terminal from the script once it's been called?

View 5 Replies View Related

Ubuntu :: Short Key To Command Histroy In Terminal Running Bash?

Jan 20, 2011

In windows command prompt, F8 key can cycle through your previously entered commands i.e say you enter "ping google.com" and then "pushd <dir>". Next when you type p and then press F8 brings pushd and next F8 brings ping command. You can then hit enter to execute the corresponding command i.e ping in this case.Is there anything similar in Ubuntu Terminal running bash? Very handy to get back previously entered commands.

View 3 Replies View Related

General :: Bash Script -- Script2 Calls Script1 And Supplies Input To Script1?

Nov 2, 2010

I have an app startup script that requires user input.

# start-app.sh
Enter PIN <user manually enters PIN here>
<app startup continues>

[code]....

View 1 Replies View Related

General :: Running Bash But Common Bash Commands Not Working?

Jul 17, 2010

below are the details of my system. I have bash as my current shell, some really common commands aren't working.

Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])

Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$

[Code]....

View 13 Replies View Related

General :: Why Does Running A Program In Bash Work, When Running It In The Menu Doesn't?

Jul 26, 2010

I presume there is something in the JWM window manager - or Puppy Linux Lupu 5.01 itself that is conflicting with the normal loading of GMPLAYER....

I would like to know how to troubleshoot, and fix this problem if possible (even a workaround would be great).

View 1 Replies View Related

General :: Make Linux Terminal Transparent With Terminal Command?

May 10, 2010

Is it possible to make terminal (xfce4-terminal) transparent from bash script?

Maybe by enabling compostion?

View 1 Replies View Related

Ubuntu :: Command To Log Method Calls While Doing 'make'

Nov 19, 2010

I am building an android, from the source using make command. I want to achieve simple logging while this make is happening.

Aim:

I want to look/log for internal system calls that are being made after i do 'make' command in bash terminal. So that after the make is done, i can look and study the internal method/file calls made while make was happening. In this way i will come to know how the actual building process works.

View 1 Replies View Related

Programming :: Make Multiple Calls Using PJISP?

Apr 12, 2011

I have a problem in making multiple calls using PJSIP. I registered different accounts that implements IAccount and added that in the CallManager. When i try to make the calls from the same CallManager, I could able to make the first call. When second call is made the first call got cut and it is alerting and the same for the thrid call..Could anyone help me in this regard.

Note: Calls has to be made from different numbers to different destinations. Is it possible to make multiple outbound calls simultaneously from the same instance of CallManager?

View 1 Replies View Related

Ubuntu Networking :: Can I Make Calls Using Dialup Modem

Mar 12, 2010

I have a dial-up modem in my Laptop.
Also I have a Dial-up line[Base Phone].
Can I make calls from Dialup modem [Making & Answering calls]?

View 5 Replies View Related

Ubuntu :: Pidgin And Make Audio Calls Over SIPE

Mar 17, 2010

I have been trying to figure out how to make audio calls in Pidgin. I have enabled the "Video/Voice Settings" plug-in, but do not get any options any where to initiate a voice call. I am trying to do voice over SIPE to Office Communication Server and I am not 100% sure if pidgin-sipe supports audio (I have looked around but can't find any information on features).

View 1 Replies View Related

Ubuntu Networking :: Make Calls Over Net With Pstn Phone

Jun 13, 2010

I heard it possible to make a call from a pstn phone through the internet to a pstn phone elsewhere in the world. The caller pstn phone connects to something called a pbx[dunno what it is] and a linux box running some software[dunno what it is either] connects to the internet.How do I make that work?

View 5 Replies View Related

OpenSUSE Hardware :: Headsets As Well As Microphone To Make Voice Calls?

Apr 9, 2010

I am looking for an external (usb?) sound card that might work with Linux. I would like to plug in there my headsets as well as my microphone to make voice calls. Do you have anything to suggest that will work fine with my latest opensuse?

View 2 Replies View Related

Programming :: Real Difference Between System Calls And Normal Function Calls?

Oct 26, 2010

What is the real difference between system calls and normal function calls. Ultimately function calls too would be passed to kernel for some or the other work.

View 7 Replies View Related

Software :: Make And Receive Phone Calls With The AT&T's Velocity/GI461 USB Modem?

Apr 7, 2011

I've bought the new AT&T's Velocity/GI461 USB modem. This is a nice toy because into one only stick there are integrated all the features that I need,like the GSM/3G/GPS modules. Googling I've found a good tutorial about how to connect it under Debian and about how to control the GPS data. You can read it going here :

[URL]

but what about to make and receive phone calls through the SIM card integrated and the AT commands ? Can someone give some help ? I've attached some documentation. Maybe this can be done using Wammu and/or Gnokii.

[URL]

View 1 Replies View Related

General :: Bash - Using Terminal Vs KDE?

Mar 18, 2010

Im used to using nautilus within centos but have recently just got a VPS and quickly realising that using a KDE is unacceptable in this environment. Although I do find it so much quicker doing things like folder permissions in KDE rather than typing it all out in the terminal? Everyone I speak to says, use the terminal and I should learn this way as opposed to using the KDE, but theres certain things I just dont get

How is it possible to make quick changes to scripts and viewing them in a browser etc , without a mouse or using KDE? and only using a terminal?? I am wondering how to develop websites just using the terminal?

How can it be quicker to type out/view permissions etc in the terminal when its instant and just a few clicks in the KDE?

View 3 Replies View Related

Ubuntu Networking :: Application - Make Phone Calls And Send SMS Via Mobile Broadband 3G Modem

May 1, 2011

Is there a way to make phone calls and send SMS via mobile broadband 3G modem, i mean an application for the 3G modem which is similar to the one provided for windows by the manufacturer?

View 2 Replies View Related

General :: Bash - Detect When A Terminal Gets Focus?

Jun 23, 2011

I want to be able to time how long I spend in front of a terminal. I'm thinking the best way will be to have some sort of timer that starts and stops when the terminal gains/loses focus. And it will have to work with multiple terminals...

I'm using GNOME.

View 3 Replies View Related

General :: [Bash] Send Command To Another Terminal?

Sep 10, 2010

I open up 2 xterms on my desktop, A(/dev/pts/0) and B(/dev/pts/1).I can write from A to B using redirection e.g. echo "test" > /dev/pts/1How do I run a command from A on B? e.g. "clear"Basically I'm putting the 2 terminals side by side, and using terminal B to display the contents of the current working directory, by running the following in A:export PROMPT_COMMAND="ls -a > /dev/pts/1"but this fills up the screen pretty fast. I was actually looking for a way to clear up the second terminal.

View 6 Replies View Related

General :: Running A Bash Script Via Ssh?

Mar 12, 2010

I have a hardware audit script I want to run on several remote machines around my office. Is there a way to run the script that resides on my machine via ssh or do I need to copy the script to the local machine and then run it...

View 4 Replies View Related

General :: Running SQL Commands From Within Bash

Aug 1, 2010

I would be running SQL commands (UPDATE/SELECT) from within my bash script. I am completely new to this subject. Is MYSQL used for this purpose? Alternatively, what is sqlplus?

View 6 Replies View Related

Debian :: Change Dragora Bash Terminal To Default Jessie Terminal

Feb 29, 2016

I mainly use debian jessie , recently i have installed daragora as my second os to get a feel of gnu/linux . the problem is that dragora uses bash , and it's commands are different from debian jessie terminal is there a way that i can use the same commands here in dragora?

View 4 Replies View Related

Ubuntu :: Bash Broken, Lost Functionality In Terminal (gnome-terminal)?

Dec 10, 2010

Linux-goers. I did some research on this, but I am still fairly new to Linux. In Ubuntu 10.10 (Maverick), I accidentally overwrote my "/bin/bash" file. Dude, using "sudo" with a small typo can work disasters. Bash is now broken in the Terminal (gnome-terminal). Terminal itself still works fine, technically, but bash is still hosed/broken. Here is what I did to try to fix it: Booted from Ubuntu 10.10 live CD. Mounted my Ubuntu partition and manually copied the good/fresh "bash" file onto my hard drive. Verified copy was successful. Didn't help, as you see. Reinstalled "gnome-terminal" using synaptic package manager. Tried to reinstall bash via synaptic, it failed with error, "E: /var/cache/apt/archives/bash_4.1-2ubuntu4_i386.deb: subprocess new pre-removal script returned error exit status 2"

In Terminal, all basic commands work as far as I can tell. ("ls", "pwd", navigation, etc.) Here are some problems:My "username@computername" does not display in the prompt; only the $ sign. Bash keyboard shortcuts such as uparrow and tab do not work. Instead, each inserts a key code. I can't even move the cursor left/right. Aliases (a function of bash and .bashrc) are broken, of course. My sanity level decreases when I use Terminal now. For what it's worth, even with "sudo" I get a "permission denied" error when trying to run Google Chrome! I read something about a ".bashrc" file being a possible problem, but I don't know how to make it work, or the file's proper locations in Ubuntu 10.10. Is there something I can do with a "make" or "apt-get install" command or something?? Could this simply be a permissions problem? Is the link to "/bin/bash", "/bin/sh", or a ".bashrc" file broken? Guide me, oh Linux gurus.

P.S. I always wondered what exactly bash was and how it was different from the basic terminal. LoL, this is an excellent way to demonstrate the difference, and I WANT IT BACK!

View 9 Replies View Related

Ubuntu :: Terminal Bash / -bash: Ls: Command Not Found

Jun 5, 2011

I got a problem with terminal, since i'm really a noob with terminal i don't know how to fix it.Everytime i type in a command it shows for example:

-bash: ls: command not found

Even the basic commands don't work... just cd <directory> and those things works

View 9 Replies View Related

General :: Bash - Get Colored Output When Using Tab Completion In A Terminal?

Feb 27, 2011

Is there a way to get colored output when using tab completion in a terminal? My colors are fine everywhere else so I know that I've enabled a color terminal successfully. Using bash in Ubuntu (10.10).

View 1 Replies View Related

General :: Bash - Catch Or Stop A Shut Down From The Terminal?

Sep 12, 2011

Is there a way to catch or stop a Linux shut down after a reboot, halt or shutdown command has been entered?sudo shutdown -r +10 I should now have 10 minutes before the computer shuts down. If I change my mind and decide that I still want to continue running, how could I stop the shut down?

View 1 Replies View Related

General :: Bash Script Works In Terminal But Not In Cron?

Feb 17, 2011

I'm really running into a wall trying to figure this out. I have a Bash script and narrowed down the one command that doesn't seem to work via cron and it's my pgp decrypting line. Works fine if I run the command via terminal but if I run it via cron it doesn't output anything.crontab -e shows the cronjob and it runs, creates the log file with no output. Is there maybe something I need to run as well? Permissions look set, unless the cron is running as a different user(was under the assumption if it showed up under crontab while logged into that user, then it would run as that user.

View 14 Replies View Related

General :: Put Custom Text On Terminal (bash Script)?

Jan 19, 2010

This code:

Code:
#! /bin/bash
echo Okay.
echo
Does not do it....

P.S. I want to show my parents what happens when I do:

Code:
sudo make me a sandwich
and have it say "Okay."

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved