Jump to content

Windows/windows specific features: Difference between revisions

From KDE Community Wiki
Created page with "Over the years, some windows specific features have been developed and are shipped with KDE applications. == kwinstartmenu == This commandline application is in the kde-runti..."
 
Ochurlaud (talk | contribs)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__TOC__
Over the years, some windows specific features have been developed and are shipped with KDE applications.
Over the years, some windows specific features have been developed and are shipped with KDE applications.


== kwinstartmenu ==
= kwinstartmenu =
This commandline application is in the kde-runtime package and generates a start menu from the .desktop files that are used for that on Linux. Please refer to the output of <tt>kwinstartmenu --help</tt> for help now.
This commandline application is in the kde-runtime package and generates a start menu from the .desktop files that are used for that on Linux. Please refer to the output of <tt>kwinstartmenu --help</tt> for help now.


== kde.conf ==
= kde.conf =
The first version of this feature has been added to 4.8.0 release, an extended version has been added to 4.10.2 release. This is not yet upstream, but will be integrated into every release from now.
The first version of this feature has been added to 4.8.0 release, an extended version has been added to 4.10.2 release. This is not yet upstream, but will be integrated into every release from now.
Since it should be possible to have several KDE installations side by side without messing around with another installation's settings, the path of the user writeable settings directories .kde, .local and .config need to be moveable. This is done by some patches to kdelibs and akonadi that look for a file kde.conf in the directory %KDEROOT%\bin. This file can contain values for the environment variables KDEHOME, XDG_DATA_HOME, XDG_DATA_DIRS, XDG_CONFIG_HOME and XDG_CONFIG_DIRS. The environment variables will still override the settings made in the kde.conf file.
Since it should be possible to have several KDE installations side by side without messing around with another installation's settings, the path of the user writeable settings directories .kde, .local and .config need to be moveable. This is done by some patches to kdelibs and akonadi that look for a file kde.conf in the directory %KDEROOT%\bin. This file can contain values for the environment variables KDEHOME, XDG_DATA_HOME, XDG_DATA_DIRS, XDG_CONFIG_HOME and XDG_CONFIG_DIRS. The environment variables will still override the settings made in the kde.conf file.
Line 18: Line 19:
</syntaxhighlight>
</syntaxhighlight>


== context menus for the windows explorer ==
= context menus for the windows explorer =
There are two COM based context menus available for the windows explorer, one general in the kde-runtime package and one in the kate-contextmenu package specifically for kate.
There are two COM based context menus available for the windows explorer, one general (kdecm.dll) in the kde-runtime package and one in the kate-contextmenu package specifically for kate (katecm.dll).
*The general context menu will open the files selected in the default KDE application for that mime type, e.g. it will do the same action dolphin would do if you simply open those files from there.
*The general context menu will open the files selected in the default KDE application for that mime type, e.g. it will do the same action dolphin would do if you simply open those files from there. This context menu might make your explorer a bit unstable, depending on the stability of your KDE installation. The dll is directly linked to KDE dlls so there might be problems if your installation is somehow broken.
*The kate context menu adds two entries, ''open in default session'' and ''open in session >'' and provide you with a list of sessions currently defined in kate. Since this dll is not linked against any KDE dll, it should be stable enough for day to day use. ''For now you need to modify the registry to let the context menu find the kate sessions: HKCU/Software/kde.org/contextmenu must contain a key kdeconfigdir which points to the KDEHOME directory. This will be fixed in future versions of the context menu.''
To register both of the context menus, open a cmd.exe console with administration rights, navigate to your KDE installation (here: <tt>C:\Program Files\KDE</tt>) and run the following command:
<syntaxhighlight lang="text">
C:\Program Files\KDE\bin> regsvr32 katecm.dll
</syntaxhighlight>
<br/>
'''NOTE:'''
*The context menu and thus also your KDE installation must match your system bitness to work properly, on a 64bit system you must install the 64 bit binaries of KDE on Windows.
*The actual dll might be prefixed with "lib" on mingw installations.
*For deinstallation, run <syntaxhighlight lang="text">regsvr32 /u katecm.dll</syntaxhighlight>.
*If you want to '''update''' either the kde-runtime package or the kate-contextmenu package, you have to make sure that the context menu hasn't been triggered before. You can close and reopen all explorer.exe processes to ensure that, or restart your system. Otherwise replacing the dlls will not work.

Latest revision as of 14:58, 18 March 2016

Over the years, some windows specific features have been developed and are shipped with KDE applications.

kwinstartmenu

This commandline application is in the kde-runtime package and generates a start menu from the .desktop files that are used for that on Linux. Please refer to the output of kwinstartmenu --help for help now.

kde.conf

The first version of this feature has been added to 4.8.0 release, an extended version has been added to 4.10.2 release. This is not yet upstream, but will be integrated into every release from now. Since it should be possible to have several KDE installations side by side without messing around with another installation's settings, the path of the user writeable settings directories .kde, .local and .config need to be moveable. This is done by some patches to kdelibs and akonadi that look for a file kde.conf in the directory %KDEROOT%\bin. This file can contain values for the environment variables KDEHOME, XDG_DATA_HOME, XDG_DATA_DIRS, XDG_CONFIG_HOME and XDG_CONFIG_DIRS. The environment variables will still override the settings made in the kde.conf file. If you are a packager of a KDE on Windows application it is recommended that upon installation you write such a file to move your default settings into your directory: e.g. a digikam installer would move all settings to %APPDATA%\.digikam .

An example kde.conf file which moves everything below %APPDATA%\.kde-stable:

[KDE]
KDEHOME=%APPDATA%\.kde-stable
[XDG]
XDG_DATA_HOME=%APPDATA%\.kde-stable\.local\share
XDG_CONFIG_HOME=%APPDATA%\.kde-stable\.config

context menus for the windows explorer

There are two COM based context menus available for the windows explorer, one general (kdecm.dll) in the kde-runtime package and one in the kate-contextmenu package specifically for kate (katecm.dll).

  • The general context menu will open the files selected in the default KDE application for that mime type, e.g. it will do the same action dolphin would do if you simply open those files from there. This context menu might make your explorer a bit unstable, depending on the stability of your KDE installation. The dll is directly linked to KDE dlls so there might be problems if your installation is somehow broken.
  • The kate context menu adds two entries, open in default session and open in session > and provide you with a list of sessions currently defined in kate. Since this dll is not linked against any KDE dll, it should be stable enough for day to day use. For now you need to modify the registry to let the context menu find the kate sessions: HKCU/Software/kde.org/contextmenu must contain a key kdeconfigdir which points to the KDEHOME directory. This will be fixed in future versions of the context menu.

To register both of the context menus, open a cmd.exe console with administration rights, navigate to your KDE installation (here: C:\Program Files\KDE) and run the following command:

C:\Program Files\KDE\bin> regsvr32 katecm.dll


NOTE:

  • The context menu and thus also your KDE installation must match your system bitness to work properly, on a 64bit system you must install the 64 bit binaries of KDE on Windows.
  • The actual dll might be prefixed with "lib" on mingw installations.
  • For deinstallation, run
    regsvr32 /u katecm.dll
    
    .
  • If you want to update either the kde-runtime package or the kate-contextmenu package, you have to make sure that the context menu hasn't been triggered before. You can close and reopen all explorer.exe processes to ensure that, or restart your system. Otherwise replacing the dlls will not work.