Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

23
LINES

< > BotCompany Repo | #1026864 // Add Stefan's OS v6 To Autostart (Linux)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (2593L/17K/61K).

!7

p {
  if (!isLinux()) fail("Not on Linux");
  File autostart_dir = userDir(".config/autostart");
  autostart_dir.mkdirs();
  File file = new File(autostart_dir, "javax.desktop");
  File javaxPath = javaxJarPath();
  print("Writing " + file);
  saveTextFile(file,
    "    [Desktop Entry]\n" +
    "    Version=1.0\n" +
    "    Name=JavaX\n" +
    "    Name[en_US]=JavaX\n" +
    "    Comment=JavaX Runner\n" +
    "      Exec=java -jar " + javaxPath.getAbsolutePath() + " " + psI(#1016478) + "\n" +
    "    Icon=\n" +
    "      Terminal=false\n" +
    "    Type=Application\n" +
    "    Encoding=UTF-8\n" +
    "    Categories=Accessories\n");
  print("Done!");
}

Author comment

Began life as a copy of #1003662

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, snaazhdonpnp, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026864
Snippet name: Add Stefan's OS v6 To Autostart (Linux)
Eternal ID of this version: #1026864/2
Text MD5: 44064e721f6d6a5bcc65b8b33f3a10f1
Transpilation MD5: 8f34a94e71f2b46a614fdc39aafe77bd
Author: stefan
Category: javax / gui
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-29 21:43:02
Source code size: 693 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 249 / 339
Version history: 1 change(s)
Referenced in: #1026865 - Add Stefan's OS v7 To Autostart (Linux)