[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAFf+5zjHS_xA46PMJ_XgyV_dsXaX3yAfz3JtB_DggFVPyGaXLg@mail.gmail.com>
Date: Thu, 20 Mar 2025 13:25:20 +0530
From: Amit <amitchoudhary0523@...il.com>
To: linux-kernel@...r.kernel.org
Subject: ".desktop" file example on Debian Linux.
The following gives an example of a .desktop file on Debian Linux that can be
used to open any arbitrary binary file (but not executable files) in "gedit".
Below the contents of the file "binary.file.desktop", steps are given for how to
use this file.
-------------------
binary.file.desktop
-------------------
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Exec=gedit %F
MimeType=application/octet-stream
Name=Open_Binary_Files_With_gedit
StartupNotify=true
The steps to use this file are given below:
Step 1: Copy the lines given above (from "[Desktop Entry]" to
"StartupNotify=true") in a file and name it as "binary.file.desktop".
You can give any other name also to this file but keep the extension of
the file as ".desktop". The first line of this file should be
"[Desktop Entry]".
Step 2: Now, copy/move this file to the directory "/usr/share/applications/" so
that all users can open binary files in "gedit". If you want to do this
only for yourself then you can copy/move this file to
"~/.local/share/applications/" (However, I haven't tested this).
Step 3: Now, run the command "sudo update-desktop-database".
Step 4: Now, right click any binary file (not an executable) and then click
"Open With..." menu entry. Now, a window will open and it will list the
applications which you can use to open the binary file. Now, select
(with single click) the entry in the list that says
"Open_Binary_Files_With_gedit" and then turn on the option
"Always use for this file type" (this option is shown at the bottom of
the window). Now, double-click the selected entry
("Open_Binary_Files_With_gedit") and it is done. The current binary file
will open in "gedit". And from now on, you can simply double-click any
binary file and it will open in "gedit".
----
Powered by blists - more mailing lists