Page 1 of 2 [ 22 posts ]  Go to page 1, 2  Next

gamefreak
Veteran
Veteran

User avatar

Joined: 30 Dec 2006
Age: 35
Gender: Male
Posts: 1,119
Location: Citrus County, Florida

25 Jun 2009, 9:29 pm

I know that in Windows to terminate a unstable service or program you do Ctrl-Alt-Del. Whats a way to do the same in linux.



pakled
Veteran
Veteran

User avatar

Joined: 12 Nov 2007
Age: 67
Gender: Male
Posts: 7,015

25 Jun 2009, 10:12 pm

ctrl+c works most of the time for me.

The experts will probably have the details, bot you can send a job to the background, or use the 'kill' command, to stop something not working.



Orwell
Veteran
Veteran

User avatar

Joined: 8 Aug 2007
Age: 35
Gender: Male
Posts: 12,518
Location: Room 101

25 Jun 2009, 10:35 pm

gamefreak wrote:
I know that in Windows to terminate a unstable service or program you do Ctrl-Alt-Del. Whats a way to do the same in linux.

Well, see... it depends. Pakled's control-c suggestion will work for anything you're running in a terminal. If you're doing something out in the GUI, then the keybindings will be different depending on your desktop environment/window manager of choice. And of course, whatever GUI you choose to use, you can almost certainly customize those keybindings to your own preferences.

You use (x)Ubuntu, right? Install Compiz-config and compiz fusion icon from add/remove. There's a plugin in Compiz called "crash handler" or something like that. Lets you click on an unstable/unresponsive app to kill it, and provides an easy way to set the keybinding for it. I believe there's another utility in GNOME that does the same thing, but I can't check that right now. I believe it's an icon you can add to your panel that enables you to terminate unstable programs. Ubuntu used to use control-alt-backspace to restart X entirely, landing you back at the login screen. They've changed this by default (Fuzzy knows the new key combination, something ridiculous like alt-print-f4) but you can get the old behavior back by installing the "dontzap" package and running "sudo dontzap --disable" (without the quotes).

Honestly, I never managed to run into enough instability to make it worth my time to learn how to deal with such problems. And on the few occasions Ubuntu crashed on me, it crashed hard and required a reboot anyways. Nowadays, when something is misbehaving I just open up a terminal and type "killall [insert misbehaving program here]"


_________________
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH


Fuzzy
Veteran
Veteran

User avatar

Joined: 30 Mar 2006
Age: 52
Gender: Male
Posts: 5,223
Location: Alberta Canada

25 Jun 2009, 11:40 pm

If you have control you can open a terminal and say killall firefox (or whatever). This is good for things running in the background.

You can also alt-f2 and type xkill. The mouse will turn into an X and you then click the out of control window. It will die. Should work from the terminal as well.

If you are really messed up, try alt-prtscn-k. this will reset x, close all your open apps and send you back to log in. Its fast. Its like a fast restart almost.

if you are really, really messed up(alt-printscreen-k doesnt work), then try alt+sysreq REISUB typing r-e-i-s-u-b very slowly sysreq is the same as print screen normally. This will shut down all services cleanly in order... it speaks directly to the hardware, so it should always work.

Baring all that, holding the powerbutton should work.

There is a nice cheat sheet you might find useful at fosswire..

http://fosswire.com/post/2008/04/ubuntu-cheat-sheet/

I believe some of them no longer work. Control alt backspace for instance.


_________________
davidred wrote...
I installed Ubuntu once and it completely destroyed my paying relationship with Microsoft.


Orwell
Veteran
Veteran

User avatar

Joined: 8 Aug 2007
Age: 35
Gender: Male
Posts: 12,518
Location: Room 101

26 Jun 2009, 12:38 am

Fuzzy wrote:
You can also alt-f2 and type xkill. The mouse will turn into an X and you then click the out of control window. It will die. Should work from the terminal as well.

That's what I was looking for. There's a GNOME panel applet to trigger xkill for better convenience, and a compiz plugin to do the same.

Quote:
I believe some of them no longer work. Control alt backspace for instance.

Sure it works... you just have to enable it. That's one of my first tasks in setting up a new Ubuntu install. But Jaunty broke too many things, so I'm taking a brief hiatus to let them figure stuff out.


_________________
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH


Fuzzy
Veteran
Veteran

User avatar

Joined: 30 Mar 2006
Age: 52
Gender: Male
Posts: 5,223
Location: Alberta Canada

26 Jun 2009, 12:57 am

Orwell wrote:
Fuzzy wrote:
You can also alt-f2 and type xkill. The mouse will turn into an X and you then click the out of control window. It will die. Should work from the terminal as well.

That's what I was looking for. There's a GNOME panel applet to trigger xkill for better convenience, and a compiz plugin to do the same.

Quote:
I believe some of them no longer work. Control alt backspace for instance.

Sure it works... you just have to enable it. That's one of my first tasks in setting up a new Ubuntu install. But Jaunty broke too many things, so I'm taking a brief hiatus to let them figure stuff out.


Guess you dont have print screen, do you?


_________________
davidred wrote...
I installed Ubuntu once and it completely destroyed my paying relationship with Microsoft.


Orwell
Veteran
Veteran

User avatar

Joined: 8 Aug 2007
Age: 35
Gender: Male
Posts: 12,518
Location: Room 101

26 Jun 2009, 1:03 am

Fuzzy wrote:
Guess you dont have print screen, do you?

Nope. No I don't. There are some other keyboard layout quirks on Apple hardware- no Delete key, for instance. Well, we have a key called Delete, but it's actually Backspace.


_________________
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH


lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 76
Gender: Male
Posts: 9,795
Location: Somerset UK

26 Jun 2009, 5:57 am

One more thing.... I often keep a login going on one or more of the virtual terminals. Ubuntu defaults to six of them. You get to them from the GUI via Ctrl/Alt/F1, up to F6. Once out of the GUI, you don't need the Ctrl key, just Alt/Fx will switch between them.

To get back to the (first) GUI, use (Ctrl/)Alt/F7. I sometimes run a second copy of X, and that goes at (Ctrl/)Alt/F8, where you'll initially find the startup log. I'm never quite sure what (Ctrl/)Alt/F9 ia all about.

Oh... and the point of it all? Sometimes I find it more convenient to "poke around" with the GUI from outside of it.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


RarePegs
Deinonychus
Deinonychus

User avatar

Joined: 20 Oct 2008
Age: 59
Gender: Male
Posts: 333
Location: Northern Ireland

26 Jun 2009, 7:34 am

Have you tried Alt+Ctrl+Backspace?



LostInEmulation
Veteran
Veteran

User avatar

Joined: 10 Feb 2008
Age: 42
Gender: Female
Posts: 2,047
Location: Ireland, dreaming of Germany

26 Jun 2009, 9:41 am

Orwell wrote:
Quote:
I believe some of them no longer work. Control alt backspace for instance.

Sure it works... you just have to enable it. That's one of my first tasks in setting up a new Ubuntu install. But Jaunty broke too many things, so I'm taking a brief hiatus to let them figure stuff out.


sudo joe /etc/X11/xorg.conf

then add this:
Section "ServerFlags"
Option "DontZap" "off"
EndSection

then save and re-start X11.

Instead of joe, you can of course use any other text editor.


_________________
I am not a native speaker. Please contact me if I made grammatical mistakes in the posting above.

Penguins cannot fly because what cannot fly cannot crash!


Last edited by LostInEmulation on 26 Jun 2009, 9:45 am, edited 1 time in total.

Orwell
Veteran
Veteran

User avatar

Joined: 8 Aug 2007
Age: 35
Gender: Male
Posts: 12,518
Location: Room 101

26 Jun 2009, 9:44 am

LostInEmulation wrote:
Instead off joe, you can of course use any other text editor.

Which of course means Vim.:wink:


_________________
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH


LostInEmulation
Veteran
Veteran

User avatar

Joined: 10 Feb 2008
Age: 42
Gender: Female
Posts: 2,047
Location: Ireland, dreaming of Germany

26 Jun 2009, 9:47 am

Orwell wrote:
LostInEmulation wrote:
Instead off joe, you can of course use any other text editor.

Which of course means Vim.:wink:

Joe is the first thing I install on any given Linux. :wink:


_________________
I am not a native speaker. Please contact me if I made grammatical mistakes in the posting above.

Penguins cannot fly because what cannot fly cannot crash!


DavidK
Sea Gull
Sea Gull

User avatar

Joined: 6 Jun 2009
Age: 39
Gender: Male
Posts: 219
Location: Kent, UK

26 Jun 2009, 10:26 am

LostInEmulation wrote:
Joe is the first thing I install on any given Linux.

Same here.

/me awaits emacs/vi war



Orwell
Veteran
Veteran

User avatar

Joined: 8 Aug 2007
Age: 35
Gender: Male
Posts: 12,518
Location: Room 101

26 Jun 2009, 12:04 pm

DavidK wrote:
/me awaits emacs/vi war

$ su
Password:
# aptitude install emacs
Reading package lists... Done
Bulding dependency tree
Reading state information... Done
Reading task descriptions... Done
The following NEW packages will be installed:
emacs emacs22{a} emacs22-bin-common{a} emacs22-common{a}
emacsen-common{a} xaw3dg{a}
0 packages upgraded, 6 newly installed, 0 to remove and 0 not upgraded
Need to get 17.9MB of archives. After unpacking 62.8MB will be used.
Do you want to continue? [Y/n/?] n

An editor should not take up that kind of space. For reference, vim (the full vim, not Debian's default vim-tiny) takes 1778kB (that's a k, not an M) and my entire GUI (X11 and my window manager) takes up only marginally more space than emacs would. Also, I couldn't even get all the way through the emacs tutorial before my pinky finger started to hurt.


_________________
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH


lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 76
Gender: Male
Posts: 9,795
Location: Somerset UK

27 Jun 2009, 6:14 am

Why use anything but the shell?

In a root shell:

Code:
cat >> /etc/X11/xorg.conf  <<e

Section "ServerFlags"
Option "DontZap" "off"
EndSection
e


(OK, so "cat" isn't (usually?) built in, but I couldn't be bothered to figure out exactly how to do it with "echo", which generally is.)


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


Fuzzy
Veteran
Veteran

User avatar

Joined: 30 Mar 2006
Age: 52
Gender: Male
Posts: 5,223
Location: Alberta Canada

27 Jun 2009, 8:41 am

cat is provided with ubuntu.


_________________
davidred wrote...
I installed Ubuntu once and it completely destroyed my paying relationship with Microsoft.