05-16-2024, 02:33 PM | #1306 |
Bibliophagist
Posts: 36,814
Karma: 147879470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
There are sample NickelMenu configuration files in this forum.
As @hatulang posted, he has a sample config file on Reddit. I've copy/pasted that config file into this message wrapped in spoiler and code tags: Spoiler:
# ----------------------------------------------------------------------- |
05-16-2024, 02:54 PM | #1307 | |
Member
Posts: 17
Karma: 164
Join Date: Sep 2010
Device: Kindle Oasis/Kobo Libra Colour
|
Quote:
|
|
Advert | |
|
05-17-2024, 05:07 AM | #1308 |
Resident Curmudgeon
Posts: 74,648
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
05-17-2024, 01:00 PM | #1309 |
Member
Posts: 17
Karma: 164
Join Date: Sep 2010
Device: Kindle Oasis/Kobo Libra Colour
|
|
05-17-2024, 01:30 PM | #1310 |
Bibliophagist
Posts: 36,814
Karma: 147879470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
NickelMenu was designed with a failsafe mechanism which will automatically uninstall it if any fatal errors occur. I suppose someonecould open a Telnet/SSH session and start deleting and modifying files but that would be a PEBKAC error.
|
Advert | |
|
05-17-2024, 03:23 PM | #1311 |
Connoisseur
Posts: 94
Karma: 3160
Join Date: Apr 2024
Device: none
|
I am trying to implement Telnet and FTP access using NickelMenu but am having trouble implementing both functions. Here are the codes I am using:
Code:
menu_item :main :Telnet :cmd_spawn :quiet:/bin/mount -t devpts | /bin/grep -q /dev/pts || { /bin/mkdir -p /dev/pts && /bin/mount -t devpts devpts /dev/pts; } chain_success :cmd_spawn :quiet:/usr/bin/pkill -f "^/usr/bin/tcpsvd -E 0.0.0.0 1023" || true && exec /usr/bin/tcpsvd -E 0.0.0.0 1023 /usr/sbin/telnetd -i -l /bin/login chain_success :dbg_toast :Started Telnet server on port 1023. menu_item :main :FTP :cmd_spawn :quiet:/usr/bin/pkill -f "^/usr/bin/tcpsvd -E 0.0.0.0 1021" || true && exec /usr/bin/tcpsvd -E 0.0.0.0 1021 /usr/sbin/ftpd -w -t 30 /mnt/onboard chain_success :dbg_toast :Started FTP server for KOBOeReader partition on port 1021. |
05-17-2024, 03:27 PM | #1312 | |
Bibliophagist
Posts: 36,814
Karma: 147879470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
05-17-2024, 03:35 PM | #1313 |
Connoisseur
Posts: 94
Karma: 3160
Join Date: Apr 2024
Device: none
|
|
05-17-2024, 03:49 PM | #1314 |
Bibliophagist
Posts: 36,814
Karma: 147879470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Rebooting your Kobo will disable Telnet/FTP. Since I mostly use my Kobo's at home, I just turn off WiFi when I'm not using it.
|
05-17-2024, 05:12 PM | #1315 |
Connoisseur
Posts: 94
Karma: 3160
Join Date: Apr 2024
Device: none
|
Before I forget, DNSB... Thank you for being such a leader in this community. Your help fielding all of my questions on this forum has been invaluable.
I think I am fundamentally misunderstanding how these buttons work in NickelMenu... Is each button not a "toggle switch" in that you tap it once to turn a feature "on" and then tap it again to turn a feature "off" if a feature has persisting function (like telnet and FTP)? By your explanation, it seems that a button works basically to simply "enable" telnet or FTP server on the Kobo device. But these "services" will remain on with no way to disable them as long as the device is powered. The only way to "turn them off" is to shutdown or reboot the device. As such, I should add a "shutdown and reboot" button in NickelMenu to do this, correct? I know for programs, a button acts basically like a shortcut to launch a program. |
05-17-2024, 07:07 PM | #1316 |
Bibliophagist
Posts: 36,814
Karma: 147879470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
They enable Telnet or FTP. You might be able to toggle them using conditionals similar to the command to enable/disable screenshots but for my uses, only turning on WiFi when I want to use them and turning WiFi off afterwards works for me. I do not enable WiFi when outside my home so I'm not worried about someone connecting to my Kobos.
You could add options to kill telnetd or ftpd as separate NickelMenu commands which might be simpler. |
05-17-2024, 07:16 PM | #1317 |
Wizard
Posts: 1,176
Karma: 15499942
Join Date: Sep 2022
Device: Kobo Libra 2
|
The screenshots option works as a toggle, because Kobo coded it that way; it's a built-in feature of Nickel. Enabling telnet and FTP requires executing specific Linux commands that do not function as toggles. In order to disable telnet and FTP again, you would need to add separate menu items that use cmd_spawn to disable telnet and FTP by issuing separate Linux commands.
|
05-17-2024, 07:28 PM | #1318 |
Bibliophagist
Posts: 36,814
Karma: 147879470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
If you look at the NickelMenu doc file, there is a sample command called Telnet (toggle). It looks as if you could modify this to start/stop the FTP server as well.
Code:
# menu_item :main :Telnet (toggle) :cmd_output :500:quiet :/usr/bin/pkill -f "^/usr/bin/tcpsvd -E 0.0.0.0 2023" # chain_success:skip:5 # chain_failure :cmd_spawn :quiet :/bin/mount -t devpts | /bin/grep -q /dev/pts || { /bin/mkdir -p /dev/pts && /bin/mount -t devpts devpts /dev/pts; } # chain_success :cmd_spawn :quiet :exec /usr/bin/tcpsvd -E 0.0.0.0 2023 /usr/sbin/telnetd -i -l /bin/login # chain_success :dbg_toast :Started Telnet server on port 2023 # chain_failure :dbg_toast :Error starting Telnet server on port 2023 # chain_always:skip:-1 # chain_success :dbg_toast :Stopped Telnet server on port 2023 |
05-17-2024, 08:33 PM | #1319 |
Connoisseur
Posts: 94
Karma: 3160
Join Date: Apr 2024
Device: none
|
Thanks, both DNSB and Aleron Ives. Not knowing how to code at all, I would not even know how to mod the above code to make a toggle for FTP.
I guess the simplest and safest way is to just use the NickelMenu "switch" to reboot the device each time I finished using FTP (which I intend to use only infrequently). Per DNSB, as Telnet and FTP effects do not persist after reboot, the device remains secure after reboot even if I need to use WiFi when I am outside, correct? |
05-17-2024, 08:50 PM | #1320 |
Bibliophagist
Posts: 36,814
Karma: 147879470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Not quite sure what you mean by outside. Are you connecting to someone else's WiFi outside your home or are you connecting to your own WiFi while sitting on your balcony/porch/patio?
Yes, the telnetd and ftpd would be stopped during the restart and would require a manual restart. |
Tags |
kobo, launcher, ldpreload, nickel |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kobo eReaders and Heat | PeterT | Kobo Reader | 13 | 08-02-2014 04:35 AM |
kobo arc launcher not working | lana loves books | Kobo Tablets | 8 | 03-21-2014 06:40 AM |
Orginization on kobo ereaders | crochetgeek2010 | Kobo Reader | 7 | 09-03-2013 02:13 PM |
Kobo Announces eReaders Available for Purchase on Kobo.com in Canada and US | markemark | News | 1 | 04-02-2013 01:46 PM |
Ereaders with Integrated Dictionary | poohbear_nc | Which one should I buy? | 4 | 04-08-2010 06:42 AM |