Make Desktop File for Linux Install #476

Open
opened 2025-04-21 15:11:15 -04:00 by idk · 14 comments
Owner

Opened 4 years ago

Last modified 4 years ago

#1928openenhancement

Make Desktop File for Linux Install

Reported by:lazygravyOwned by:lazygravy
Priority:
minor
Milestone:
0.9.29
Component:
installer
Version:
0.9.28
Keywords:
usability
Cc:

Parent Tickets:

Sensitive:
no

Description

I saw a post on Reddit where a user was saying they couldn't figure out how to start I2P on his Linux install. I suggest we include an i2p.desktop file with Linux installs.

The desktop file seems to work with Debian and Fedora. I am not sure how many distributions/desktop environments we should target.

Relevant documentation: ​https://developer.gnome.org/integration-guide/stable/desktop-files.html.en

Subtickets

Opened [4 years ago](/timeline?from=2017-01-14T21%3A00%3A51Z&precision=second "See timeline at Jan 14, 2017 9:00:51 PM") Last modified [4 years ago](/timeline?from=2017-02-01T15%3A18%3A05Z&precision=second "See timeline at Feb 1, 2017 3:18:05 PM") ## [\#1928](/ticket/1928)[open](/query?status=open)[enhancement](/query?status=!closed&type=enhancement) # Make Desktop File for Linux Install Reported by:[lazygravy](/query?status=!closed&reporter=lazygravy)Owned by:[lazygravy](/query?status=!closed&owner=lazygravy) Priority: [minor](/query?status=!closed&priority=minor) Milestone: [0.9.29](/milestone/0.9.29 "Completed 4 years ago (Feb 27, 2017 12:00:00 PM)") Component: [installer](/query?status=!closed&component=installer) Version: [0.9.28](/query?status=!closed&version=0.9.28) Keywords: [usability](/query?status=!closed&keywords=~usability) Cc: Parent Tickets: Sensitive: [no](/query?status=!closed&sensitive=0) ### Description I saw a post on Reddit where a user was saying they couldn't figure out how to start I2P on his Linux install. I suggest we include an i2p.desktop file with Linux installs. The desktop file seems to work with Debian and Fedora. I am not sure how many distributions/desktop environments we should target. Relevant documentation: [​https://developer.gnome.org/integration-guide/stable/desktop-files.html.en](https://developer.gnome.org/integration-guide/stable/desktop-files.html.en) ### Subtickets
idk added this to the 0.9.29 milestone 2025-04-21 15:11:15 -04:00
idk added the
#1928
0.9.29
installer
labels 2025-04-21 15:11:15 -04:00
idk self-assigned this 2025-04-21 15:11:15 -04:00
Author
Owner

comment:11 Changed 4 years ago by zzz

One misery with custom panels is translations, although perhaps we could use the same strings as ShortcutPanel?.

[comment:11](https://trac.i2p2.de/\#comment:11) Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-02-01T15%3A18%3A05Z&precision=second "See timeline at Feb 1, 2017 3:18:05 PM") by zzz One misery with custom panels is translations, although perhaps we could use the same strings as ShortcutPanel?.
Author
Owner

comment:10 Changed 4 years ago by zzz

re: non-Deb installs, that's the problem with doing it manually instead of with ShortcutPanel?. The options are:

  • Don't install it automatically for non-deb installs, this change is only for packages

  • Always install it automatically for non-deb installs

  • Figure out how to fix ShortcutPanel?, either by patching our current 4.3.0, or upgrading to 4.3.5 or 5.0.0 ( #1864) if there's a fix in there

  • Add a custom panel that reimplements what we need from ShortcutPanel? but without the bugs

First two are easy, last two are hard. We could also start out not installing it, and defer a solution to a later release.

[comment:10](https://trac.i2p2.de/\#comment:10) Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-02-01T15%3A11%3A15Z&precision=second "See timeline at Feb 1, 2017 3:11:15 PM") by zzz re: non-Deb installs, that's the problem with doing it manually instead of with ShortcutPanel?. The options are: - Don't install it automatically for non-deb installs, this change is only for packages - Always install it automatically for non-deb installs - Figure out how to fix ShortcutPanel?, either by patching our current 4.3.0, or upgrading to 4.3.5 or 5.0.0 ( [#1864](https://trac.i2p2.de//ticket/1864 "#1864: defect: IzPack 5 (closed: fixed)")) if there's a fix in there - Add a custom panel that reimplements what we need from ShortcutPanel? but without the bugs First two are easy, last two are hard. We could also start out not installing it, and defer a solution to a later release.
Author
Owner

comment:9 Changed 4 years ago by lazygravy

Replying to zzz:

  • you didn't attach the new files i2p.desktop and 0004-i2p-desktop.patch for review

Yeah, sorry about that. Brain fart. Attached now.

  • debian patch files are a pain to maintain, if there's a way to avoid it that would be better, but I suspect we'll have to do it

Since the start script will be in /usr/bin/i2pinstall the patch is needed, but it should be easy enough to maintain.

  • unrelated changes readme.license.txt, whitespace changes, debian/control you should just check in, not include here for review

Ack. I need to sign the CLA, but I won't commit those for now.

For now, I keep the .desktop in %INSTALL_PATH. It gets installed globally for Debian, but I wasn't sure what kind of experience should happen for jar installs.

  • I don't think the desktop file needs to be 755 in postinstall.sh, none of the desktop files on my system are executable

For some reason Nautilus won't show the .desktop file as a clickable icon unless I make it u+x. I will experiment further.

[comment:9](https://trac.i2p2.de/\#comment:9) Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-02-01T03%3A05%3A35Z&precision=second "See timeline at Feb 1, 2017 3:05:35 AM") by lazygravy Replying to [zzz](https://trac.i2p2.de//ticket/1928#comment:8 "Comment 8"): > - you didn't attach the new files i2p.desktop and 0004-i2p-desktop.patch for review Yeah, sorry about that. Brain fart. Attached now. > - debian patch files are a pain to maintain, if there's a way to avoid it that would be better, but I suspect we'll have to do it Since the start script will be in /usr/bin/i2pinstall the patch is needed, but it should be easy enough to maintain. > - unrelated changes readme.license.txt, whitespace changes, debian/control you should just check in, not include here for review Ack. I need to sign the CLA, but I won't commit those for now. > - I don't see anything that puts the .desktop file in ~/.local/share/applications/ for non-deb installs as specified at [​https://developer.gnome.org/integration-guide/stable/desktop-files.html.en](https://trac.i2p2.de/https://developer.gnome.org/integration-guide/stable/desktop-files.html.en) \- how does it get there? For now, I keep the .desktop in %INSTALL\_PATH. It gets installed globally for Debian, but I wasn't sure what kind of experience should happen for jar installs. > - I don't think the desktop file needs to be 755 in postinstall.sh, none of the desktop files on my system are executable For some reason Nautilus won't show the .desktop file as a clickable icon unless I make it u+x. I will experiment further.
Author
Owner

Changed 4 years ago by lazygravy

Attachment:i2p.desktop
added

Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-02-01T03%3A02%3A39Z&precision=second "See timeline at Feb 1, 2017 3:02:39 AM") by lazygravy Attachment:[_i2p.desktop_](https://trac.i2p2.de//attachment/ticket/1928/i2p.desktop) [​](https://trac.i2p2.de//raw-attachment/ticket/1928/i2p.desktop "Download") added
Author
Owner

Changed 4 years ago by lazygravy

Attachment:0004-i2p-desktop.patch
added

Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-02-01T03%3A00%3A59Z&precision=second "See timeline at Feb 1, 2017 3:00:59 AM") by lazygravy Attachment:[_0004-i2p-desktop.patch_](https://trac.i2p2.de//attachment/ticket/1928/0004-i2p-desktop.patch) [​](https://trac.i2p2.de//raw-attachment/ticket/1928/0004-i2p-desktop.patch "Download") added
Author
Owner

comment:8 Changed 4 years ago by zzz

  • you didn't attach the new files i2p.desktop and 0004-i2p-desktop.patch for review

  • debian patch files are a pain to maintain, if there's a way to avoid it that would be better, but I suspect we'll have to do it

  • unrelated changes readme.license.txt, whitespace changes, debian/control you should just check in, not include here for review

  • I don't see anything that puts the .desktop file in ~/.local/share/applications/ for non-deb installs as specified at ​https://developer.gnome.org/integration-guide/stable/desktop-files.html.en - how does it get there?

  • I don't think the desktop file needs to be 755 in postinstall.sh, none of the desktop files on my system are executable

[comment:8](https://trac.i2p2.de/\#comment:8) Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-01-31T15%3A26%3A49Z&precision=second "See timeline at Jan 31, 2017 3:26:49 PM") by zzz - you didn't attach the new files i2p.desktop and 0004-i2p-desktop.patch for review - debian patch files are a pain to maintain, if there's a way to avoid it that would be better, but I suspect we'll have to do it - unrelated changes readme.license.txt, whitespace changes, debian/control you should just check in, not include here for review - I don't see anything that puts the .desktop file in ~/.local/share/applications/ for non-deb installs as specified at [​https://developer.gnome.org/integration-guide/stable/desktop-files.html.en](https://trac.i2p2.de/https://developer.gnome.org/integration-guide/stable/desktop-files.html.en) \- how does it get there? - I don't think the desktop file needs to be 755 in postinstall.sh, none of the desktop files on my system are executable
Author
Owner

Changed 4 years ago by lazygravy

Attachment:trac-1928.diff
added

patch

Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-01-31T02%3A42%3A04Z&precision=second "See timeline at Jan 31, 2017 2:42:04 AM") by lazygravy Attachment:[_trac-1928.diff_](https://trac.i2p2.de//attachment/ticket/1928/trac-1928.diff) [​](https://trac.i2p2.de//raw-attachment/ticket/1928/trac-1928.diff "Download") added patch
Author
Owner

comment:7 Changed 4 years ago by lazygravy

I decided to go with the manual approach.

I've attached my patch. I want to test it more with Debian before anything is merged.

[comment:7](https://trac.i2p2.de/\#comment:7) Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-01-31T02%3A40%3A19Z&precision=second "See timeline at Jan 31, 2017 2:40:19 AM") by lazygravy I decided to go with the manual approach. I've attached my patch. I want to test it more with Debian before anything is merged.
Author
Owner

comment:6 Changed 4 years ago by zzz

The good part about using ShortcutPanel? is we get a dialog box in the installer to ask the user if he wants it. The fallback, if you can't get that to work, is just bundling a pre-made desktop file all the time. That's probably fine too, but not ideal. If there are bugs we can't work around, perhaps they are fixed in Izpack 5 #1864 but that could be a lot of work, I think 5 is a lot different.

Sounds like you are making good progress.

[comment:6](https://trac.i2p2.de/\#comment:6) Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-01-24T14%3A11%3A54Z&precision=second "See timeline at Jan 24, 2017 2:11:54 PM") by zzz The good part about using ShortcutPanel? is we get a dialog box in the installer to ask the user if he wants it. The fallback, if you can't get that to work, is just bundling a pre-made desktop file all the time. That's probably fine too, but not ideal. If there are bugs we can't work around, perhaps they are fixed in Izpack 5 [#1864](https://trac.i2p2.de//ticket/1864 "#1864: defect: IzPack 5 (closed: fixed)") but that could be a lot of work, I think 5 is a lot different. Sounds like you are making good progress.
Author
Owner

comment:5 Changed 4 years ago by lazygravy

I do have it working with the debian files, which is nice. I think that would also be a good!

[comment:5](https://trac.i2p2.de/\#comment:5) Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-01-23T02%3A38%3A33Z&precision=second "See timeline at Jan 23, 2017 2:38:33 AM") by lazygravy I do have it working with the debian files, which is nice. I think that would also be a good!
Author
Owner

comment:4 Changed 4 years ago by lazygravy

I finally for izback to make a .desktop file, and it turns out that Debian does not like it. :(

Specifically, it generates the "Exec=…" line with the command $INSTALL_DIR/i2prouter.sh start with quotes, which Debian won't run.

What are the disadvantages of using a .desktop file that is written and $INSTALL_DIR is swapped out by izpack?

[comment:4](https://trac.i2p2.de/\#comment:4) Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-01-21T18%3A39%3A21Z&precision=second "See timeline at Jan 21, 2017 6:39:21 PM") by lazygravy I finally for izback to make a .desktop file, and it turns out that Debian does not like it. :( Specifically, it generates the "Exec=…" line with the command $INSTALL\_DIR/i2prouter.sh start with quotes, which Debian won't run. What are the disadvantages of using a .desktop file that is written and $INSTALL\_DIR is swapped out by izpack?
Author
Owner

comment:3 Changed 4 years ago by zzz

Hopefully the above does not require izpack 5. See #1864

[comment:3](https://trac.i2p2.de/\#comment:3) Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-01-15T16%3A48%3A16Z&precision=second "See timeline at Jan 15, 2017 4:48:16 PM") by zzz Hopefully the above does not require izpack 5. See [#1864](https://trac.i2p2.de//ticket/1864 "#1864: defect: IzPack 5 (closed: fixed)")
Author
Owner

comment:2 Changed 4 years ago by zzz

Component:router/general →
installerStatus:new →
open

There's an easier way. Izpack does most of the work for us. We currently only enable it for Windows but we can add unix. Docs: ​https://izpack.atlassian.net/wiki/display/IZPACK/Shortcut+Panel

In installer/install.xml in the panels section, add

        <panel classname="ShortcutPanel"><os family="unix" /></panel>

that got me to these errors when running the installer:

/tmp/i2p283foo/Start-I2P-(no-window)-1484487593508.desktop (No such file or directory)
/tmp/i2p283foo/Start-I2P-(restartable)-1484487593510.desktop (No such file or directory)
/tmp/i2p283foo/I2P-router-console-1484487593512.desktop (No such file or directory)

So now take the windows spec file installer/resources/shortcutSpec.xml, copy it to Unix_shortcut_spec.xml, modify as necessary, make sure it's included in build.xml, and add the resources line to install.xml. That part I haven't tried.

[comment:2](https://trac.i2p2.de/\#comment:2) Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-01-15T13%3A50%3A24Z&precision=second "See timeline at Jan 15, 2017 1:50:24 PM") by zzz Component:router/general → installerStatus:new → open There's an easier way. Izpack does most of the work for us. We currently only enable it for Windows but we can add unix. Docs: [​https://izpack.atlassian.net/wiki/display/IZPACK/Shortcut+Panel](https://trac.i2p2.de/https://izpack.atlassian.net/wiki/display/IZPACK/Shortcut+Panel) In installer/install.xml in the panels section, add ``` <panel classname="ShortcutPanel"><os family="unix" /></panel> ``` that got me to these errors when running the installer: ``` /tmp/i2p283foo/Start-I2P-(no-window)-1484487593508.desktop (No such file or directory) /tmp/i2p283foo/Start-I2P-(restartable)-1484487593510.desktop (No such file or directory) /tmp/i2p283foo/I2P-router-console-1484487593512.desktop (No such file or directory) ``` So now take the windows spec file installer/resources/shortcutSpec.xml, copy it to Unix\_shortcut\_spec.xml, modify as necessary, make sure it's included in build.xml, and add the resources line to install.xml. That part I haven't tried.
Author
Owner

comment:1 Changed 4 years ago by lazygravy

Version:
→ 0.9.28

I have a working copy locally, but I need to make it apart of build.xml.

[comment:1](https://trac.i2p2.de/\#comment:1) Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-01-14T21%3A01%3A17Z&precision=second "See timeline at Jan 14, 2017 9:01:17 PM") by lazygravy Version: → 0.9.28 I have a working copy locally, but I need to make it apart of build.xml.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: I2P_Developers/i2p.i2p#476
No description provided.