Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-09-2013, 05:40 PM   #1
Registered: Dec 2007
Location: Fălticeni, Romania
Distribution: Debian;Fedora
Posts: 76

Rep: Reputation: 15
execute bash script with new terminal without give the password ...

I try to execute this script:
lxterm -e "watch -d ifconfig eth0"
1.The problem when start the new lxterm this need the su password.

I try with visudo to edit :

ALL=(usertest) NOPASSWD: /home/usertest/
result is :
sh: 1: ifconfig: not found
2.I want to use many terminals in same desktop and need to see all.
How can I do ?
Thank's . Regards.
Old 07-09-2013, 06:51 PM   #2
Senior Member
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
The full path to ifconfig should help you out
lxterm -e "watch -d /sbin/ifconfig eth0"
And you shouldn't need root to execute that. You would only require root if you wanted to change something like the IP/Netmask or State ( UP/DOWN )

Rather than starting multiple terminals and arranging, something I use which may or may not suit your needs is Terminator

With a little work you can setup profiles. Allowing the start of multiple terminal sessions each automatically executing commands/scripts all in one Window with multiple panes.


bash scripting, ifconfig

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute bash script in C waqasdaar Programming 15 10-27-2015 03:54 PM
[SOLVED] Crontab is giving different result when execute the script on terminal Srinivas Gadi Linux - Newbie 3 12-28-2012 02:51 PM
Can't execute Bash script. zbe Linux - Software 4 10-17-2008 09:05 AM
how to give password in shell script after scp kushkothari Linux - Networking 2 10-14-2008 01:13 AM
gnome-terminal fails to give bash prompt wfhoney Red Hat 8 04-21-2004 04:38 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration