Difference between revisions of "Tips And Tricks"
(Added info and tips about using other WMs with TDE) |
(Categorization and small formatting improvements) |
||
Line 6: | Line 6: | ||
+ | __TOC__ |
||
− | ==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 [http://bugs.pearsoncomputing.net/show_bug.cgi?id=2563 here] |
||
+ | <!-- ---------------------------------------- --> |
||
+ | == Installing Trinity == |
||
+ | Tips and tricks relevant to obtaining a well-functioning Trinity installation. |
||
+ | === Upgrading from older versions or KDE3 === |
||
− | ==Kmail Sanitize and Decrypt Mails== |
||
+ | ==== Upgrading from KDE3 or from TDE 3.5.x to R14.0.x ==== |
||
− | [[Kmail_Sanitize_and_Decrypt_Mails|Kmail Sanitize and Decrypt Mails]] shows an example on how to create a filter in kmail that removes unwanted headers and automaticly decrypts incomming mails. |
||
+ | 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 <tt>'''~/.trinity'''</tt> folder. |
||
+ | {{Box |
||
− | ==Lock session and turn off screen== |
||
+ | |caption=Note |
||
+ | |text=Please refrain from renaming your <tt>.kde</tt> into <tt>.trinity</tt> 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 [http://bugs.pearsoncomputing.net/show_bug.cgi?id=2356 here] for an example of problems that may arise if you rename your <tt>.kde</tt> folder manually. |
||
+ | |icon=Messagebox_info.png |
||
+ | |background=#E9F0FF |
||
+ | |highlight=#93B2FF |
||
+ | }} |
||
− | This locks the session and after 3 seconds turns the screen off. |
||
+ | ==== Upgrading from an old version (pre Dec/2014) ==== |
||
− | $ cat goodnight.sh |
||
+ | Depending on your previous version of TDE, the file /etc/trinity/tdm/tdmrc may change from a script-generated file to a config file. |
||
− | |||
+ | It is advisable to accept the newer file if you are upgrading from an old version to TDE >= R14.0.0. |
||
− | #!/bin/bash |
||
− | |||
− | dcop kdesktop KScreensaverIface lock |
||
− | sleep 3 |
||
− | xset dpms force standby |
||
− | |||
− | For a ‘GUI’ you can add an Applet to your Panel that calls the Batch file. |
||
− | |||
− | |||
− | ==Un-Bogging down an Older system== |
||
− | Your system runs pretty well until Firefox, an Office application, or some other high CPU usage application demands too many cycles and your system then ‘freezes’ for seconds or minutes until the application gets finished. |
||
+ | <!-- ---------------------------------------- --> |
||
− | A simple, but somewhat tedious, solution is to add ‘nice’ to the launcher for each. Using LibreOffice as an example, add ‘nice -n 2 ’ before the command: |
||
+ | == Configuring Trinity == |
||
+ | Tips and tricks for custom fine-tuning and configurations. |
||
+ | === Using sudo and tdesudo === |
||
− | TDE Menu >> Office >> LibreOffice >> {right click} >> Edit Item |
||
+ | If you use sudo or a sudo-based distribution (such as Ubuntu), it is highly recommended that you install the <tt>tdesudo-trinity</tt> package as well. This allows to run programs that require root priviledge from the TDE menu using your own password. |
||
+ | If <tt>tdesudo-trinity</tt> 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]. |
||
+ | === Un-Bogging down an older system === |
||
− | Change the ‘Command’ entry from: |
||
+ | Your system runs pretty well until Firefox, an office application, or some other application with high CPU usage demands too many cycles and your system then ‘freezes’ for seconds or minutes until the application gets finished. |
||
+ | A simple, but somewhat tedious, solution is to add <code>nice</code> to the launcher for each. Using LibreOffice as an example, add <code>nice -n 2</code> before the command: |
||
− | libreoffice %U’ |
||
+ | <code>TDE Menu >> Office >> LibreOffice >> {right click} >> Edit Item</code> |
||
− | To: |
||
− | nice -n 2 libreoffice %U |
+ | Change the ‘Command’ entry from <code>libreoffice %U</code> to <code>nice -n 2 libreoffice %U</code>. |
Then find every other entry for LibreOffice (LibreOffice Base, LibreOffice Draw, LibreOffice Math, LibreOffice Impress, etc.) and do the same. |
Then find every other entry for LibreOffice (LibreOffice Base, LibreOffice Draw, LibreOffice Math, LibreOffice Impress, etc.) and do the same. |
||
− | Other ‘usual suspects’ to make nice are |
+ | Other ‘usual suspects’ to make nice are: browsers, BitTorrent clients, GUI Diff tools, and, occasionally, PDF viewers. |
− | Generally anything ‘real |
+ | Generally anything ‘real-time’ you should leave alone (movies, games, editors). |
− | These were used on a Core2 Duo (P7570 @ 2.26GHz, CPU Mark: 926) |
+ | These were used on a Core2 Duo (P7570 @ 2.26GHz, CPU Mark: 926): |
{| class="wikitable" style="text-align: center;" |
{| class="wikitable" style="text-align: center;" |
||
Line 75: | Line 78: | ||
|} |
|} |
||
+ | === Assigning a mouse click as part of a keyboard shortcut === |
||
− | ==Changing alternating row colors== |
||
− | |||
− | Alternating row colors in Konqueror, KMail, and probably a lot more, are not set as part of a theme. The are set in Colors: |
||
− | |||
− | TCC >> Appearance & Themes >> Colors >> Widget Color >> [Dropdown] Alternate Background in Lists |
||
− | |||
− | Who knew? |
||
− | |||
− | |||
− | ==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. |
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: |
In these examples we are trying to achieve: |
||
− | {Windows Key} + {left mouse click} = Minimize application under mouse cursor |
+ | <code>{Windows Key} + {left mouse click} = Minimize application under mouse cursor</code> |
Change what you need to achieve what you want. |
Change what you need to achieve what you want. |
||
− | ===Method |
+ | ==== Method 1: Lost ==== |
As the name says it’s been lost. What is remembered is that: |
As the name says it’s been lost. What is remembered is that: |
||
Line 101: | Line 94: | ||
* The change was exceedingly minor. |
* The change was exceedingly minor. |
||
− | ===Method |
+ | ==== Method 2: <tt>xbindkeys</tt> + <tt>xdotool</tt> ==== |
− | Buggy. |
+ | Buggy. This works, but the <tt>xdotool</tt> command used occasionally leaves an unfinished half-keystroke hanging. |
− | + | '''Step 1.''' Go to: |
|
− | + | <code>Trinity Control Center >> Regional & Accessibility >> Keyboard Shortcuts >> Shortcuts Schemes >> Global Shortcuts >> Windows</code> |
|
− | >> Shortcuts Schemes >> Global Shortcuts >> Windows |
||
− | + | Set "Minimize Window" to “Win+Space”. |
|
− | + | '''Step 2.''' Issue these command(s) as root or using sudo: |
|
+ | <syntaxhighlight lang="shell-session"> |
||
− | $ apt-get install xbindkeys |
||
− | + | # apt-get install xbindkeys |
|
− | + | # apt-get install xdotool |
|
+ | # apt-get install xbindkeys-config # optional |
||
+ | </syntaxhighlight> |
||
− | + | '''Step 3.''' Edit <tt>$HOME/.xbindkeysrc</tt>. |
|
+ | Add the following lines: |
||
− | * Edit $HOME/.xbindkeysrc |
||
+ | |||
− | * Add: |
||
+ | <!-- 'shell' is probably the closest match(?) --> |
||
− | <nowiki> |
||
+ | <syntaxhighlight lang="shell"> |
||
#MinimizeWindowUnderMouse |
#MinimizeWindowUnderMouse |
||
"xdotool click --clearmodifiers 1 key super+space" |
"xdotool click --clearmodifiers 1 key super+space" |
||
m:0x40 + c:133 + b:1 + release</nowiki> |
m:0x40 + c:133 + b:1 + release</nowiki> |
||
+ | </syntaxhighlight> |
||
+ | {{Box |
||
− | Note: |
||
+ | |caption=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. |
||
+ | |text=xbindkeys does not like superfluous comments within its definitions. Leaving prior entries commented out within the config definition caused odd and inconsistent results. |
||
+ | |icon=Messagebox_info.png |
||
+ | |background=#E9F0FF |
||
+ | |highlight=#93B2FF |
||
+ | }} |
||
− | + | '''Step 4.''' Issue these commands as yourself (not as root): |
|
+ | <syntaxhighlight lang="shell-session"> |
||
− | <code> |
||
− | + | $ killall xbindkeys |
|
+ | $ xbindkeys |
||
− | </code> |
||
+ | </syntaxhighlight> |
||
− | + | '''Step 5.''' To minimize any window: |
|
− | Move |
+ | Move the cursor over a window, hold down the Windows key and click the left mouse button. |
− | ===Method |
+ | ==== Method 3: <tt>xbindkeys</tt>, <tt>dcop</tt> and/or <tt>gdbus</tt> ==== |
− | Basically the same as xbindkeys |
+ | Basically the same as <tt>xbindkeys</tt> + <tt>xdotool</tt> but replacing <tt>xdotool</tt> with either a <tt>dcop</tt> or <tt>gdbus</tt> command. This is probably less ‘buggy’ than <tt>xdotool</tt>, but unfortunately the writer doesn’t understand enough about either to make this work. |
+ | <!-- ---------------------------------------- --> |
||
− | ==Removing captions from K-Menu == |
||
+ | == Look and feel == |
||
+ | Tips and tricks concerning the appearance of Trinity desktop and applications. |
||
+ | === Adding a separator between windows button in the title bar === |
||
− | Add following line into section [menus] in file ~/.trinity/share/config/kickerrc |
||
+ | Open <code>TDE Control Center >> Appearance & Themes >> Window Decorations</code> and then select the <code>Buttons</code> tab. |
||
+ | In the middle of the screen there is a list of available buttons. Drag a separator (<code>--- spacer ---</code>) on the title bar of the sample window, between the buttons where you want to space to appear. |
||
− | ShowMenuTitles=false |
||
+ | Check the preview in the bottom part of the window and modify again as required. |
||
− | ==Adding a separator between windows button in the title bar == |
||
− | Open TDE Control Center -> Appearance & Themes -> Window Decorations and then select the "Buttons" tab.<br> |
||
− | 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. <br> |
||
− | Check the preview in the bottom part of the screen and modify again as required.<br> |
||
Confirm when done. |
Confirm when done. |
||
+ | === Removing captions from K-Menu === |
||
+ | Add the following line into section [menus] in your </tt>~/.trinity/share/config/kickerrc</tt>: |
||
+ | <syntaxhighlight lang="ini"> |
||
− | ==Log out of current TDE session == |
||
+ | ShowMenuTitles=false |
||
− | |||
+ | </syntaxhighlight> |
||
− | 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"] |
||
+ | === Use another window manager with TDE === |
||
− | 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. |
||
− | <br>'''NOTE'''<br>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 [http://bugs.pearsoncomputing.net/show_bug.cgi?id=2356 here] for an example of problems that may arise if you rename your .kde folder manually. |
||
− | |||
− | |||
− | ==Upgrading from an old version (pre Dec/2014)== |
||
− | |||
− | Depending on your previous version of TDE, the file /etc/trinity/tdm/tdmrc may change from a script-generated file to a config file. |
||
− | It is advisable to accept the newer file if you are upgrading from an old version to TDE >= R14.0.0. |
||
− | |||
− | == Use another window manager with TDE == |
||
It is possible to use TDE with a different window manager than the one which comes by default. There are a lot of window managers out there, though, so TDE might not recognize their presence and thus not offer them as a choice in the Control Center. This is the case when you can use the advanced methods mentioned here to use TDE with another WM. |
It is possible to use TDE with a different window manager than the one which comes by default. There are a lot of window managers out there, though, so TDE might not recognize their presence and thus not offer them as a choice in the Control Center. This is the case when you can use the advanced methods mentioned here to use TDE with another WM. |
||
− | === Method |
+ | ==== Method 1: the easy way ==== |
The easy way is, of course, to go to <code>TDE Control Center → Desktop → Window decorations</code>, switch to the Window Manager tab and then select your preferred window manager from the drop-down menu. |
The easy way is, of course, to go to <code>TDE Control Center → Desktop → Window decorations</code>, switch to the Window Manager tab and then select your preferred window manager from the drop-down menu. |
||
− | === Method |
+ | ==== Method 2: autostart TDE components from WM ==== |
You can autostart Trinity and the components you need if your window manager supports autostart. In this case the window manager is started first. An <tt>.xinitrc</tt> file can also do the trick. |
You can autostart Trinity and the components you need if your window manager supports autostart. In this case the window manager is started first. An <tt>.xinitrc</tt> file can also do the trick. |
||
Line 221: | Line 183: | ||
|- |
|- |
||
|<tt>starttde</tt> |
|<tt>starttde</tt> |
||
− | |(required) Initializes required Trinity components.<span style="color:#FF0000">*</span> |
+ | |''(required) Initializes required Trinity components.<span style="color:#FF0000">*</span>'' |
|- |
|- |
||
|<tt>kicker &</tt> |
|<tt>kicker &</tt> |
||
− | |The Kicker panel. |
+ | |''The Kicker panel.'' |
|- |
|- |
||
|<tt>kdesktop --waitforkded &</tt> |
|<tt>kdesktop --waitforkded &</tt> |
||
− | |The Desktop. |
+ | |''The Desktop.'' |
|- |
|- |
||
|<tt>khotkeys &</tt> |
|<tt>khotkeys &</tt> |
||
− | |Keyboard shortcuts handler. |
+ | |''Keyboard shortcuts handler.'' |
|} |
|} |
||
Line 239: | Line 201: | ||
Note that this is not considered a full TDE session and that your mileage may vary. For a better way of handling this see Method 2 below. |
Note that this is not considered a full TDE session and that your mileage may vary. For a better way of handling this see Method 2 below. |
||
− | === Method |
+ | ==== Method 3: using WM as part of a TDE session ==== |
You can make TDE use your window manager instead of TWin by passing an environment variable to the <tt>starttde</tt> script. This variable is named <code>$TDEWM</code> and accepts the executable name (or full path) of your window manager. For example, to start TDE with Fluxbox as a window manager: |
You can make TDE use your window manager instead of TWin by passing an environment variable to the <tt>starttde</tt> script. This variable is named <code>$TDEWM</code> and accepts the executable name (or full path) of your window manager. For example, to start TDE with Fluxbox as a window manager: |
||
Line 283: | Line 245: | ||
Insert the values as needed. Save it and logout. From the sessions menu choose the session you just created. Login normally. TDE should start with the window manager of your choice. |
Insert the values as needed. Save it and logout. From the sessions menu choose the session you just created. Login normally. TDE should start with the window manager of your choice. |
||
+ | |||
+ | === Changing alternating row colors === |
||
+ | Alternating row colors in Konqueror, KMail, and probably a lot more, can be set in the Colors section of Trinity Control Center: |
||
+ | <code>TCC >> Appearance & Themes >> Colors >> Widget Color >> [Dropdown] Alternate Background in Lists</code> |
||
+ | |||
+ | |||
+ | <!-- ---------------------------------------- --> |
||
+ | == Application tricks == |
||
+ | Tips and tricks concerning Trinity applications (such as KMail, Kopete, Amarok etc.) |
||
+ | |||
+ | === Kmail: Sanitize and Decrypt E-Mails === |
||
+ | [[Kmail_Sanitize_and_Decrypt_Mails|Kmail Sanitize and Decrypt Mails]] shows an example on how to create a filter in kmail that removes unwanted headers and automaticly decrypts incomming mails. |
||
+ | |||
+ | == Useful scripts == |
||
+ | A collection of snippets and useful scripts which can help in automating some tasks in TDE. |
||
+ | |||
+ | === Lock session and turn off screen === |
||
+ | This shell script locks the session and after 3 seconds turns the screen off: |
||
+ | |||
+ | <syntaxhighlight lang="bash"> |
||
+ | #!/bin/bash |
||
+ | dcop kdesktop KScreensaverIface lock |
||
+ | sleep 3 |
||
+ | xset dpms force standby |
||
+ | </syntaxhighlight> |
||
+ | |||
+ | For a ‘GUI’ you can add an Applet to your Panel that calls the shell script. |
||
+ | |||
+ | === Log out of current TDE session === |
||
+ | |||
+ | You can log out of the current TDE session and possibly shut down the system automatically (depending on your TDE configuration) using this command: |
||
+ | |||
+ | <syntaxhighlight lang="shell-session"> |
||
+ | $ dcop kdesktop default logout <confirm> <type> <mode> |
||
+ | </syntaxhighlight> |
||
+ | |||
+ | You can append three parameters ("confirm", "type", "mode") to determine the |
||
+ | logout behaviour according to the following values: |
||
+ | |||
+ | |||
+ | '''First parameter: "confirm"''' |
||
+ | {| |
||
+ | |- |
||
+ | ! Value |
||
+ | ! Explanation |
||
+ | |- |
||
+ | | -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"''' |
||
+ | {| |
||
+ | |- |
||
+ | ! Value |
||
+ | ! Explanation |
||
+ | |- |
||
+ | | -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"''' |
||
+ | {| |
||
+ | |- |
||
+ | ! Value |
||
+ | ! Explanation |
||
+ | |- |
||
+ | | -1 |
||
+ | | Select previous mode (or the default one, 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''' |
||
+ | |||
+ | This command will log out and halt the machine, killing any sessions and will never prompt the user: |
||
+ | |||
+ | <syntaxhighlight lang="shell-session"> |
||
+ | $ dcop ksmserver default logout 0 2 2 |
||
+ | </syntaxhighlight> |
Revision as of 17:36, 28 September 2021
This page is meant as a container of tips and tricks collected over time, addressing topics and issues brought up by TDE users.
Installing Trinity
Tips and tricks relevant to obtaining a well-functioning Trinity installation.
Upgrading from older versions or KDE3
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.
Upgrading from an old version (pre Dec/2014)
Depending on your previous version of TDE, the file /etc/trinity/tdm/tdmrc may change from a script-generated file to a config file. It is advisable to accept the newer file if you are upgrading from an old version to TDE >= R14.0.0.
Configuring Trinity
Tips and tricks for custom fine-tuning and configurations.
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.
Un-Bogging down an older system
Your system runs pretty well until Firefox, an office application, or some other application with high CPU usage demands too many cycles and your system then ‘freezes’ for seconds or minutes until the application gets finished.
A simple, but somewhat tedious, solution is to add nice
to the launcher for each. Using LibreOffice as an example, add nice -n 2
before the command:
TDE Menu >> Office >> LibreOffice >> {right click} >> Edit Item
Change the ‘Command’ entry from libreoffice %U
to nice -n 2 libreoffice %U
.
Then find every other entry for LibreOffice (LibreOffice Base, LibreOffice Draw, LibreOffice Math, LibreOffice Impress, etc.) and do the same.
Other ‘usual suspects’ to make nice are: browsers, BitTorrent clients, GUI Diff tools, and, occasionally, PDF viewers.
Generally anything ‘real-time’ you should leave alone (movies, games, editors).
These were used on a Core2 Duo (P7570 @ 2.26GHz, CPU Mark: 926):
Nice level | Application Name |
---|---|
1 | Kmail |
2 | LibreOffice |
3 | Firefox |
4 | qBittorrent |
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 1: 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 2: xbindkeys + xdotool
Buggy. This works, but the xdotool command used occasionally leaves an unfinished half-keystroke hanging.
Step 1. Go to:
Trinity Control Center >> Regional & Accessibility >> Keyboard Shortcuts >> Shortcuts Schemes >> Global Shortcuts >> Windows
Set "Minimize Window" to “Win+Space”.
Step 2. Issue these command(s) as root or using sudo:
# apt-get install xbindkeys
# apt-get install xdotool
# apt-get install xbindkeys-config # optional
Step 3. Edit $HOME/.xbindkeysrc.
Add the following lines:
#MinimizeWindowUnderMouse
"xdotool click --clearmodifiers 1 key super+space"
m:0x40 + c:133 + b:1 + release</nowiki>
Step 4. Issue these commands as yourself (not as root):
$ killall xbindkeys
$ xbindkeys
Step 5. To minimize any window:
Move the cursor over a window, hold down the Windows key and click the left mouse button.
Method 3: 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, but unfortunately the writer doesn’t understand enough about either to make this work.
Look and feel
Tips and tricks concerning the appearance of Trinity desktop and applications.
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 available 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 window and modify again as required.
Confirm when done.
Add the following line into section [menus] in your ~/.trinity/share/config/kickerrc:
ShowMenuTitles=false
Use another window manager with TDE
It is possible to use TDE with a different window manager than the one which comes by default. There are a lot of window managers out there, though, so TDE might not recognize their presence and thus not offer them as a choice in the Control Center. This is the case when you can use the advanced methods mentioned here to use TDE with another WM.
Method 1: the easy way
The easy way is, of course, to go to TDE Control Center → Desktop → Window decorations
, switch to the Window Manager tab and then select your preferred window manager from the drop-down menu.
Method 2: autostart TDE components from WM
You can autostart Trinity and the components you need if your window manager supports autostart. In this case the window manager is started first. An .xinitrc file can also do the trick.
Make sure your window manager executes the first command (and any of the other ones for other desktop components you might want to use). For a more-or-less complete TDE session use all of them:
Command | Description |
---|---|
starttde | (required) Initializes required Trinity components.* |
kicker & | The Kicker panel. |
kdesktop --waitforkded & | The Desktop. |
khotkeys & | Keyboard shortcuts handler. |
(* Trinity apps would do this anyway, but it's nice to have it ready for them.)
As for starting the WM itself, you can choose to use your window manager's session via your display manager.
Note that this is not considered a full TDE session and that your mileage may vary. For a better way of handling this see Method 2 below.
Method 3: using WM as part of a TDE session
You can make TDE use your window manager instead of TWin by passing an environment variable to the starttde script. This variable is named $TDEWM
and accepts the executable name (or full path) of your window manager. For example, to start TDE with Fluxbox as a window manager:
$ TDEWM=fluxbox startx /opt/trinity/starttde # adjust to your system
$TWIN
variable instead.
To make this permanent:
- If you use a .xinitrc file, then the only thing to do is to put the line there.
- If you use a display manager, you'll need to create a script and an X session file.
Create a script like this one:
#!/bin/sh
export TDEWM=your_window_manager # for R14.0.11 and higher
export TWIN=your_window_manager # for pre-R14.0.11 TDE versions
exec starttde
Replace your_window_manager
with the correct value. Save it and make it executable.
Then, create a .desktop file in /usr/share/xsessions, like this one:
[Desktop Entry]
Encoding=UTF-8
Type=XSession
Name=(Session name)
Comment=(An optional session comment)
Exec=/path/to/the/script/you/just/saved
Insert the values as needed. Save it and logout. From the sessions menu choose the session you just created. Login normally. TDE should start with the window manager of your choice.
Changing alternating row colors
Alternating row colors in Konqueror, KMail, and probably a lot more, can be set in the Colors section of Trinity Control Center:
TCC >> Appearance & Themes >> Colors >> Widget Color >> [Dropdown] Alternate Background in Lists
Application tricks
Tips and tricks concerning Trinity applications (such as KMail, Kopete, Amarok etc.)
Kmail: Sanitize and Decrypt E-Mails
Kmail Sanitize and Decrypt Mails shows an example on how to create a filter in kmail that removes unwanted headers and automaticly decrypts incomming mails.
Useful scripts
A collection of snippets and useful scripts which can help in automating some tasks in TDE.
Lock session and turn off screen
This shell script locks the session and after 3 seconds turns the screen off:
#!/bin/bash
dcop kdesktop KScreensaverIface lock
sleep 3
xset dpms force standby
For a ‘GUI’ you can add an Applet to your Panel that calls the shell script.
Log out of current TDE session
You can log out of the current TDE session and possibly shut down the system automatically (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"
Value | Explanation |
---|---|
-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"
Value | Explanation |
---|---|
-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"
Value | Explanation |
---|---|
-1 | Select previous mode (or the default one, 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
This command will log out and halt the machine, killing any sessions and will never prompt the user:
$ dcop ksmserver default logout 0 2 2