Ubuntu Servers :: Writing Init Script - Signals To Kill The Process (Ctrl-C) From A Bash Script And Exit Dtach (Ctrl-`)

Dec 5, 2010

I'm trying to write a init.d script to daemonise a sagemath notebook server. Here's what I've done so far, I've copied /etc/init.d/single for the structure, and tried to use dtach to provide a handle to access the process. However, my main problem is issuing the signals to kill the process (Ctrl-C) from a bash script and exit dtach (Ctrl-`)

[Code]...

View 1 Replies


ADVERTISEMENT

CentOS 5 :: Why 'ctrl+a, K' Nor 'ctrl+a Kill' Doesn't Work For Screen Windows?

Oct 3, 2010

anyone has a clue why 'ctrl+a, k' nor 'ctrl+a, :kill' doesn't work for killing one of screen windows? Other screen's commands invoked with 'ctrl+a'seem to work.

View 3 Replies View Related

General :: What To Do When Ctrl-c Can't Kill Process?

Feb 9, 2011

Ctrl-c doesn't always work to kill the current process (for instance, if that process is busy in certain network operations). In that case, you just see "^C" by your cursor, and can't do much else.What's the easiest way to force that process to die now without losing my terminal?

Summary of answers below:Usually, you can Ctrl-z to put the process to sleep, and then do "kill -9 process-pid", where you find the process's pid with 'ps' and other tools.On Bash (and possibly other shells) you can do "kill -9 %1" (or '%N' in general) which is easier. If Ctrl-z doesn't work, you'll have to open another terminal and kill from there.

View 6 Replies View Related

General :: Shell Command Equivalent To (Ctrl+C) To Exit From A Process?

Apr 1, 2011

I write a script to read a file which is something like a pipe (or) queue , which shows the running status.In normal case, if i open this file with cat command, i have to use ctrl+c to exit this . What command shall i use to do the same inside a shell script ? I have tried ^C in my script , but it does not exit the process.

View 6 Replies View Related

Ubuntu :: Map Ctrl+W In Hebrew Layout(which Is Actually A Ctrl+') To Be A Ctrl+w?

Jan 5, 2010

I have 3 layouts: USA, Russian and Hebrew. In Hebrew the W key is mapped to apostrophe, so Ctrl+W in Hebrew layout doesn't close tabs in Firefox. There is no workaround for it as I see by now, so I am trying to get it work this way:I want to map Ctrl+W in Hebrew layout(which is actually a Ctrl+') to be a Ctrl+w. Here is what I got from xmodmap:Code:$ xmodmap -pke | grep 25keycode 25 = w W Cyrillic_tse Cyrillic_TSE apostrophe WAs you can see, there are pairs for each layout, each pair tells what happens without and with the Shift key pressed.

View 2 Replies View Related

General :: Disable Ctrl+C, Ctrl+V, Ctrl+X In Rdesktop?

Dec 27, 2010

I am doing a project on rdesktop. My aim is to setup a write/copy protected session. I have made rdesktop connection between two Linux machines using Xrdp.Next I want to disable the ctrl+x,ctrl+v keys and the cut and copy option in mouse right click at client side

View 1 Replies View Related

Programming :: Recognizing Ctrl+c,ctrl+l,ctrl+d In C Programs?

Aug 19, 2009

i am using gcc 4.3i need to recognize ctrl+c,ctrl+l,ctrl+d in my C program without terminating the program when i get a ctrl+c...

View 1 Replies View Related

Ubuntu :: Cannot Exit TTY Even With Ctrl+Alt+F7 On 10.10

Nov 29, 2010

Here I was, having problems with the resolution then I stopped the X server as was instructed at the tutorial. I followed it all then rebooted. But I found that even after reboot, I'm still stuck with TTY. I clicked Ctrl Alt F7 but still it's a terminal and it did not return to the GUI or the normal desktop. What will I do to exit it? It's a good thing I have windows vista along with it or else I'll now have a computer that I can't use outside the terminal.

As nothingspecial said, I should place the link of the tutorial I was following: [URL]

View 4 Replies View Related

Ubuntu :: Keyboard - Can Not Copy/paste Ctrl+C Or Ctrl+p From One Folder To Another With Mouse

Sep 5, 2010

I can not copy/paste ctrl+C or ctrl+p from one folder to another with the mouse. i was trying to move an item to another folder.

I looked in the keyboard short cut and it was not there. i tried to add it and it put it in custom as disabled and I could not enable it.

View 2 Replies View Related

Ubuntu :: Freezes Mouse After Changing A Tab (with Ctrl+tab, Alt+#) Or Closing It (ctrl+w)?

Nov 11, 2010

I just installed Ubuntu 10.10 x64 and already am really annoyed by Firefox, which freezes my mouse after changing a tab (with ctrl+tab, alt+#) or closing it (ctrl+w). After about one second, i can continue working as usual. Changing Tabs by just clicking on one does not freeze anything...Maybe some of you would think now if I am crazy because of complaining about such a little thing, but it is really annoying if you are used to work fluently with ff.Edit:I today noticed, that not only shortcuts in firefox, but all Hotkeys freeze my mouse for a second. For examle ctrl+c, ctrl+v, super+e or anything else.Do you have any Idea what causes this behaviour? Reinstalling ubuntu didn't change anything

View 4 Replies View Related

General :: Vim:ctrl+v Command To Select Some Data.But When Push Ctrl+v.It Doesn't Work?

Nov 28, 2010

" Mark the start of the text with "v", "V" or CTRL-V. The character under the cursor will be used as the start.""With CTRL-V (blockwise Visual mode) the highlighted text will be a rectanglebetween start position and the cursor."I can mark the start with "v" or "V".But it doesn't work when I push ctrl+V.

View 14 Replies View Related

CentOS 5 :: Ctrl S During Init Script Can Cause System Hang?

Sep 6, 2010

I am running Centos 5.5 with all the GUI stuff, including nx server and webmin.Sometimes while watching the bootup messages because my eyesight is very poor.I hit <ctrl s> to pause the output so I can read some details. If I do this late in the init sequence - it often briefly stops the output then the screen disappears under a blue wash (presumably something to do with the GUI login screen ot screensaver??)but the login screen never appears. Also it seems that the script never completes because the imap, webmin and http servers don't appear to have started.

I haven't found any satisfactory way out of it. I can't get back to a console terminal (I've tried ctrl c, d, z, etc.). As luck would have it the nx server has started so I can open an nx session. If I open a terminal in an nx session as root.I can't do a normal restart (shutdown -r now). Nothing happens presumably it can't run the init script because it is still running.The only way I have found to get the system back to life is to run "shutdown -r -n now" in the nx terminal session.There are probably better ways out of this predicament that I am unaware of. Otherwise it is probably somewhere between an annoyance and a bug. I would be interested in any advice the centos "board" may have as to whether this is worth raising as a redhat bug.

View 3 Replies View Related

OpenSUSE :: Ctrl+z And Ctrl+c Do Not Work Without A Third Keystroke

Feb 3, 2010

I just spent a few days ripping out all the broken/buggy apps that are in the opensuse 11.2 official repos so I can finally get working software(openoffice, thunderbird, wine, eclipse, rubygems, rails, and a few others required getting the "official" versions from their respective websites to avoid strange behavior and outright broken functionality).

All of which makes updating more annoying and time-consuming. Why are opensuse packages so different anyway? Anyway, the last thing that I have noticed to fix is Konsole. For some really bizarre reason ctrl+z and ctrl+c do not work without a third keystroke: enter.Maybe this is something new with the KDE team, since they seem bent on making simple things that already work more complex, but given my experience with crappy packages in the suse repos, I am thinking this is the problem. I have looked over all the config settings that I can find and nothing fixes this affront to productivity.

View 1 Replies View Related

OpenSUSE :: Konqueror Can't Cut'n'paste With Ctrl C, Ctrl V?

Mar 7, 2010

I've been using Kaggregator in KDE-PIM, which uses Konqueror as the browserto go to links from Kaggregator.Unfortunately, Konqueror no longer seems tobe able to Copy highlighted material with Ctrl C, the way we've done it forever.Is this a setting I've missed? Or is this a new "feature" in Konqueror?

View 2 Replies View Related

Programming :: Bash Ctrl+c Tarp And Bash Read With Timeout?

Jan 24, 2010

simple bash code:

Code:
#!/bin/bash
trap "echo 'you got me'" SIGINT SIGTERM # to trap ctrl+c
echo "Press ctrl+c during 5 sec loop"
for ((i=0;i<5;i++)); do

[Code]...

How come code behaves normally and stops when ctrl+c signal is caught and resumes, but after I use at least one timeout read in the code it looks like, if signal is caught again it doesn't pause the execution but skips the loop. If you remove -t (timeout) option from the read, both loops look the same!

View 10 Replies View Related

Ubuntu :: Send Process To Working Backgroud For CTRL+Z Processes?

May 18, 2010

I would like to set process in background in such a way that it will be running.For example, I started vim editor and pressed CTRL+Z command to put the process in background. But this process is in stopped status, which I can check with 'jobs' command.Is there any way that stopped job can be put into running background process?

View 1 Replies View Related

Programming :: BASH: Detecting CTRL+C Being Pressed?

Jan 28, 2010

I am working on a script and I want it to detect if CTRL+C is pressed at any time during the script and have it not Break the script and display a message stating to use CTRL+Z instead. How can I do that?

View 9 Replies View Related

Programming :: Use CTRL+D Signal In Bash Script?

Jan 15, 2010

I am writing a bash script where I need standard Input should be saved in a file and should be terminated by passing CTRL+D signal. Any clue how can I do that in bash script.

e.g.
Enter one line at a time
Press CTRL+D to finish

View 1 Replies View Related

Fedora :: Ushare Configuration - Last Line Stop Process In The Terminal Via Ctrl+C

May 30, 2009

I just installed ushare on Fedora 10 (yum install ushare is all it took to do), and followed the guidance then to configure sharing for an Xbox 360, [URL] the code below. Notice the last line...due to stopping process in the terminal via Ctrl+C. It appears to me, based on this ending UPNP sharing, that the first line will need to be run each time want to turn on sharing, right? I thought this would simply configure ushare sharing one time, and possibly intiate some sort of file sharing service on each boot, but this appears not to be the case. If I am right, does anyone know how I can develop a script to run at boot to allow ushare to open sharing and keep it open?

[Code]....

View 3 Replies View Related

Software :: Change Bash Shortcut Keys Such As Ctrl-C?

Jul 5, 2010

I*am using Kubuntu 10.04. I would like to change some of the standard shortcut keys for bash (terminal).

I want:

Ctrl-C to copy the selected text to the clipboard.
Ctrl-V to paste from the clipboard into the terminal.
Ctrl-Z to undo.
Ctrl-Shift-C (or even better, Super-C) to terminate the command.
Ctrl-Shift-Z (or Super-Z) to be the background command.
I*don't even know what Ctrl-V did before, some I*won't worry about remapping it.

EDIT:*I*have no idea what is putting the * char after each "I". Maybe this is a non-breaking space?

View 14 Replies View Related

Software :: Make Ctrl + Backspace Work In Bash?

Jan 18, 2010

I've tried without luck to get ctrl-backspace working to delete the previous word in bash. I edited my .inputrc and tried the following:

"C-": unix-word-rubout
Control-Rubout: unix-word-rubout

I can make it work if I change it to some other sequence (Control-j: unix-word-rubout makes ^j erase the word), but I can't make it work with backspace.

View 6 Replies View Related

Server :: Writing Debian Init Script For Process That Has No Syslog Integration?

May 18, 2011

I have inherited ownership of a Debian server process that logs its error message to stdout/stderr. Currently its initscript has lines like:

start-stop-daemon [options] --exec $DAEMON -- $DAEMON_ARGS < /dev/null 2>&1 | logger $LOG_OPTIONS 2> /dev/null &

I have tried to abstract as much of that away as possible. The options specify a pid file, to make a pid file. A subsequent line tries to establish whether the process is up, though I think several conditions are not checked for. This script seems pretty ropey to me. I am trying to start again with the lsb-base one in /etc/init.d/skeleton though that is going to require a lot of modification. get the code change to use the syslog API however that is out of the question at least for now.

1.) Create a named pipe
2.) Start up a logger daemon that reads from the named pipe
3.) start up the server process that writes to the named pipe

It would be ideal for this if start-stop-daemon offered options to specify where the IO of the daemon process should be redirected to. However I am not about to offer to adopt that package (with ~400 bugs) so I doubt that will happen. Trying to specify the redirection on the command line does not work. In the case of the logger daemon start-stop-daemon seems to hang on the system call. In the case of the server process the pipe gets closed when start-stop-daemon exits, so the logger daemon exits. None of that seems surprising.So what I am doing now is to write simple wrapper scripts for the server and logger processes. Both wrapper scripts have this structure:

1.) sanity check the arguments
2.) exec program [suitable redirection of IO]

Then the start-stop-daemon can call the wrapper scripts as daemons. From my experiments so far this seems to work. However I feel a bit uncomfortable with this. It introduces several new wrapper scripts.I cannot think of any obvious security holes but I suppose race conditions are inevitable.

View 1 Replies View Related

Ubuntu Servers :: Disable Ctrl-alt-del On Lucid Server?

May 11, 2010

I would like to disable the ctrl-alt-del feature for a Lucid Lynx server.
i found some info on how to enable this in desktop environments, however nothing explaining how to disable it for a server.

View 3 Replies View Related

General :: Possible To Enforce A Certain Exit Code When Using "kill" To Stop A Process?

Feb 9, 2011

Is it possible to enforce a certain exit code when using "kill" to stop a process?

View 2 Replies View Related

Ubuntu :: Phantom User Still Logged In - Bash: Kill: (5485) - No Such Process

Sep 13, 2010

$ uptime
09:55:00 up 7 days, 6 min, 2 users, load average: 0.00, 0.00, 0.00

..but I'm the only user logged in!

$ who -a
system boot 2010-09-06 09:48
run-level 2 2010-09-06 09:48 last=

[code]....

looks as though this is the culprit, but...

$ kill 5485
-bash: kill: (5485) - No such process

This process doesn't exist in the /proc folder or the output of ps. Does anyone know how this happened, and how to remove this ghost user from my system without a complete reboot? I think I have seen a similar thing on a RedHat machine ages ago but I have never figured out how to log out these ghost users.

$ uname -a

Linux ubuntu 2.6.24-28-server #1 SMP Wed Aug 25 16:07:16 UTC 2010 i686 GNU/Linux

View 9 Replies View Related

Software :: Unable To Kill Process With Kill -9

Jan 13, 2011

the process is mcelog. When I do as root kill -9 2323 which is pid of mcelog the process is not killed. I tried doing the same from top, press K and enter pid of mcelog. doing ps auwx | grep mcelog I see there are several results. I tried killing all of them like kill -9 2355 2341 3425 2345. But re-running the above commands still shows them as running. How else would I troubleshoot this to avoid restarting of the box.

View 5 Replies View Related

Ubuntu :: How To Use The Ctrl-Alt-F2

Aug 16, 2011

after you hit ctrl+alt+F2 it says < [username]login: > i've tried a thousand different lines here and everytime it asks for password then says wrong login. what am I missing?

View 3 Replies View Related

Ubuntu :: Key Ctrl-Alt-R Doesn't Do Anything?

Jun 5, 2011

I've just done a fresh install of Natty. The key Ctr-Alt-R doesn't do anything. I've checked in both Unity and Gnome. Using the Keyboard Layout GUI when I press Ctrl and then Alt and then R, the Ctr and Alt keys light up but the R key doesn't. Ctr-Alt-S works (and so do the other keys I've tried). kev shows a keynotify event for Ctrl-Alt-R, not a keypress event. I've checked my Keyboard Shortcuts to make sure it isn't listed there, but since the Keyboard Layout doesn't show the R key being pressed I don't think it's a shortcut issue.

View 2 Replies View Related

CentOS 5 :: Alt-Ctrl-F1 Won't Available?

Dec 14, 2009

I switch from Gnome environmnet to text environmnet by ALT+CTRL+F1, but get this picture, anyone could tell me what's problem with it and how to solve it?

View 1 Replies View Related

Ubuntu :: Get A Higher Resolution When Use Ctrl+Alt+F2?

Jan 8, 2010

I'm trying to make get a higher resolution when I use Ctrl+Alt+F2, I've looked up in other forums but apparently 9.10 changed its methods to fixing your desired resolution. I've tried other ways of changing it but I get an error when I boot in to the system, I have Ubuntu 9.10 64-bit, a GeForce 8800m GTS, the highest my screen can go is 1440x900.

View 9 Replies View Related







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