Skip to main content

freedesktop standard

 XDG = Cross-Desktop Group 

 

specs:

 Autostart 

Desktop base directories (basedir) 

Desktop entries (.desktop) 

Desktop menus (menu) 

File manager D-Bus interface 

File URIs 

Free media player specifications 

Media Player Remote Interfacing Specification (MPRIS) 

Shared MIME database (shared-mime-info) 

Startup notifications 

Trash 

XML Bookmark Exchange Language (XBEL) 

 

x11 specs

DnD 

UTF8_STRING 

Window manager specification 

 X clipboard explanation 

 

------------------------------------------------------------------------------------------------------------------  

1. autostart-spec

$XDG_CONFIG_DIRS/autostart

no XDG_CONFIG_HOME     use    ~/.config/autostart/  

no $XDG_CONFIG_DIRS use    /etc/xdg/autostart/ 

 

mount media 

() autostart files: precendence: .autorun, autorun, autorun.sh

() autoopen :precedence: .autoopen, autoopen 

 

------------------------------------------------------------------------------------------------------------------

 2. basedir-spec

$XDG_DATA_HOME             $HOME/.local/share

$XDG_CONFIG_HOME       $HOME/.config

$XDG_STATE_HOME       $HOME/.local/state, $XDG_DATA_HOME,

user binaries           $HOME/.local/bin

$XDG_DATA_DIRS         $XDG_DATA_HOME,  /usr/local/share/:/usr/share/ 

$XDG_CONFIG_DIRS        $XDG_CONFIG_HOME, /etc/xdg

$XDG_CACHE_HOME       $HOME/.cache

$XDG_RUNTIME_DIR       access mode MUST be 0700.

All paths set in these environment variables must be absolute

 

------------------------------------------------------------------------------------------------------------------ 

3.desktop-entry-spec

Desktop entry files  has .desktop or .directory and name must be valid D-Bus well-known name reverse dns style(special only - and _ allowed)

org.example.FooViewer.desktop

Desktop File ID

/usr/share/applications/foo/bar.desktop has the desktop file ID foo-bar.desktop.

(replace / with - relative to $XDG_DATA_DIRS)

only $XDG_DATA_DIRS/applications has ID other dirs no id


Format

# and blank lines defines comment

 
[groupname] = group header with name groupname
Desktop Entry group header must be present its used as "magic key" for mime detection
There should be nothing preceding this group in .desktopfile except comment
 
entries are  defined as Key=Value 
Multiple keys in the same group may not have the same name. 
multiple values should be separated by a semicolon,semicolon as value must be escaped by \
 

Localized values for keys

 

 Name[LOCALE]=Value
LOCALE= lang_COUNTRY.ENCODING@MODIFIER (lang is cmompulsary ) 
LC_MESSAGES = LOCALE is selected 
 
keys
Type,Name,GenericName,NoDisplay,Comment,Icon,Hidden,OnlyShowIn, NotShowIn,DBusActivatable
TryExec,Exec,Path,Terminal,Actions,MimeType,Categories,Implements,Keywords,StartupNotify,
StartupWMClass,URL,PrefersNonDefaultGPU,SingleMainWindow
 
FIle code
%f = single file name
%F= multiple file names
%u =single url
%U= multi url
only one of above can be used at once 
%[d,D,n,N,v,m] =depreciated    
%i= expand icon key as --icon and value 
%c= translated name of app
%k = location of .desktop
 

D-Bus Activation

 

  <interface name='org.freedesktop.Application'>
    <method name='Activate'>
      <arg type='a{sv}' name='platform_data' direction='in'/>
    </method>
    <method name='Open'>
      <arg type='as' name='uris' direction='in'/>
      <arg type='a{sv}' name='platform_data' direction='in'/>
    </method>
    <method name='ActivateAction'>
      <arg type='s' name='action_name' direction='in'/>
      <arg type='av' name='parameter' direction='in'/>
      <arg type='a{sv}' name='platform_data' direction='in'/>
    </method>
  </interface>
 
Methods :: 
Activate = used when there is no files to open
Open =  app is started with files
ActivateAction= when DesktopActions are activated
 
Arguments of Methods::
desktop-startup-id= same as DESKTOP_STARTUP_ID environment variable (Startup Notification Protocol Specification)  .
activation-tokenXDG_ACTIVATION_TOKEN, as per  as specified by the XDG Activation protocol
  

Interfaces

 declared by implements key
 

Registering MIME Types

  MimeType key shows supported mimetype

 

Additional applications actions

 actions are used to define quicklist or jumplist

Action identifier

each action is identified with string(action identifier)
Each identifier is associated with an action group
The action group is a group named Desktop Action %s, where %s is action identifier.
action group for an action identifier not mentioned in the Actions key is invalid

Action keys

 name(compulsary),icon,exec

 

example 

[Desktop Entry]
Version=1.0
Type=Application
Name=Foo Viewer
Comment=The best viewer for Foo objects available!
TryExec=fooview
Exec=fooview %F
Icon=fooview
MimeType=image/x-foo;
Actions=Gallery;Create;

[Desktop Action Gallery]
Exec=fooview --gallery
Name=Browse Gallery

[Desktop Action Create]
Exec=fooview --create-new
Name=Create a new Foo!
Icon=fooview-new
--------------------------------------------------------------------------

menu-spec

$XDG_CONFIG_DIRS/menus/${XDG_MENU_PREFIX}applications.menu
$XDG_CONFIG_DIRS/menus/${XDG_MENU_PREFIX}applications.menu
$XDG_CONFIG_DIRS/menus/${XDG_MENU_PREFIX}applications.menu
$XDG_CONFIG_DIRS/menus/${XDG_MENU_PREFIX}applications.menu
 
desktop entries : Categories, OnlyShowIn and NotShowIn
            Categories=Qt;Graphics;RasterGraphics;Viewer;
            Categories=GNOME;Utility;
formats

<Menu> <AppDir><DefaultAppDirs><DirectoryDir><Name><Directory> 

<OnlyUnallocated><NotOnlyUnallocated><Deleted> <NotDeleted><Include><Exclude><Filename><Category><All><And><Or><Not><Separator>

 

example

   <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
          "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">

          <Menu>
            <Name>Applications</Name>
            <Directory>Applications.directory</Directory>
  
            <-- Search the default locations -->
            <DefaultAppDirs/>
            <DefaultDirectoryDirs/>
          
            <-- Merge third-party submenus -->
            <MergeDir>applications-merged</MergeDir>

            <-- Merge legacy hierarchy -->
            <LegacyDir>/usr/share/applnk</LegacyDir>

            <-- Define default layout -->
            <DefaultLayout>
              <Merge type="menus"/>
              <Merge type="files"/>
              <Separator/>
              <Menuname>More</Menuname>
            </DefaultLayout>

            <-- some random moves, maybe to clean up legacy dirs, 
                   maybe from menu editing -->
            <Move>
              <Old>Foo</Old>
              <New>Bar</New>
              <Old>Foo2</Old>
              <New>Bar2</New>
            </Move>          

            <-- A preferences submenu, kept in a separate file 
                   so it can also be used standalone -->
            <Menu>
              <Name>Preferences</Name>
              <Directory>Preferences.directory</Directory>
              <MergeFile>preferences.menu</MergeFile>
            </Menu>

            <-- An Office submenu, specified inline -->
            <Menu>
              <Name>Office</Name>
              <Directory>Office.directory</Directory>
              <Include>
                <Category>Office</Category>
              </Include>
              <Exclude>
                <Filename>foo.desktop</Filename>
              </Exclude>
            </Menu>
             
          </Menu>
location::
/usr/share,/etc/xdg, /usr/local/share ,$HOME/.local/share

 

File Manager DBus Interface

 

  <interface name='org.freedesktop.FileManager1'>
    <method name='ShowFolders'>
      <arg type='as' name='URIs' direction='in'/>
      <arg type='s' name='StartupId' direction='in'/>
    </method>
    <method name='ShowItems'>
      <arg type='as' name='URIs' direction='in'/>
      <arg type='s' name='StartupId' direction='in'/>
    </method>
    <method name='ShowItemProperties'>
      <arg type='as' name='URIs' direction='in'/>
      <arg type='s' name='StartupId' direction='in'/>
    </method>
  </interface>
 
 org.freedesktop.FileManager1, /org/freedesktop/FileManager1 
  

 
 
 
 
 
 
 
 

 

 

   

 

 

Comments

Popular posts from this blog

sxhkd volume andbrightness config for dwm on void

xbps-install  sxhkd ------------ mkdir .config/sxhkd cd .config/sxhkd nano/vim sxhkdrc -------------------------------- XF86AudioRaiseVolume         amixer -c 1 -- sset Master 2db+ XF86AudioLowerVolume         amixer -c 1 -- sset Master 2db- XF86AudioMute         amixer -c 1 -- sset Master toggle alt + shift + Escape         pkill -USR1 -x sxhkd XF86MonBrightnessUp          xbacklight -inc 20 XF86MonBrightnessDown          xbacklight -dec 20 ------------------------------------------------------------- amixer -c card_no -- sset Interface volume run alsamixer to find card no and interface names xbps-install -S git git clone https://git.suckless.org/dwm xbps-install -S base-devel libX11-devel libXft-devel libXinerama-devel  vim config.mk # FREETYPEINC = ${X11INC}/freetype2 #comment for non-bsd make clean install   cp config.def.h config.h vim config.h xbps-install -S font-symbola #for emoji on statusbar support     void audio config xbps-i

Hidden Wiki

Welcome to The Hidden Wiki New hidden wiki url 2015 http://zqktlwi4fecvo6ri.onion Add it to bookmarks and spread it!!! Editor's picks Bored? Pick a random page from the article index and replace one of these slots with it. The Matrix - Very nice to read. How to Exit the Matrix - Learn how to Protect yourself and your rights, online and off. Verifying PGP signatures - A short and simple how-to guide. In Praise Of Hawala - Anonymous informal value transfer system. Volunteer Here are five different things that you can help us out with. Plunder other hidden service lists for links and place them here! File the SnapBBSIndex links wherever they go. Set external links to HTTPS where available, good certificate, and same content. Care to start recording onionland's history? Check out Onionland's Museum Perform Dead Services Duties. Introduction Points Ahmia.fi - Clearnet search engine for Tor Hidden Services (allows you

download office 2021 and activate

get office from here  https://tb.rg-adguard.net/public.php open powershell as admin (win+x and a ) type cmd  goto insall dir 1.         cd /d %ProgramFiles(x86)%\Microsoft Office\Office16 2.           cd /d %ProgramFiles%\Microsoft Office\Office16 try 1 or 2 depending on installation  install volume license  for /f %x in ('dir /b ..\root\Licenses16\ProPlus2021VL_KMS*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%x" activate using kms cscript ospp.vbs /setprt:1688 cscript ospp.vbs /unpkey:6F7TH >nul cscript ospp.vbs /inpkey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH cscript ospp.vbs /sethst:s8.uk.to cscript ospp.vbs /act Automatic script (windefender may block it) ------------------------------------------------------------------------------------------------------------------- @echo off title Activate Microsoft Office 2021 (ALL versions) for FREE - MSGuides.com&cls&echo =====================================================================================&