Software :: Strace Crashes Shell/system When Being Used On Current Bash?

Jun 8, 2011

I am observing a very strange behavior when using strace and don't know the reasons for it.

I do: pstree -Aapnul |less -p bash on my Ubuntu VM which is run with the help of Virtual Box.

I see:

|-gnome-terminal,1418,valentin
| |-gnome-pty-helpe,1419
| |-bash,1420
| | |-pstree,1471 -Aapnul

[Code]....

View 1 Replies


ADVERTISEMENT

General :: Bash - Rename Files With Spaces Using System Shell?

Jun 8, 2011

I named a number of files with spaces in them, and I want to replace the space with "_". However, every time I write a command in the shell with the file name (eg "Spring 2011"), the shell doesn't recognize the file or directory. What can I do about this? Is there any way to use the unicode character for a space?

View 5 Replies View Related

General :: System Bash Shell Copy Previous Lines (not History) With Keyboard?

Jun 14, 2011

Is it possible to use the keyboard in order to select some text in the terminal windows that is not in the currently edited line? (for example, in order to copy part of previous command output).

View 3 Replies View Related

General :: System Administration Scripting - Write Very Basic BASH Shell Scripts

Jan 10, 2011

I'd like to know some good resources, links, e-books to learn basic Linux system administration scripting. I know how to write very basic BASH shell scripts so I'm still at beginner level. There are so many docs out there that I'd like to narrow down people's opinion's on the best easy to understand resources that are available. Eventually I'd like to learn basic PERL as well.

View 3 Replies View Related

Programming :: Perl About System Command / Fails If The Standard Shell Is Dash And Not Bash?

Jun 30, 2011

I am trying to fix a perl script, and I really suck at perl. But I think this problem will be easy for people who know it.

The problem is, I have an old setup script someone wrote many years ago. It fails if the standard shell is dash and not bash. The only way I've gotten it to work is to point /bin/sh to bash. I looked thru the script and it uses "system" many places, and I think that's the problem.

I searched for it and found this link:url

My plan is to include this function:

Code:
sub system_bash {
my @args = ( "bash", "-c", shift );
system(@args);
}
Then I could simply change all calls to system into system_bash and it should work?

The parameter to the system calls is usually some variable. What if the parameter is a list already? Do I need to test for it somehow, and if it's a list, prepend "bash" and "-c" to the list? How do I do that?

In the script there are lots of places like this:

my $error = system($cmd);
if ($error) {
die/warn "some error message";
}

Shouldn't there be a return in the system_bash function?

View 8 Replies View Related

Fedora :: Stuck With Bash Shell / Changing Default Shell To Tcsh?

Mar 14, 2010

I want to change my default shell to tcsh. I used

Code:
usermod -s /bin/tcsh username
command as given at url

But if I open a new shell, it is still a bash shell.

How do I make my default shell as tcsh?

View 6 Replies View Related

Programming :: Bash-shell-like Less Functionality In The Python Shell?

Jun 25, 2010

Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?

Example:

Code:

>>> import subprocess
>>> help(subprocess)
...
[pages of stuff to read]
...

I'm hoping so as I hate scrolling and love how less works with simple keystrokes for page-up/page-down/searching etc.

View 4 Replies View Related

Slackware :: X Crashes With Current (3/1/10)

Mar 4, 2010

I just made a current iso and installed current and when I tried to start X the screen was washed out in a rainbow kaleidoscope pattern. I exited out and ran xorgset and Xorg -configure. Both of these hardlocked my system.

BTW Im using a geforce 8800GT. i tried installed the nvidia driver but it still locks when I run xorgsetup.

I have to go to work, so I will post the logs when I get home

View 9 Replies View Related

Slackware :: Krusader Compile Crashes In Current

May 2, 2010

Running slackware-current

The krusader slackbuild crashes on my machine with the following error, see attached.

View 3 Replies View Related

Slackware :: Upgrade To Current - Crashes After Reboot

Jan 20, 2010

First: I upgraded my slackware 13.0 last night (Philippine time) to -current. I just download the while current tree (except for source) and copied to my home dir, then do the slackpkg commands.

#1 Added a mirror to my home directory pointing the slackware-current tree.
#2 slackpkg update
#3 slackpkg install-new
#4 slackpkg upgrade-all
#5 slackpkg clean-system
#6 lilo was configured
#7 reboot

It successfully upgraded. Although I'm aware that I have installed openchrome driver and drm kernel module when it was slackware 13.0.

After a reboot, it crashes in between the boot time, if I was not mistaken, I read ACPI something on the bottom of the console, then the screen flickers and goes blank. It locks up there.

By the way, it is a laptop with VIA chipset on it.

(Using the Slackware 13.0 DVD, I booted using hugesmp.s root=/dev/sda3 rdinit= ro for the rescue.)

Trying to fix it by myself (no internet at home) I tried to look at /var/log/messages and cannot find what is the cause (newbie mode). I also tried to disable some services such as hald, httpd, mysqld, bluetooth, wicd, wireless, the old kernel and some others at /etc/rc.d/ by removing the execute bit.

After a restart, still the problem exists.

Now, I finally backup the whole home dir, moved to home-bak and decided to install the fresh slackware-current instead.

Second: I used the 13.0 installer, then setup slackware using the pre-mounted directory containing the slackware-current tree. I only deleted the files except for home-bak and not reformat the drive.

It actually installs, but after the reboot (using the new 2.6.32.3 kernel), still the problem persists.

View 9 Replies View Related

Slackware :: X Crashes After Update To -current / Resolve This?

Dec 17, 2010

I recently upgraded to -current from 13.0 on my Dell Inspiron 1525 Laptop. It seems to have strange problems since then. The X crashes after sometime if I am running a video in firefox (flash based, say .....) in the full-screen mode. When I am not in the full-screen, it seems to run just fine. A similar thread was posted a few days back (http://www.linuxquestions.org/questi...rashes-846796/) and I thought I had overcome the problem using one of the suggestions provided, but apparently, I just had not run full-screen videos ever since (and I thought it was solved!). code...

I should mention that, the crash happened when I was running a video chat on gmail in full-screen mode too. I have the Xorg.0.log for that too, if it is going to be helpful. Also, one thing I noticed was that even Ctrl+Alt+b_space does not work when this crash happens!! (so, I have to go ahead and reboot the system using the power button everytime) This I find very strange, since if at all, I should have been able to kill the process and restart X.

This seems to be an extraordinarily long thread, but I have put in whatever I thought could be useful info I should give. I will appreciate any help in resolving this issue.

View 3 Replies View Related

General :: Strace Option ?

Jan 22, 2010

How option of strace are used with example, like strace -e trace=file,strace -e trace=process,strace -e trace=signal, strace -e trace=network, strace -e trace=ipc.

View 4 Replies View Related

Programming :: Cross Between Strace And Gdb

Dec 6, 2010

I want to run a program under ... something like strace, something like gdb. Let's call the something Fred. Every time I run a particular program under Fred, it detects when a system call is about to take place or a signal has occurred, and traps to Fred, which decides dynamically how to respond, whether the stimulus is a signal or an attempted open(), close(), read(), write(), socket(), connect(), listen(), select(), ioctl(), time(), or whatever. Although strace does this marvelously, what I'd like Fred to do is use code that I supply to doctor up what the subject program sees. In the case of write(), it should be able to modify what actually gets written. In other words, a hard shell environment around the program which completely mediates between the subject program and the outside world. I'll start with the source code for strace and gdb if I have to. But has this been done already?

View 12 Replies View Related

Slackware :: Installed The Latest Changes To Current - X Crashes And Reports A Segmentation Fault, Address Nil

Nov 14, 2010

X crashes and reports a segmentation fault, address nil. I've been using the generic Radeon driver without any problems, until now.

View 14 Replies View Related

General :: Environment Variable And Current Shell

May 24, 2010

I am using Red Hat Linux Enterprise 5. I know the theory that -- using export to set environment variable, the environment variable will apply to current and child environment, but without using export to set environment variable, the environment variable will only apply to the current environment. What is the exact definition of "child environment" and "current environment"? For example,

Code:
$ var1=123
$ echo "Hello [$var1]"
The value of var1 (which is 123) is printed in shell, but I think echo is a command invoked by current shell, and it (the echo command) should be a child environment of current shell and the value of var1 should not (because not using export var1=123) impact echo.

View 13 Replies View Related

General :: Call A Script In New Shell From Current?

May 3, 2010

How to call script b from inside script a in a new shell.

View 2 Replies View Related

General :: Strace / Truss Sometimes 'fix' Stuck Processes - Why Is So?

Apr 23, 2010

Sometimes you have a stuck process that's been stuck for a while, and as soon as you go to poke at it with strace/truss just to see what's going on, it gets magically unstuck and continues to run! So from merely 'observing' these programs have some impact in the running of the stuck programs .. what's happening here? Did strace (I guess via ptrace(2)?) send a signal, causing the program to cease blocking, or such?

I've seen this several times -- most recently on Linux RHEL 4 (and a Perl script mucking with processes and doing some network IO in that case), but in a few other contexts as well. Unfortunately, I can't reproduce this, as it times to happen ... in times of crisis. But my curiosity remains.

View 1 Replies View Related

Debian Multimedia :: Current Status Of Gnome Shell?

Jul 28, 2010

I'm using Squeeze, and haven't seen an update in the Debian repo for some time. Seeing as it's due for release soon (September), can we expect some updates in the near future? I had been using Gnome Shell in Ubuntu with much success, including compiling my own. These days, I cannot afford the bandwidth, and have encountered an unknown problem [URL] under Debian Squeeze. Currently, I'm experiencing a very annoying flickering issue using the repo version which I know does not exist anymore in the current gnome development. To have at least one update now before the release date would be nice to see.

View 14 Replies View Related

Networking :: Automaticaly Get Current URL Address For Use In Bash?

Sep 16, 2010

I've tried hardy to grab URL adress from my firefox "address bar" with bash. Is there any way to capture current url adress(or current url location, or current domain) from any decent browser (or by listening to own traffic.)

View 3 Replies View Related

Programming :: Referring To The Current Terminal In A Bash Script?

Dec 22, 2010

I've got some bash scripts that I'm testing which operate on different screen sessions under different usernames. In order to check the status of them, however, I have to attach the screen sessions to my current terminal.

I run into problems, though; I only allow SSH to my machine from one username; the others shouldn't need SSH access. So, I log in as one user, and su into whichever user I need. Without performing a chmod o+rw on the terminal before I su into a different user, screen complains that it can't reattach to my terminal, because the user trying to make it attach doesn't have the permissions to do so.

Seeing as I forget to do this a lot, I wanted to make a script that I'd run on log-in to do this for me. Unfortunately, I don't know if there's a bash variable that refers to the current terminal - I can't always guarantee that I'll be logging in to /dev/pts/0, especially if my internet connection gets cut and I leave a hanging terminal...

Is there a variable for that or a way to refer to it in a script? If not, how do I work around that?

View 4 Replies View Related

Slackware :: Sbopkg - B0rked By Bash Upgrade In - Current?

Mar 3, 2010

I recently upgraded my -current box, and now when I try to run sbopkg I get the exact error described in the following thread:[URL].. The error fwiw is as follows:

root@catbutt:~# sbopkg
ERROR
sbopkg: Invalid repository descriptor
Line
SBo 13.0 "SBo repository for Slackware 13.0" _SBo rsync slackbuilds.org::slackbuilds/13.0 GPG
of
/etc/sbopkg/repos.d/40-sbo.repo
specifies an unknown fetching tool (rsync).

seems likely given the discussion in that previous thread that the bash upgrade (to 4.1.002) in the recent -current onslaught is responsible?

View 6 Replies View Related

Fedora :: Bash Function Alias To Recursively Grep Current Directory?

Feb 14, 2011

This should be a simple thing to accomplish, but I can seem to figure it out. Essentially, I want to have a bash alias or function that will let me recursively grep the current directory. A while back I added this to my .bashrc:

Code:

alias rg="grep -r --exclude=*/.svn/* --exclude=*.swp"

This works fine, (and also ignores any svn and vim swp files), and I can call it like:

Code:

rg foo *

However, 99.999% of the time, I am only interested in searching in the current directory, so the "*" is a bit redundant. Also, I would say 5-10% of the time, I am typing faster than thinking and forget the "*", so grep just sits there trying to read from stdin. It's a pretty minor thing, but ideally I'd like to be able to just type:

Code:

rg foo

I've tried creating a function to handle this:

Code:

function rg(){
grep -r --exclude=*/.svn/* --exclude=*.swp $1 *
}

but it behaves exactly the same as the alias above. escaping the "*" with 's doesn't work, and neither does trying `pwd` (or even a hard-coded path) in its place.

View 2 Replies View Related

General :: Bash History And Keeping Track Of Current Working Directory?

Jun 8, 2010

I would like to keep track of not only what bash commands I used and when, but also where they were issued from, i.e. what was the current working directory when I issued "foobar" on a particular day and time. Can we ask bash history to keep track of working directories too? I have tried to get an idea of this reading the enormous "man bash", but I don't seem to have an answer yet either way.

View 11 Replies View Related

General :: Configure Bash Prompt To Show Current / Parent Directory Only

Oct 15, 2010

I would like to modify Bash Prompt so it does not show the whole $PATH but just the current and parent directory. I am using Ubuntu.

View 3 Replies View Related

General :: Bash Script - Obtain Current Workdirs Of All Konsole Terminal/sessions?

Jan 15, 2011

I am trying to write a bash script that would save the current state of my konsole terminals and sessions. I'm using KDE3.X and for some reason the "profile" save does not save the current working directories... Anyway, I would like to know if there is an elegant way to obtain the current workdir of each terminal and session ? I've managed to do something with a clever use of DCOP extended functions, but it requires me to start every konsole with the --script option enabled, and I don't want to do that.

View 9 Replies View Related

Ubuntu :: Does It Use Bash Or Some Other Shell

Sep 16, 2010

Does it use Bash or some other shell?

View 2 Replies View Related

General :: How To Use Foreach In Bash Shell

Mar 25, 2010

I used c-shell previously in unix. One of the useful command I used frequently is foreach.> foreach a (`cat list`)>> echo $a need to use bash shell now instead, and realized that I can't use foreach anymore. The command is not found. Does anyone knows if there is similar command / function in bash shell?

View 9 Replies View Related

General :: Use Bash Shell When I Run A Program From It?

May 11, 2011

So I open firefox from my bash shell with:

Code:
firefox google.ca
it opens firefox, I can browse, etc.
Now if I alt-tab back into my shell, i can't enter any commands in the shell.

I know that i can do this if I close firefox, but I want to keep working in my shell with firefox still open.

Is this possible?

View 6 Replies View Related

Software :: Get The 'bash' Or 'csh' Shell From Within Gvim?

Apr 8, 2010

I use ":!shell_command<enter>" OR ":sh<enter>" in gvim to execute shell commands or to get a shell. But I am getting an 'sh' shell. Is there a way to get the 'bash' or 'csh' shell from within gvim?

View 1 Replies View Related

Software :: IDE For Bash / Shell Programming

Mar 24, 2010

I just wanna ask if there's a ide for bash/shell programming?

View 2 Replies View Related







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