Ubuntu Networking :: How To Run Ssh Shell Command

May 10, 2011

command1:
ssh pt@192.168.1.101 ls
command2:
ssh pt@192.168.1.101 totem ~/t1

Cannot open display: Run 'totem --help' to see a full list of available command line options. command1 can run, command2 can not run,would you mind to tell me why?

View 2 Replies


ADVERTISEMENT

Ubuntu Networking :: Connect OpenVPN Server Using Shell Command?

Feb 15, 2010

I'm trying to connect OpenVPN server using shell command.

I've installed all needed packages (I guess)

if type

Code:
sudo openvpn client.ovpn
and i've got messages:
Code:
Mon Feb 15 12:29:25 2010 OpenVPN 2.1_rc19 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Oct 13 2009

[Code]....

but i can't see tap0 interface and cannot ping any address at remote location.

I tried this config file at Windows OpenVPN client and all works fine.

View 2 Replies View Related

Programming :: Show The Output Of Shell Command Into A Textbox, Ex Ps -efc Command?

Oct 20, 2010

I am using gtk to program GUI. How can I show the output of shell command into a textbox, ex ps -efc command ?

View 3 Replies View Related

Ubuntu :: Shell Command To Monitor Power Use?

Mar 16, 2010

Im trying to find out if my computer is whats got my power bill so high. Im not sure it is, but Id like to know if there is a shell command to monitor my power use.

View 3 Replies View Related

Ubuntu :: Shell - Command-dependent <tab> Autocomplete?

Jul 6, 2010

I was using windows recently and noticed that in their command line, the autocomplete is in some ways a little more intelligent (although based on my short experience ours is more robust); for example, if you have a directory named blah and a file name bl, in Linux "cd bl <tab>" will result in "cd bl" while in Windows I get "cd blah" because it recognizes that blah and not bl is the appropriate argument to cd. Similarly unrar will target rar files first.I am not saying Windows command line is better; Windows command line is in general a piece of junk.

View 2 Replies View Related

Ubuntu :: Command To Access A Secure Shell?

Aug 20, 2010

What's the command to access a secure shell?

View 2 Replies View Related

Ubuntu :: Opening Script In Shell With One Command?

Aug 22, 2010

How can I open a script in a shell (konsole/terminal) with one command?

View 6 Replies View Related

Ubuntu :: Test Command In Shell Script?

Aug 29, 2010

I was trying to write a script, but for some reason I can't test two variables using -gt:

a=`expr $currentSize + 0`
b=`expr $fileSize + 0`
[$a -gt $b]
this is what I get:
[22234534: not found

what is the problem? It seems like I can't check if a variable is greater than another but only if a variable is greater than a fixed number. Is that so? By the way the variables $fileSize and $currentSize exist and $a and $b have a value.

View 9 Replies View Related

Ubuntu :: Shell Scripting Command Doubt?

Jan 1, 2011

How do i find out if a particular item is a file or a folder through the terminal ls -la gives 'd' before the permissions for every folder and '-' before every fileLike i want to write a script that backup data if it is a folder and deletes if it is a file

View 2 Replies View Related

Ubuntu Servers :: Run A Shell Command As Another User?

Apr 26, 2011

The short version: I have to manage some virtual machines using php shell_exec function, so far I cant do this because apache is run by the user www-data and virtualbox by the user vboxuserFrom what I've read so far, I've thought of 3 possible solutions: 1.- Create a script on my vboxuser that I can call from php to manage the Virtual Machines.2.- Change the apache user from www-data to vboxuser so I can manage the Virtual Machines through php
3.- Reinstall VirtualBox, this time using www-data as my user. I'm not sure if any of these will work and I'm not too sure of which would be the best solutionNow the longer more detailed version:

I have a remote server running Ubuntu 10.04.2, in that server I have set up VirtualBox so I can run several instances of WinXP to perform different tasks. Everything is setup and I can manage the virtual machines through SSH. If I want to run them as a different user than the one that created them (a user that so far only has been used to create the Virtual Machines) I have to do sudo -u vboxuser.Now, I need to create a PHP script to manage these virtual machines (I know about phpVirtualBox, but it's not what I need). If I try to run the virtual machines using shell_exec() from php, I get no answer at all (And I have tested that shell_exec is working on my server).

View 6 Replies View Related

Ubuntu :: Emacs -- Run Shell Command W/o Output?

Jul 12, 2011

I write LaTeX in Emacs and then run a shell script to process the LaTeX code. I used to run a subshell buffer with M-x shell and then execute the script from within there, but this results in a lot of switching between buffers, which seems unnecessary. Then, I found out about executing shell commands with M-! cmd RET, as described here:[URL]The problem with this is that the output from the script splits my screen. It's a nuisance, and I would like to run the script without any output. I've tried appending > /dev/null to the command, but it doesn't work.For example, when from within Emacs I enter M-! followed by

Code:
sh make.sh > /dev/null
it splits my screen so that one portion displays output from the make.sh script. I want it to run silently, and leave my Emacs buffers alone

View 3 Replies View Related

General :: Run A Shell Command With &?

Jun 15, 2010

I am using Red Hat Linux Enterprise version 5. I've noticed people sometimes running commands with a couple of & options. For example, in the below command, there are two & signs. What is the purpose of them? Are they always used together with nohup?

nohup foo.sh <script parameters> >& <log_file_name> &

View 6 Replies View Related

Ubuntu :: Shell Command Output Not Showing Immediately?

Jan 18, 2011

This is an extremely weird issue that I can't find any help with on Google. It is minor but extremely annoying.

When I type in a linux command in the terminal, (e.g. "ls -la"), and then press enter, the cursor goes to the next line and just sits there, as if its processing some long command.

If I press enter again, I see the ls output as well as my prompt twice. It's like the terminal window isn't auto-scrolling, but I've also seen this happen when there wasnt even enough text in the console screen to warrant a scrollbar. Has anyone seen this before and know what I need to do? I hope what I'm asking about makes sense.

View 3 Replies View Related

Ubuntu :: Shell - Run Command For Subset Of Files In Directory?

Jan 28, 2011

I cannot find the way to run some command for a subset of files in directory - how can I do it

View 3 Replies View Related

Ubuntu :: Shell Command To Close A Program With Dump?

Feb 3, 2011

I'm running into some problems using pkill in my scripts. I'm using a program that needs to dump.

View 4 Replies View Related

Ubuntu :: Bash Shell Implements Version Of The Command?

Mar 19, 2011

I'm used to being able to put a script in ~/bin and having it overrule the system version of a command. However for "time" or "kill" since the bash shell implements a version of the command (i.e. /bin/ version is not used) doing this is not enough. How can I get the shell to run my own version instead of the version in the shell.I understand the implications of doing this. I know what I'm doing, I can always /bin/whatever if I want to get the old version (or just chmod -x ~/bin/whatever).

View 6 Replies View Related

Debian Programming :: How To Use Shell Command

Sep 6, 2013

How to use shell command?

installs.sh:

Code: Select allapt-get install icedove-l10n-hu
apt-get install rar
apt-get install ...
...
y press key or other language is other key. hungarian key is: i

english after apt-get install in gnome-terminal: (y)es or (n)o
hungarian after apt-get install in gnome-terminal: (i)gen or (n)em

How to yes or no automatically in all languages? Not manual, not 'Y'/'I' or 'N'/'N' keydown.

I would like use this script my fresh installed Debian 7.1. I would like run this install.sh when Debian is installed for my all softwares when i would like use.

10 PC installing easy and faster my script.

If no script is slowly install for my 10 PC.

View 2 Replies View Related

Programming :: Detection Of A Command In Shell?

Apr 2, 2010

I would like to know if there is any way to detect a command if it going to be executed in the shell?

Eg:
Cmd: sudo apt-get clean I want a C program to be called before this cmd is executed.

View 8 Replies View Related

General :: Looking For System Shell Command?

May 31, 2011

I'm looking for a specific command,if it exist... i want to login from my server to another Linux server,but the question is: can i do it in a one line command for ex:
usually you type: ssh "user"@10.1.1.1 and then the password,but I'm looking for a command in one line a fake ex: ssh user@10.1.1.1 -p "password" something like that.
I don't know if anyone of you understand what do i want to say .

View 6 Replies View Related

Server :: Shell Command Over Ssh-keygen

Apr 14, 2010

I have 2 servers, let say server1 and server2. I have create ssh-keygen from server1 to server2, I can ssh from server1 to server2 without typing a password. My question is: How can I use command from server1 to server2? for example I want to list file in server2 /home directory from server1.

View 1 Replies View Related

Server :: Web Interface To Some Shell Command

Oct 22, 2010

I want to create for my private use, a simple web interface to manage some easy task (useradd, userdel, passwd, etc...).I have some basic knowledge of PHP; how can I realize this? PHP as module or CGI? Which is better in this case?

View 12 Replies View Related

Server :: Which Php Command For Shell Interaction Shall Use?

Dec 26, 2010

As homework for my study I have to do some kind of browser GUI to send commands to mysql command line tool and to show the output in the browser. I already set up sudo to have the right permissions for the www-data user. In the php documentation I found that one of the following four commands are probably for tasks like mine.

exec
passthru
shell exec
system

Can anyone tell me which one is the best for my requirements? The idea is to use php from the browser to connect to mysql like on the command line with: "mysql �user=username �password" And then give back the output of the command line to the browser. If the above is working then the next step would be to put a link in order to execute the command �show database;� again through php by clicking that link. After clicking this link it would give back to the browser what the command line would display.

View 4 Replies View Related

Programming :: Executing Shell Command In JSP

Aug 24, 2010

what we are trying to do is, to let the customer click a button in the web browser, and then the web server to call a shell script to do the work. The output from the stdout && stderr of the script should be displayed in the web browser once finished or timeout, along with the exit code of the script.

The shell script is however not on the web server, but on another app server. So to call this script from the web server as the identity 'tomcat':

Code:
$ sh appuser@app-server:$appbin/app-script

The .ssh/id_rsa.pub thing is done, and we have no problem doing this in the command line so far.

Our loaded ex-colleage has left us the webpages (jsp) with code like these:

Code:
<%@ include file="jsp_functions.jsp" %>
<%
String cmd = "sh $appbin/app-script";
ExecResult r = new ExecResult();

[Code].....

View 6 Replies View Related

Ubuntu :: 'set' Command In Terminal Has Shell Scripts Embedded Inside?

May 3, 2010

I just installed Ubuntu 10.04 for some development. I was trying to set some environment variables are noticed that when I hit 'set' inside a terminal (to dump environment vars) I get the usual first few variables but then I see a whole lot of script code ....

Code:

WINDOWID=23068675
XAUTHORITY=/var/run/gdm/auth-for-sid-5IDovs/database
XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg
XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/

[code]....

I've installed a lot of tools (NetBeans, Ruby, Java, build-essentials etc) but essentially I installed Ubuntu today - so it shouldn't have rotted out this quickly. is this hijacking of environment vars to embed script code intentional with Ubuntu 10.04?

View 1 Replies View Related

General :: Shell Command To Let System Box Go Sleep?

Jun 21, 2010

I'm writing a shell script to check the I/O activity of a Linux box and if the server is quiet for a certain long time, the script should let the server go to sleep. But, after some Google searching, I didn't find a answer yet. Is there a shell script command to put a Linux box to sleep?

View 3 Replies View Related

General :: Executing A Shell Command In Emacs?

Dec 17, 2010

I tried to execute a shell command by M-! cmd RET but it did not work.M-! does not turn up in the microbuffer no matter how many times I press Alt+!.But if I go to Tools menu and select Shell Command... option then it writes M-! to the microbuffer and everything works fine.What is the problem here?

View 2 Replies View Related

General :: Triming Lines Using Shell Command?

Mar 22, 2011

i have a text file generated automatically from a script , but the result in the script is not ordered in a readable way, so i need your help to fix it using a shell command the text file contain data in this way :

Code:

0.147361 0.243688 0.081520 -0.446603 1.130529 NC_000846 Chordata
Rheiformes
Aves
0.091740 0.379224 0.021160 -0.088493 3.441356 NC_000857 Arthropoda
Diptera

[code]....

i want to arrange the data in this text file in a way that each line will concatenate the 2 lines after it , so that will be 1 line , i want all the lines to be treated in this way ,

View 2 Replies View Related

Red Hat / Fedora :: Shell Command Redirect To E-mail?

Apr 6, 2010

Is it possible to create a shell script that will run a shell command and email the results?

View 2 Replies View Related

General :: Backslash Preceding A Shell Command

Mar 21, 2011

Reading a BASH script, I saw a find command preceded with a backslash. It was similar to this:

Code:
`find . -type f -name '*.xml' -print > xmlfilelist`

It's impossible to find documentation about this in man pages or on the internet, since 'backslash' are always evoked along with special characters. I also noticed that even though the command was surrounded with backquotes, the result was not affected to any variable. Maybe the backslash's presence is related with this?

View 2 Replies View Related

General :: Create The Shell Which Would Support The LS Command In C++?

Sep 4, 2010

I would like to create the shell which would support the LS command in C++. And any way to change the command prompt.

View 1 Replies View Related







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