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
ADVERTISEMENT
Aug 26, 2010
I am writing a script in which I am using AWK to append to a line in a file and save the file. The command I am using is:
Code:
awk '{s=$0; if ( NR==4 ){s=s ":/usr/java/jdk1.6.0_19/bin" } print s;}' $appName > $appName.new
[code]...
View 4 Replies
View Related
Aug 23, 2010
I searched the menu-bar of gedit, i searched the web, i searched the help of gedit.(try a search on "change background to black for gedit" and similar and you know what i have gone through).If i use the embedded terminal in gedit (the only reason i use gedit at all) its background color is set to white.I barely can read it and it is useless.This is not a gnome-installation. Perhaps i miss a package needed ?
View 4 Replies
View Related
Jun 22, 2011
I've been doing some work with BASH over the past few months, building scripts and config files, and quite happy with BASH for the purpose of building and installing distros and packages.
Now though, I'd like to go a little further than gTerm, and have a terminal window within a dialog box so I can click on buttons and set config parameters with a mouse, and watch the progress and send status messages from the script running in BASH in the terminal window back to the dialog box.
Quite a few GUI packages seem to offer the choice to open a terminal window to watch the progress. I am probably working in reverse, in wanting a terminal window to open a containing dialog box, but I'm sure it can be done if I want to go back and adapt my old MS-DOS 286 C skills to Linux.
What I'd prefer is a quick and easy way: to just find a tool like whiptail or zenity or dialog, setup a couple of buttons and a message / progress bar, and dump my BASH script terminal output into a window inside the dialog box.
Can anybody suggest offhand which of these mentioned dialog packages (ie. whiptail dialog zenity) or any others, provide an option to open a terminal window inside a dialog box? Then pass fairly simple variables between the two?
View 2 Replies
View Related
Feb 27, 2011
I have a working trans.ds file and installed devilspie.It runs great, but the stickler is that if I "click off" or change application focus, I no longer can get the focus back to the terminal.The terminal window is responsive other than that.I can open a new tab, but I get no focus there either.Here's the trans.ds code
Code:
; generated_rule trans
( if
[code]....
View 5 Replies
View Related
Jun 3, 2011
I'm unable to reset using either the reset option in gnome shell or the command using a terminal. When I select it the shell exits and displays the graphic "exploding" and then it just sits there. Shutdown works fine; just no reset. Any ideas? I've installed from the DVD. I booted the live CD and it resets just fine so I know it's no my hardware
View 1 Replies
View Related
Apr 28, 2011
I am very new to shell script, and my requirement is --
1. open the apache access log, use "cut" and "grep" to find the numbers.
2.put the result in a file
3.then compare the same result with day before result
4. send the result via e-mail.
so how can i do that , using some functions..
View 1 Replies
View Related
Dec 30, 2010
how do i use bash shell scripts inside php.I am just trying to call a simple cp command using php. Its not doing anything.
View 2 Replies
View Related
Apr 12, 2010
I have installed VirtualBox because I want to test out things like 10.04 and gnome-shell. So, I have downloaded an Ubuntu 10.04 32-bit .vdi from mininova (and so far I'm assuming that the downloaded file is good), and I've been tooling around with it a bit. It was a bit choppy at times, but that was probably because I was running several other things at the same time. My comp's stats are in my sig (only addressing 2.9 gigs of ram due to the 32-bit kernel), and I think that any choppiness was due to overloading the computer with other things. The proc temp also went to record highs, ~75 Celsius, iirc. The vm has been alloted 1 proc (out of 2) 512 ram. The problem I am having is that I wanted to install gnome-shell to try it out, but I get an error,
[Code]...
View 6 Replies
View Related
Apr 25, 2010
I have installed VirtualBox because I want to test out things like 10.04 and gnome-shell. I have downloaded an Ubuntu 10.04 32-bit .vdi from mininova (and so far I'm assuming that the downloaded file is good), and I've been tooling around with it a bit. It was a bit choppy at times, but that was probably because I was running several other things at the same time. My comp's stats are in my sig (only addressing 2.9 gigs of ram due to the 32-bit kernel), and I think that any choppiness was due to overloading the computer with other things. The proc temp also went to record highs, ~75 Celsius, iirc. The vm has been alloted 1 proc (out of 2) 512 ram.The problem I am having is that I wanted to install gnome-shell to try it out, but I get an error,
Code:
adminuser@adminuser-desktop:~$ sudo apt-get install gnome-shell
[sudo] password for adminuser:
Reading package lists... Done
Building dependency tree
[code]...
So, I have xulrunner-1.9.2 already, so I tried to install 1.9.1 anyway, and it appeared to install, and I now have 1.9.1.9 and 1.9.2.3 installed, but trying to install libgsj0 results in the same error as above.
View 9 Replies
View Related
Apr 22, 2010
I have this scenario, where in I'm calling a shell script inside another shell script. The only criteria here is that the embedded script will have 654 permissions and the master script should be able to execute this embedded script. The sample code is given below:
#!/usr/bin/ksh
maindir=/usr/home01/temp/dir
bindir=${maindir}/batch/bin
${bindir}/test.ksh -d ${dblogin} -i ${datadir} -r ${filedt} > ${tmp_log}
The test.ksh which has 654 permissions is called by the main.ksh script and when I try to run it using ./main.ksh, it fails with the error "Execute permissions denied."
View 2 Replies
View Related
Jul 3, 2011
Does anyone know of any graphical ftp which runs inside the terminal? something similar to midnight commander.
View 2 Replies
View Related
Aug 4, 2011
I need to make beep sound inside my basic shell script. code...
View 5 Replies
View Related
Jan 26, 2011
When I'm in OpenBox, I often have a termianl (lxterminal) open in the background. The terminals responds quickly when logged in as my standard user. If I, however, use su to switch to root, there's about a 2 or 3 second delay on the output for any command I type. This delay goes away if I type another character or tap the spacebar. That input is read as normal -- I've accidentally answered 'y' to prompts before.
My machine is an ASUS Eee PC 1001P (1GB of RAM, Atom 450) with an 40GB Intel SSD.
View 8 Replies
View Related
Apr 8, 2010
I try to kick off dolphin from regular user account after executing "su -" from terminal emulator inside KDE, but got a error:
Code:
Is this something to do with xwindow authorization?
View 9 Replies
View Related
Mar 12, 2011
Is there a way to run a non interactive program inside a virtual XP machine (virtualbox)?
I know that you can run programs on a remote machine if both machines are windoze, or if both are linux. but can you run one from the other?
View 3 Replies
View Related
Sep 4, 2009
I am running a shell script using a non root user. Somewhere down in the script, I'll have to call some script to be executed as su (or a user with more privileges than the one running the original script). So if i put a line in the script as:
Code:
su - root -c /root/roleScripts/assignRoles.sh
Then when running the command, it will prompt me for root password(because the current user has lower privileges than the user requested. Suppose I want to pass this password as an argument to the original script, so that it doesn't prompt me for password later on, what is the way? Can I switch user passing the password and run a command?
View 14 Replies
View Related
Aug 8, 2010
What is the command for "Open a terminal window and run application in this terminal
View 4 Replies
View Related
Feb 27, 2010
i accidently hit this command inside my /var/www folder. im screwed big time.I need to recover my files back. is there any chance ?
View 1 Replies
View Related
Jan 28, 2010
I know that using alias I can run a whole command with a shortcut. But my requirement is to use parts of a long command and in between I have to pass some user defined values.
E.g. Suppose I have to routinely copy a directory to another remote directory on a remote machine.The remote machine name is quite long as well as the directory path to which I want to copy the files into.So the command to do scp would look like this[URL]Now I want to do some sort of aliasing (say "ecp") so that I just need to pass the source_directory name and the ecp command and do my job
View 3 Replies
View Related
Jul 30, 2011
I want to execute a awk command, which reads from txt files and sums the numbers from the first column for those listed only inside a <init> block -- The awk command is like
Code:
awk '/</?init>/{x = !x}x{a++}x && a > 2{sum+=$1}END{printf"%E" "
", sum}
So, I want to execute it inside a perl script, and execute the awk command for the infile which is also defined outside awk loop, ie doing something like
Code:
foreach $infile (@ARGV) {
$gzin = gzopen($infile, "r") || die ("Couldn't open file $infile
");
# No. events and cross-section from current file
[code]....
View 1 Replies
View Related
Oct 22, 2009
I wrote a simple shell script called main.sh and inside it calling another shell script called rename.sh.Both are placed in a same directory.[/home/srimal/test]
$cat main.sh
Code:
#!/bin/sh
[code]...
View 4 Replies
View Related
Aug 8, 2011
I am working at a client who has a project where code is a mixture of different source control systems. So a layout might be like this
project/a/.svn
/a/subfolder/.svn
/b/.hg
/c/subproject/.svn
/d/.hg
So I am trying to put together a simple command that when executed from the project folder will run the appropriate hg/svn command in each project i.e:
[Code]...
Since the client has many such projects, Instead I am looking for a solution similar to find -exec where the svn/hg commands are automatically executed on each first level of match (i.e. svn up is run in the project/a folder but not in project/a/subfolder). How can such a command be constructed ?.
View 1 Replies
View Related
Oct 5, 2010
The first call to "somefunction" works as expected. The function prints "endfunction" and a process in background sleeps 30 seconds. In the second call I thought it should work in the same way, but the script sleeps 30 seconds before it prints "endfunction".Does someone know the reason of this behavior? Is there another way to do a command substitution of a function that has a background process without have to waiting for that process?
View 2 Replies
View Related
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
May 10, 2010
Is it possible to make terminal (xfce4-terminal) transparent from bash script?
Maybe by enabling compostion?
View 1 Replies
View Related
Dec 9, 2010
I'm having problems with bash quoting. Maybe someone can tell me what's going on.. Basically, I need to create a command line inside a bash script that contains arguments that contain spaces and bash variables that need to be expanded.
[Code]...
View 5 Replies
View Related
Feb 16, 2011
Writing script to create backup of file by adding datetime to file name. Basically test for file presence if there, cp with datetime then rm original cp works fine from command line but get cannot stat `full path to file': No such file or directory
Code:
Here are the errors: cp: cannot stat `~/html/CVP_dadamail/.dada_files/.logs/errors.txt': No such file or directory rm: cannot remove `...': No such file or directory
The for statement is a placeholder as I have same file to backup out of several directories. using "bash -x scriptname" -OR- inserting echos, I can see I've constructed the strings properly. Believing it might be related to the hidden directories, I tried setting the shopt "glob" options to no avail.
Ultimately I'll add the other directories to the for loop and then run this from a cron job, so if you see potential pitfalls knowing I'm headed in that direction...believe construct would be
Code:
View 4 Replies
View Related
May 4, 2011
I'm working with Linux 2.6.23 on an embedded device and am receiving the following error executing the reboot command.
View 2 Replies
View Related
Feb 17, 2010
how to pass something more than a one-command startup for gnome-terminal. I will give an example of what I'm trying to do here:
Code:
#! /bin/bash
#
#TODO write this for gnome and xterm
[code]....
This same error occurs if the gnome-terminal line is changed to
Code:
gnome-terminal -e mcTerm
Is there any way to pass more than one command on to gnome-terminal? I have tried various single and double quoting senarios and in a final attempt, I abstracted to an exported function all to no avail. Perhaps even though gnome-term is better at many things than xterm, xterm trumps it in this instance.
View 1 Replies
View Related