Author Topic: How to remove 'Lock Session' and 'Switch User' actions from KMenu?  (Read 2940 times)

Offline vc

  • Hero Member
  • *****
  • Posts: 519
Sorry - I seem to recall with fair certainty seeing mention once within this forum of a method for removing the 'Lock Session' action from the KMenu menu list completely, but now I can't seem to find it.  It was bookmarked, but on a different machine - and the forum 'Search' function doesn't seem to be finding it now.  This is causing me panic, as I desperately need to learn how to permanently remove those two actions, because KMenuEdit is of no use at all for editing Actions and I can't find any kmenu.cfg file.  Does anyone know how to do this, or where to find the thread containing the method?

Offline melodie

  • Hero Member
  • *****
  • Posts: 5945
  • Internet Relay Chat sur Freenode
    • PCLinuxOS Fr
Re: How to remove 'Lock Session' and 'Switch User' actions from KMenu?
« Reply #1 on: October 31, 2009, 04:55:56 AM »
Hi,

I don't have the KDE version at hand at the moment, but I would suggest you to simply search in the KDE Center Configuration, to start with. There is no such action as adding or removing a menu entry for this type of function, you can find configuration in KDE control center.

You can also look in Synaptic, to remove packages such as "xlockmore" or such. You ought to do a search there anyhow, with just the word "lock", and only "Name" instead of "Name and Description" - I am talking about the "Search" button in Synaptic, the one that stands just below the menus.

I also think your post should have ended in Software section, and not "Advanced section". This is a simple configuration problem... :)

melodie at #lpic-fr on irc.freenode.net

musonio

  • Guest
Re: How to remove 'Lock Session' and 'Switch User' actions from KMenu?
« Reply #2 on: October 31, 2009, 05:16:38 AM »
KDE 3 or 4?

Offline vc

  • Hero Member
  • *****
  • Posts: 519
Re: How to remove 'Lock Session' and 'Switch User' actions from KMenu?
« Reply #3 on: October 31, 2009, 08:03:08 AM »
KDE 3 or 4?

3.5.10, on MiniMe 2009.  KDE 4.x doesn't work for me yet.

Offline vc

  • Hero Member
  • *****
  • Posts: 519
Re: How to remove 'Lock Session' and 'Switch User' actions from KMenu?
« Reply #4 on: October 31, 2009, 08:17:06 AM »
Hi,

I don't have the KDE version at hand at the moment, but I would suggest you to simply search in the KDE Center Configuration, to start with. There is no such action as adding or removing a menu entry for this type of function, you can find configuration in KDE control center.

You can also look in Synaptic, to remove packages such as "xlockmore" or such. You ought to do a search there anyhow, with just the word "lock", and only "Name" instead of "Name and Description" - I am talking about the "Search" button in Synaptic, the one that stands just below the menus.

I also think your post should have ended in Software section, and not "Advanced section". This is a simple configuration problem... :)



Hello, Melodie.  Yes, I know how to search in Synaptic, but I don't see how it applies - I need to remove two entries from the KMenu menu, not remove apps.  However; as I said, KMenuEdit does not allow anyone to edit any listings in the 'Actions' section of the menu - only 'Applications' listings are shown in the editor, and the 'Actions' listings are not listed there at all, and there is no (obvious) kmenu.cfg file in /home/me/.kde or anywhere else, so how then is anyone supposed to fully edit any/all KMenu listings?  I've searched through the forums repeatedly, I've looked at the wiki, I've done similar at kde.org and other places, and nothing is turning up at all - the 'Actions' section of the KMenu listing remains utterly inaccessible.  Why?  Clearly, if there's no straightforward way of editing that portion of KMenu and there's also no config file to twiddle with, then it must somehow be a more 'advanced' issue - so that's why I posted this question here.  I never use those KMenu options, but I keep kitting them accidentally and locking myself out anyways, which for me is rather painful as I use very long passwords that are not trivial to type.  Furthermore, in my searches through the forum regarding this, I see I'm not the only one - others have suffered the same also, so that's why I'm seeking a solution.
« Last Edit: October 31, 2009, 08:35:03 AM by vc »

musonio

  • Guest
Re: How to remove 'Lock Session' and 'Switch User' actions from KMenu?
« Reply #5 on: October 31, 2009, 08:20:16 AM »
Give this a try:
Adding or removing logout, lock, switch user, etc., options in Kmenu:

Open:
   ~/.kde/share/config/kickerrc
Paste anywhere:
   [KDE Action Restrictions]
   lock_session= true
   logout_session= true
   run_command=false #--->removes the run command - remove to re-show the run command    box as just setting false to true won't work.
   start_new_session=true
   switch_user=true

With the exception of “run_command” all you have to do is set to true if you want each option to be shown in Kmenu and to false if you don't.

Offline vc

  • Hero Member
  • *****
  • Posts: 519
Re: How to remove 'Lock Session' and 'Switch User' actions from KMenu?
« Reply #6 on: October 31, 2009, 10:20:03 AM »
Give this a try:
Adding or removing logout, lock, switch user, etc., options in Kmenu:

Open:
   ~/.kde/share/config/kickerrc
Paste anywhere:
   [KDE Action Restrictions]
   lock_session= true
   logout_session= true
   run_command=false #--->removes the run command - remove to re-show the run command    box as just setting false to true won't work.
   start_new_session=true
   switch_user=true

With the exception of “run_command” all you have to do is set to true if you want each option to be shown in Kmenu and to false if you don't.



Interesting.  I tried it; the first image shows the result, immediately after rebooting, and the second image shows the implementation.  Where did you find this information?

[Edit:  Apparently, I'll have to put the second screencap in a following post, as the filesizes are too big.]

[attachment deleted by admin]

Offline vc

  • Hero Member
  • *****
  • Posts: 519
Re: How to remove 'Lock Session' and 'Switch User' actions from KMenu?
« Reply #7 on: October 31, 2009, 10:22:52 AM »
The following post.

[attachment deleted by admin]

Offline vc

  • Hero Member
  • *****
  • Posts: 519
Re: How to remove 'Lock Session' and 'Switch User' actions from KMenu?
« Reply #8 on: October 31, 2009, 11:07:11 AM »
Yet more interesting.  I've now reformatted my kickerrc amendment as per the attached; upon rebooting, I no longer got the gratuitous instance of KMix on the desktop but now the KMenu style had been changed away from the 'KDE' setting I had it set to before so I had to change it back again and that's when I found that no, they're still there regardless.  Dang.  These kickerrc mods seem to be having anything but the desired effect - am I doing it all wrong again?

Edit:  could it indeed be due to the positioning of the amendment?  I had entered it immediately following the [General] section - would there be any difference if it were to precede [General] instead?  Or - and perhaps more likely? - is kickerrc being generated dynamically, by something else entirely?

[attachment deleted by admin]
« Last Edit: October 31, 2009, 12:11:39 PM by vc »

musonio

  • Guest
Re: How to remove 'Lock Session' and 'Switch User' actions from KMenu?
« Reply #9 on: October 31, 2009, 12:31:42 PM »
VNC:
Too bad it didn't work (It used to work some time ago).
I can't help you about the position of the modifications in the kickerrc file because I'm not running kde3 anymore.
I do remember that there were a few kde3 config files where the position of each statement mattered.

Offline vc

  • Hero Member
  • *****
  • Posts: 519
Re: How to remove 'Lock Session' and 'Switch User' actions from KMenu?
« Reply #10 on: October 31, 2009, 07:13:09 PM »
Oh well.  Thanks anyway, musonio - much appreciated.  I wish I could find the forum posting I came across previously; it addressed that exact issue - but I can't find it now; all Search efforts so far have been fruitless, and that's a bit frustrating... I'll keep searching.

Edit:  Sunday morning now, and the closest I was able to find after several hours searching last night was this:

http://www.pclinuxos.com/forum/index.php/topic,59873.0.html

which seems to imply that I should probably try using kwriteconfig instead of editing the files directly, and also that maybe I should be aiming it at ksmserverrc instead?  Confusing - but; I'll give it a whirl to see what happens anyway.
« Last Edit: November 01, 2009, 10:33:58 AM by vc »

Offline cubbybear

  • Full Member
  • ***
  • Posts: 90
Re: How to remove 'Lock Session' and 'Switch User' actions from KMenu?
« Reply #11 on: November 01, 2009, 09:53:12 AM »
KDE 3 or 4?

3.5.10, on MiniMe 2009.  KDE 4.x doesn't work for me yet.


I just removed my reply from early this morning, because I was looking at KDE4 and forgot we were talking about the KDE 3.5.10 MiniMe version. :-[  I had just learned in the KDE4 version this can be changed by right-clicking on the Application Launcher Menu and selecting "Application Launcher Menu Settings".

Offline vc

  • Hero Member
  • *****
  • Posts: 519
Re: How to remove 'Lock Session' and 'Switch User' actions from KMenu?
« Reply #12 on: November 01, 2009, 10:41:57 AM »
KDE 3 or 4?

3.5.10, on MiniMe 2009.  KDE 4.x doesn't work for me yet.


I just removed my reply from early this morning, because I was looking at KDE4 and forgot we were talking about the KDE 3.5.10 MiniMe version. :-[  I had just learned in the KDE4 version this can be changed by right-clicking on the Application Launcher Menu and selecting "Application Launcher Menu Settings".

Until KDE4 is at least as configurable as 3.5 is and has all of the 'legacy' apps working, it won't be of much use to me - so; I'm sticking with 3.5 until then, or until another desktop manager attains 3.5's functional equivalency.