Create .desktop file

To create .desktop file in Ubuntu

[Desktop Entry]
Type=Application
Name=EclipseC++
GenericName=Eclipse
Comment=Eclipse for development
Exec=/path/to/eclipse
Icon=/path/to/icon.xpm
Terminal=false
MimeType=text/plain;
Categories=Development;IDE
StartupNotify=true
# If you won't specify following line you may end having duplicate icons
# in Ubuntu Dock bar where first is the one you have added to Dock and the
# other one is showing the running application. To avoid this issue you need
# to add following line in .desktop file
StartupWMClass=Eclipse
# How to determine value of StartWMClass for any application:
# – Run your application
# – Run xprop WM_CLASS from the commandline
# – Your mouse cursor will be in different shape
# – Click the window bar of the your application
# – Note down the value(s) printed on the console where you executed xprop
# – These printed values will be WM_CLASS(STRING) = "ABC", "RST", "XYZ"
# – Use any of the string shown in "xxx" for StartupWMClass in .desktop file. For example
# you can use ABC or RST or XYZ.

view raw
.desktop
hosted with ❤ by GitHub

Linux kernel & VS Code

If you are using VSCode for Linux kernel development, following setup will be useful:

  1. Clone https://github.com/aakbar5/handy-kernel_modules. It contains the
    • Makefile: to build kernel modules
    • .devcontainer: to setup vscode for remote development inside the Docker container
    • .vscode: From tasks build and run Qemu.
  2. Start vscode
  3. Open the folder having linux kernel development project
  4. Select: Remote-Containers: Open Folder in Container… from the popup menu.
  5. Select the folder selected in #2
  6. Keep an eye on the vscode status bar while it is showing Opening Remote…
  7. Once vscode is setup, your project will be ready for development in container environment.
  8. Press CTRL+P for Tasks: Run Task
  9. Select kmod – build task to build a kernel module setup in Makefile.
  10. Press CTRL+P for Tasks: Run Task
  11. Select Generate compile_commands.json from the list of tasks.
  12. Press CTRL+P for Tasks: Run Task
  13. Select Run QEMU and wait for QEMU to be ready for use
  14. Press CTRL+P for Tasks: Run Task and select kmod – load

    • This command will copy built kernel module to QEMU.
  15. Get back to QEMU shell in vscode terminal and use kernel module commands to test your new kernel module.
  16. Once you are done with development, use Dev Container: Close Remote Connection option.

kernel_in_vscode