I need to get a return code for the command ldapmodify.I try this and didn't workrc=ldapmodify -a -v -c -p $PORT -h $SRV -D cn=$USR,cn=Users,dc=company,dc=com -w $PWD -f $LDIFFILENAMECOUNTecho "return code " $rc what exactly the way to get the return code of that ?
How can I pass carriage return to a command. I am writing a shell script whcih generates ssh key pair. It ask for input from user three times. I want to pass carriage return (ie. press Enter button) to this command. Is tehre any way
Below is an example output of what I see when I run the 'ls' command on some directories in linux (this is from a tomcat/common/lib directory). However I'm not clear on why some of the filenames are appearing inside [square brackets]
I am testing the serial ports on a Single Board Computer(SBC) running Linux kernel 2.6.29. I usually do this by connecting the serial port to another PC serial port, then doing "cat /dev/ttyS0" on PC and "echo hello > /dev/ttyS0" on the SBC. However in the current system, "echo hello > /dev/ttyS0" command does not return at all! Also no characters appear on the destination port. I am running the echo command as root. The system boot messages show that the serial port in indeed /dev/ttyS0.
I'm creating a usb device driver that needs to be able to read from two different endpoints. I couldn't see any way of having two read functions in the driver, so I got round this by reading from one of the endpoints with read, and the other with ioctl.However this hasn't worked, the ioctl call from c returns -1. I added a printk command in the driver in the ioctl function, however looking at kern.log I can see that this function is never being called. Does anyone have any ideas as to what the problem called be, or a better method of being able to read from two different endpoints?
But in this way the command console will keep hang. Now I want to write a script which calls u this command and return back to the command console. Here is what I wrote but it doesn't return back to the command console:
Code:
#!/bin/sh MSGBP_HOME="/opt/jboss/MSGBP" case "$1" in start)
How can I pass carriage return to a command in the shell script. I am writing a shell script whcih generates ssh key pair. It ask for input from user three times. I want to pass carriage return (i.e., press Enter button) to this command.
But I want it to return just "0m1.001s", the portion is the group. I can just apply egrep to whatever the first command returns but is there an easier way to do it?
In a nutshell: If the computer goes to blank screen (set that way in screensaver settings) I can hit a key and get the unlock dialog. However, if I walk away for longer and come back, I can't get the machine to wake up. It is powered on, but nothing comes up on the screen. I can't get other terminals by using ctrl-alt-FunctionKeys, either. I CAN, though, ssh into the machine from my desktop computer, and that works normally.I've installed 10.04 off of a live CD onto my Toshiba Satellite A45-S250 laptop. I had originally tried upgrading from 9.10 on the machine, however it wouldn't boot after the upgrade. The live CD also originally wouldn't work for me until I used a work around that involved adding "i915.modeset=0 xforcevesa" to the boot command line of the "Install Ubuntu" option of the live CD. This caused the CD to install, and now the laptop works properly.
The computer boots normally now, but on shutdown, the screen does go all "squiggly" before turning off.This doesn't interfere with the shut down or start up, though.I can post whatever logs or such that would help, but would have to be told what is relevant here. I've been using ubuntu on and off on this laptop since sometime in 2005, and have never experienced an issue like this.
I would like to disable the login screen when the computer returns from suspension and hibernation, so that it will automatically log me back in. I am using Ubuntu 9.10.When I come back from suspension, for some reason, my key board does not work in the login screen and I cannot type my password.
I use a laptop, and frequently plug in to a separate monitor or to a TV screen. I have it set up to to separate X screens. When using my laptop touchpad, I find that once I move to the other monitor or TV screen, I can't return back to my laptop monitor. My USB mouse, however, is able to transition from screen to screen with no problem. I am using ubuntu 10.04 but had the same problem with 8.04 before I upgraded. I have an NVIDIA graphics card, and use the nvidia-settings (which generates the xorg.conf file) to manage the screens. Here is my xorg.conf:
Code: # nvidia-settings: X configuration file generated by nvidia-settings # nvidia-settings: version 1.0 (buildd@crested) Sun Feb 1 20:25:37 UTC 2009 # nvidia-xconfig: X configuration file generated by nvidia-xconfig # nvidia-xconfig: version 1.0 (buildmeister@builder58) Fri Aug 14 18:33:37 PDT 2009
An ubuntu-11.04 laptop is set to turn on the screensaver after 5 minutes of inactivity, and power management is set to blank the display after 15 minutes of inactivity. When the screen goes blank, you're supposed to be able to move the mouse to return to your Gnome desktop. This works sometimes, sometimes not. When it doesn't, moving the mouse doesn't eliminate the black screen, although I can see the mouse cursor. ctrl+alt+del does nothing, neither do alt+tab, alt+esc or ctrl+alt+esc. ctrl+alt+f1-12 work as they usually do, so I can "sudo /etc/init.d/gdm restart" from one of the TTYs, or via ssh.
I tested just now with setting the screensaver and power management display blanking to 1 minutes. After a minute the screen went blank (backlight on), and then after a second or two black (backlight off), and moving the mouse returned to Gnome as it should. So I don't know why sometimes it doesn't. Two questions:
1- Which program can I run, or which service can I restart, to return to Gnome without having to kill gdm and lose all open windows?
I'm starting the first command in screen like this: screen -d -m -S testen -t lalala watch df -h Now I have a screen session running in background and I can reconnect at a later time. But how can I run a second command (in a new window) in the same screen session?
After running a command that spits out a lot of output in screen. I drop to Copy mode and try to find where the command start. This becomes very very challenging when there are lots of lots of similar text to sift through. Is there a way for me to quickly scroll to where my command starts?
I'm currently writing a C++ application to manage some screen functions in Debian(server).
However this issue have bothered me for 2 days now...
What I want to do is to send a command to an attached screen which is running.
Used the following command: Code: screen -S screenwindow So I send a command with the -X parameter, which works just fine... Code: screen -S screenwindow -X stuff yes The command I want to send is "yes" and it does appear in my screen window when I attach it.
But the problem is that I need it to submit it... well I need to press "enter" and I've been looking everywhere on how to do that.
Because right now it hangs on a line like this: Code: Something here, do you want bla bla: yes Obviously I could just press enter myself, but the problem is that it's running as a deamon and but it is supposed to do this all by itself .
I was looking for a command to log off the user who froze the screen. I logged in as a new user but I got some errors now all I see is the color screen, how can I log the new user off (the GUI)? I did the above command but nothing came in return?
While attempting to install an external screen on my laptop I messed up the KDE screen settings and upon reboot I get a command line interface.Which configuration file should I edit to set up my screen so that I get my Debian lenny KDE GUI back?
I just bought this desktop from my friend and it runs win 7 and ubuntu 10.04. it worked very well the first two days until I changed the hostname of the system.
I did like: hostname myNewName
And everything worked fine. The problem now is when I start ubuntu and and reach username and password screen , I enter my password to login the screen becomes black and return me again to the screen where I put my password again. If I entered wrong password , the system message stating wrong password. On the other hand, when I try to run ubuntu from live-cd I can login easily and access my account.
My friend told me he removed Naultius package and reinstall it for some reason before he gave it to me. Note windows 7 is working properly.
After the 5.4 OS sits with no user activity for 15 or so minutes, the screen goes black. This is anticipated, but no key combination seems to bring it back to life.
I discovered that Ctr+Alt+BackSpace ends the login session and takes you to the login menu. This is better than nothing but it isnt exactly what i had in mind.
Does anyone know how the key combination to return to the current user session, or how to disable the screen entirely.
I was running scripts overnight from the command line (inside Screen on a Linux EC2 instance) and some errors that I was not tracking occurred. I want to "scroll up" or view more of the history in Screen, but I cannot seem to find any commands that will work. I need to see the onscreen output "further up" than I can on my current screen. CTRL + a is supposed to put me into scroll mode inside Screen, but it's not working.
I am having an install problem where the distro I am installing, installed at the wrong screen resolution. The display settings menu doesn't offer the correct resolution so I'm using half my screen real estate.
I am unable to use clear or cls command on bash shell. I have recently installed Cygwin and am using that for practicing unix commands.
I see that I can use Ctrl + L to clear the screen. I created an alias in my .bashrc to do the same as alias cls='^L'
This is how i defined other aliases e.g.
And they work. Hence I assume cls will work too but this is what I get when I try to give cls on command prompt. Am i missing something? Is there a way to do this?
Then someone suggested, You cannot alias keystrokes to commands or vice versa. You could just alias cls to an echo command: echo -en "x0c"
And I added the following to .bashrc,
Sourced the .bashrc file. No errors but cls still does not clear the screen. Infact when I typed the echo -en "x0c on command prompt as well, nothing happened. What does this command do?
I was wondering if theres a commandline prog that could give me an 'X' (like xprop does) so that I can point to a particular pixel and it give me the X and Y cordinates of that pixel?