Difference between revisions of "Tips And Tricks"

From Trinity Desktop Project Wiki
Jump to navigation Jump to search
imported>Michael
(Moved least used item to bottom.)
imported>Michael
(Added "Assigning a mouse...")
Line 8: Line 8:
 
If tdesudo-trinity is not installed, you will be asked for the root password instead.
 
If tdesudo-trinity is not installed, you will be asked for the root password instead.
 
More details can be found [http://bugs.pearsoncomputing.net/show_bug.cgi?id=2563 here]
 
More details can be found [http://bugs.pearsoncomputing.net/show_bug.cgi?id=2563 here]
  +
  +
  +
==Assigning a mouse click as part of a keyboard shortcut==
  +
  +
There are multiple ways to accomplish this. The best arguably was the first method, which has been lost to time.
  +
  +
In these examples we are trying to achieve:
  +
  +
{Windows Key} + {left mouse click} = Minimize application under mouse cursor
  +
  +
Change what you need to achieve what you want.
  +
  +
===Method 01: Lost===
  +
As the name says it’s been lost. What is remembered is that:
  +
  +
* No additional software had to be installed
  +
* The change was exceedingly minor.
  +
  +
===Method 02: xbindkeys, xdotool===
  +
  +
Buggy. This works, but the xdotool command used occasionally leaves an unfinished half keystroke hanging.
  +
  +
A): Go to:
  +
  +
Trinity Control Center >> Regional & Accessibility >> Keyboard Shortcuts
  +
>> Shortcuts Schemes >> Global Shortcuts >> Windows
  +
  +
* Set "Minimize Window" to “Win+Space”
  +
  +
B): Issue these command(s) as root or using sudo.
  +
  +
$ apt-get install xbindkeys
  +
$ apt-get install xdotool
  +
$ apt-get install xbindkeys-config # << optional
  +
  +
C): Edit .xbindkeysrc
  +
  +
* Edit $HOME/.xbindkeysrc
  +
* Add:
  +
<nowiki>
  +
#MinimizeWindowUnderMouse
  +
"xdotool click --clearmodifiers 1 key super+space"
  +
m:0x40 + c:133 + b:1 + release</nowiki>
  +
  +
Note:
  +
xbindkeys does not like superfluous comments within it’s definitions. Leaving prior entries commented out within the config definition caused odd, and inconsistent, results. ymmv.
  +
  +
D): Issue these command(s) as yourself
  +
  +
<code>
  +
$ killall xbindkeys && xbindkeys
  +
</code>
  +
  +
E): To minimize any window
  +
  +
Move mouse over window, hold down Window key and click left mouse button.
  +
  +
===Method 03: xbindkeys, dcop and/or gdbus===
  +
  +
Basically the same as xbindkeys, xdotool but replacing xdotool with either a dcop or gdbus command. This is probably less ‘buggy’ than xdotool, unfortunately the writer doesn’t understand enough about either to make this work.
   
   
Line 54: Line 114:
   
 
dcop ksmserver default logout 0 2 2
 
dcop ksmserver default logout 0 2 2
  +
   
 
==Upgrading from KDE3 or from TDE 3.5.x to R14.0.x==
 
==Upgrading from KDE3 or from TDE 3.5.x to R14.0.x==

Revision as of 19:27, 13 August 2018


This page is meant as a container of tips and tricks collected over time, addressing topics and issues brought up by TDE users.

Using sudo and tdesudo

If you use sudo or a sudo-based distribution (such as Ubuntu), it is highly recommended that you install the tdesudo-trinity package as well. This allows to run programs that require root priviledge from the TDE menu using your own password. If tdesudo-trinity is not installed, you will be asked for the root password instead. More details can be found here


Assigning a mouse click as part of a keyboard shortcut

There are multiple ways to accomplish this. The best arguably was the first method, which has been lost to time.

In these examples we are trying to achieve:

{Windows Key} + {left mouse click} = Minimize application under mouse cursor

Change what you need to achieve what you want.

Method 01: Lost

As the name says it’s been lost. What is remembered is that:

  • No additional software had to be installed
  • The change was exceedingly minor.

Method 02: xbindkeys, xdotool

Buggy. This works, but the xdotool command used occasionally leaves an unfinished half keystroke hanging.

A): Go to:

 Trinity Control Center >> Regional & Accessibility >> Keyboard Shortcuts
 >> Shortcuts Schemes >> Global Shortcuts >> Windows
  • Set "Minimize Window" to “Win+Space”

B): Issue these command(s) as root or using sudo.

 $ apt-get install xbindkeys
 $ apt-get install xdotool
 $ apt-get install xbindkeys-config   # << optional

C): Edit .xbindkeysrc

  • Edit $HOME/.xbindkeysrc
  • Add:
#MinimizeWindowUnderMouse
"xdotool click --clearmodifiers 1 key super+space"
   m:0x40 + c:133 + b:1 + release

Note: xbindkeys does not like superfluous comments within it’s definitions. Leaving prior entries commented out within the config definition caused odd, and inconsistent, results. ymmv.

D): Issue these command(s) as yourself

 $ killall xbindkeys && xbindkeys

E): To minimize any window

Move mouse over window, hold down Window key and click left mouse button.

Method 03: xbindkeys, dcop and/or gdbus

Basically the same as xbindkeys, xdotool but replacing xdotool with either a dcop or gdbus command. This is probably less ‘buggy’ than xdotool, unfortunately the writer doesn’t understand enough about either to make this work.


Removing captions from K-Menu

Add following line into section [menus] in file ~/.trinity/share/config/kickerrc

ShowMenuTitles=false


Adding a separator between windows button in the title bar

Open TDE Control Center -> Appearance & Themes -> Window Decorations and then select the "Buttons" tab.
In the middle of the screen there is a list of possible buttons. Drag a separator (--- spacer ---) on the title bar of the sample window, between the buttons where you want to space to appear.
Check the preview in the bottom part of the screen and modify again as required.
Confirm when done.


Log out of current TDE session

You can log out of the current TDE session and possibly shut down the system automaticly (depending on your TDE configuration) using this command:

dcop kdesktop default logout ["confirm" "type" "mode"]

You can append three parameters "confirm", "type", "mode" to determine the logout behaviour according to the following values:

First parameter "confirm"
-1 -- Obey the user's confirmation setting
0 -- Don't confirm, shutdown without asking
1 -- Always confirm, ask even if the user turned it off
Second parameter "type"
-1 -- Select previous action or the default if it's the first time
0 -- Only log out
1 -- Log out and reboot the machine
2 -- Log out and halt the machine
Third parameter "mode"
-1 -- Select previous mode or the default if it's the first time
0 -- Schedule a shutdown (halt or reboot) for the time all active sessions have exited
1 -- Shut down, if no sessions are active. Otherwise do nothing
2 -- Force shutdown. Kill any possibly active sessions
3 -- Pop up a dialog asking the user what to do if sessions are still active


Full stop example Don't ask, log out and halt machine, killing any sessions

dcop ksmserver default logout 0 2 2


Upgrading from KDE3 or from TDE 3.5.x to R14.0.x

If you are migrating from KDE3 or upgrading from TDE 3.5.x, you can reuse your own settings in TDE R14.0.x. When logging into R14.0.x for the first time, TDE will automatically execute a script which will migrate as many of your KDE3/TDE3.5.x settings as possible. At the end of the process, your KDE3/TDE3.5.x profile will still exist (unchanged) and a new TDE profile will have been created inside the ~/.trinity folder.
NOTE
Please refrain from renaming your .kde into .trinity before running R14.0.x. If you do so, the migration process will not take part and some applications may not run smoothly after that. See here for an example of problems that may arise if you rename your .kde folder manually.