[kde-linux] Shutdown on KDE+ terminal : questions

Duncan 1i5t5.duncan at cox.net
Fri May 24 04:37:54 UTC 2013


Andy Johnson posted on Thu, 23 May 2013 17:48:11 +0300 as excerpted:

> Hello,
> I am a newbie on KDE. I just ran away from Gnome when upgrading to
> Fedora 18 after some issues which are probably related to the desktop
> manager.
> 
> I have 2 issues - I hope you might advice:
> 
> 1) I found out the when I click the power down button, there is a
> counter of a minute or so untill it really shuts down.
> 
> Is there a way to change it that it will occur immediately ?
> (of course I know that I can run "shutdown -h now'" from a terminal,
> but I want to shutdown from the desktop, preferably with what I already
> have.

Yes.  I believe the following is what you are looking for:

In kde settings (called system settings by kde when /in/ kde, altho with 
a few exceptions most of the exposed settings are user-specific kde 
settings, not actually global system settings, so the old kde3 name 
kcontrol is actually far more accurate), system administration, startub 
and shutdown, session management:

Uncheck "Confirm logout."

AFAIK that /should/ do it for you, altho I actually handle things a bit 
differently here, using a keyboard shortcut instead of the normal logout/
shutdown menu entry most of the time, so I keep that setting checked 
here, in case I hit it accidentally with the mouse or something.

FWIW, the associated keyboard shortcuts are also found in kde settings, 
but in a different spot: common appearance and behavior, shortcuts and 
gestures, global keyboard shortcuts.

In the kde component dropdown, select "The KDE Session Manager".  There's 
only a few actions listed; choose the one(s) you want and select and set 
the keyboard shortcuts you want.

(Don't forget to hit Apply, down in the corner.  Gnome normally auto-
applies settings as you change them, while in kde, in most cases you can 
play around as much as you want, and as long as you don't hit apply 
before leaving, it'll leave the settings as they were.  So to change 
them, always hit apply, or OK, which auto-applies and then closes the 
dialog in most cases where it appears, not cancel, which closes the 
dialog without applying.)

(Here, the only one I have assigned a keyboard shortcut is the Logout 
without confirmation option, assigned Ctrl-Alt-Del.  That does what I 
want it to do, but you might want one of the others instead, and of 
course you can choose a different keyboard shortcut too.)

> 2)  When I run the terminal (it is gnome terminal ) it starts miminized.
> I tried changing the defaults but it did not help
> 
> Any ideas?

Note that in the normal kde case, you'd run konsole as your terminal 
(when in kde anyway) instead of gnome terminal (which would be the normal 
case in gnome).

So I'm not sure about gnome terminal behavior, but I do know it's fixable 
in one of two (at least, probably more) ways:

If you wish you can use konsole (or some other terminal emulator) 
instead.  The setting to choose your default terminal emulator (as well 
as the default apps for several other things, browser, text editor, mail 
client, etc) is again in kde settings, workspace appearance and behavior, 
default applications.

Select Terminal Emulator, then either set the Use Konsole as terminal app 
choice, or set use a different terminal program, and configure which one 
in the provided textbox/browse-dialog.


If you prefer to continue using gnome terminal, you can configure kwin 
(which I'm assuming you're using, if you're using kde, tho it's possible 
you or your distro has configured a different window manager) to either 
force specific window behavior, or to simply set it initially (tho 
sometimes the latter doesn't work and you have to use force, because the 
window changes its name or other matched qualities as it opens so the 
initial settings don't apply correctly).

You do this using "Window Rules".  Note that configuring window rules is 
a bit more complex than the above steps, but the configurable rules are 
actually quite powerful, and along with the power comes the complexity.

Anyway, kde settings, workspace appearance and behavior, window behavior, 
window rules.  (FWIW, the same dialog can be opened from the system menu 
normally accessible from any window's title bar.)

If you hit New... you'll get the window specific settings dialog, and can 
hit the detect window properties button and then the gnome terminal 
window to get the window properties to match pre-filled, along with a 
secondary dialog to guide you thru the initial match settings.

Once you have the match setup and are back in the main window specific 
settings dialog, setup an appropriate name on the window matching tab, 
and then switch to the size and position tab.  There, check the 
"Minimized" option, and select "Apply initially" from the drop-down.  
Then, be sure to switch the yes/no radio-buttons to "No".

If you like, you can try setting some other settings as well.  When 
you're done, hit OK, and then back in kde settings, apply.

As I said, however, sometimes "apply initially" won't work, due to the 
way the application/window starts/opens.  If you find that to be the 
case, you can always try "force" instead.  But of course if you force it 
not to minimize, you'll lose the ability to minimize it if/when you /
want/ to minimize it, so "apply initially" is probably preferable, if it 
works.

FWIW, kwin's "window rules" are something I have quite extensively 
personally customized, with a whole list of rules here.  There's very few 
of the available options in that dialog that I don't use for some reason 
or other, on some window or other somewhere, because I want it to behave 
the way *I* want it to behave, while for some reason or other the 
application author (in most cases, sometimes it's a more general kwin 
rule I've set, that I need an exception for) had other ideas that don't 
match MY ideas.  But it's MY desktop, and MY kwin window rules that are 
being followed, so in the end it works MY way. =:^)

(FWIW2, if you have needs more advanced than kwin's window rules can fix, 
if you know shell scripting or the like, there's an app called wmctrl 
that you can install and use to script behavior.  That makes it possible 
to have different settings for a window, and to invoke a script to toggle 
between them, for instance.  Or you can use that to get around the 
problem of "apply initially" not working, above, by using a wrapper 
script to start the app, then sleep a couple seconds or whatever, and 
only /then/ force it to whatever state/position, using wmctrl.  And if 
even wmctrl isn't advanced enough, there's an even more advanced app 
called wmiface, that's more suited to programmers and others used to 
using X's C/C++ interfaces, who want a way to script them from the 
command line as well.  But while I use wmctrl for this or that 
occasionally and I tried wmiface, I found it too advanced for me to be 
comfortable with, so I uninstalled it.)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




More information about the kde-linux mailing list