NUT GUI USB and Network installer for Tinfoil and SX Installer

Easiest way is to just download nut.exe to the directory where your NSP's are, and start it. Will install NSP's from your PC to the switch via USB or network connection. The games will show up on the switch (in the "new games" section) to install, the PC client is just a dumb server. Default username and password is guest/guest for network install.



# USB Install

Run server.py or Windows users can use the precompiled nut.exe in the release section.

Follow the directions found in the release page to install the USB driver.

After you run the server, ensure NSP's are visible in the list. If they are not, change the path and click the "scan" button.

Connect your USB cable from your switch to your PC.

Start Tinfoil or SX Installer, and all of the NSP's listed in nut server should now be available to install in Tinfoil or SX Installer.


# Network Install

Run server.py or Windows users can use the precompiled nut.exe in the release section.

After you run the server, ensure NSP's are visible in the list. If they are not, change the path and click the "scan" button.

Start Tinfoil or SX Installer, then go to locations, then select "Add New" location. Enter the ip, port, username, and password that is displayed in the nut server application, then press save.

All of the NSP's listed in nut server should now be available to install in Tinfoil or SX Installer.

https://tinfoil.io/Download#download

changelog:

- Scan path is now saved and remembered.
- Web GUI is now works with the windows release.
- Web gui optionally launches at application launch.
- Various bugfixes / enhancements to web gui.
- Fixed display bug where username did not display in gui.
- conf/users.conf is created, and users can edit their username and password there.
- fixed random error when initializing.
 
Last edited by blawar,

mdmachine

Well-Known Member
Member
Joined
Jun 15, 2009
Messages
189
Trophies
0
XP
882
Country
United States
So I tried installing NUT on my server, and I am getting the following error (presumably because I don't have a X server running).

qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted (core dumped)



Is there a reason this seems to require a GUI?
Are you running it in headless mode usingt -S?
"python3 /home/pi/NUT/nut.py -S" for example.
 
  • Like
Reactions: Hofure

pikachullk

Member
Newcomer
Joined
Aug 12, 2015
Messages
5
Trophies
0
Age
37
XP
64
Country
Switzerland
I have some questions about this awsome app....A very beginner of linux...maybe this these question are silly,hope someone could help me:
1.Can I run NUT SERVER(nut.py -S or server.py) as a background service without gui as start up on ubuntu?I google this,edit rc.local can help.but if I wanna restart it,I have to kill this process and start it again...maybe not so friendly for CLI
2.after I ran it with rc.local,how I can scan new NSP with command?
thank you for your good app~and thank you if you answer my questions~~~

--------------------- MERGED ---------------------------

I have some questions about this awsome app....A very beginner of linux...maybe this these question are silly,hope someone could help me:
1.Can I run NUT SERVER(nut.py -S or server.py) as a background service without gui as start up on ubuntu?I google this,edit rc.local can help.but if I wanna restart it,I have to kill this process and start it again...maybe not so friendly for CLI
2.after I ran it with rc.local,how I can scan new NSP with command?
thank you for your good app~and thank you if you answer my questions~~~
 

blawar

Developer
OP
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
Run
I have some questions about this awsome app....A very beginner of linux...maybe this these question are silly,hope someone could help me:
1.Can I run NUT SERVER(nut.py -S or server.py) as a background service without gui as start up on ubuntu?I google this,edit rc.local can help.but if I wanna restart it,I have to kill this process and start it again...maybe not so friendly for CLI
2.after I ran it with rc.local,how I can scan new NSP with command?
thank you for your good app~and thank you if you answer my questions~~~

--------------------- MERGED ---------------------------

I have some questions about this awsome app....A very beginner of linux...maybe this these question are silly,hope someone could help me:
1.Can I run NUT SERVER(nut.py -S or server.py) as a background service without gui as start up on ubuntu?I google this,edit rc.local can help.but if I wanna restart it,I have to kill this process and start it again...maybe not so friendly for CLI
2.after I ran it with rc.local,how I can scan new NSP with command?
thank you for your good app~and thank you if you answer my questions~~~

nut.py —server for headless background

server.py is gui

--------------------- MERGED ---------------------------

Run


nut.py —server for headless background
You can also do nut.py —usb If you need usb

server.py is gui
Run


nut.py —server for headless background

server.py is gui
 

mdmachine

Well-Known Member
Member
Joined
Jun 15, 2009
Messages
189
Trophies
0
XP
882
Country
United States
I have some questions about this awsome app....A very beginner of linux...maybe this these question are silly,hope someone could help me:
1.Can I run NUT SERVER(nut.py -S or server.py) as a background service without gui as start up on ubuntu?I google this,edit rc.local can help.but if I wanna restart it,I have to kill this process and start it again...maybe not so friendly for CLI
2.after I ran it with rc.local,how I can scan new NSP with command?
thank you for your good app~and thank you if you answer my questions~~~

I had better experience running NUT as a service using systemd.
So, you would want to make a systemd file.

This can be /lib/system... or /etc/system... So check!
Code:
sudo nano /lib/systemd/system/NUT.service

And you need to fill that with information for the service to run, and how.
This script will call upon nut_headless.sh file I created beforehand.
Obviously you'd need to change locations, etc...
Plenty of further documentation about systemd and its uses.

Code:
[Unit]
Description=NUT Daemon
After=network-online.target

[Service]
Type=simple
User=username (or remove this)
Group=group (or remove this)
UMask=007 (if shared by other users, otherwise remove)
ExecStart=/home/user/NUT/nut_headless.sh &
Restart=on-failure
TimeoutStopSec=300

[Install]
WantedBy=multi-user.target

save and exit (ctrl+x).

Set permissions using:
This can be /lib/system... or /etc/system... So check!
Code:
sudo chmod 644 /etc/systemd/system/NUT.service

Now reload your services:
Code:
sudo systemctl daemon-reload
Enable it:
Code:
sudo systemctl enable NUT.service
Check its status:
Code:
sudo systemctl status NUT.service
You should see it running.

You can use "restart, stop, disable, enable, start" in place of "status" to the service as options.

The shell script I used that was called upon was (you can use nano to make this like you did with the systemd file):
Code:
#!/bin/sh
sleep 20
python3 /home/user/NUT/nut.py -S
 
Last edited by mdmachine,
  • Like
Reactions: pikachullk

SaulFemm

Well-Known Member
Newcomer
Joined
Oct 25, 2018
Messages
65
Trophies
0
Age
48
XP
595
Country
United States
Don't know where else to ask this. Is it possible that tinfoil.media is blocking certain user-agents? I can't download the titledb with python.
 

Jeshjesh

New Member
Newbie
Joined
Nov 10, 2019
Messages
4
Trophies
0
Age
44
XP
56
Country
United States
It will, however I am not baller enough to run one of those so I cannot directly offer you assistance to walk you through it.
Messing around with it a bit and this is where I'm at. Not sure if that's even the right thing to try

admin@Synology:/$ python3 /volume1/Switch/Games/nut.py -S

Traceback (most recent call last):

File "/volume1/Switch/Games/nut.py", line 9, in <module>

import urllib3

ImportError: No module named 'urllib3'
 

pikachullk

Member
Newcomer
Joined
Aug 12, 2015
Messages
5
Trophies
0
Age
37
XP
64
Country
Switzerland
I had better experience running NUT as a service using systemd.
So, you would want to make a systemd file.

This can be /lib/system... or /etc/system... So check!
Code:
sudo nano /lib/systemd/system/NUT.service

And you need to fill that with information for the service to run, and how.
This script will call upon nut_headless.sh file I created beforehand.
Obviously you'd need to change locations, etc...
Plenty of further documentation about systemd and its uses.

Code:
[Unit]
Description=NUT Daemon
After=network-online.target

[Service]
Type=simple
User=username (or remove this)
Group=group (or remove this)
UMask=007 (if shared by other users, otherwise remove)
ExecStart=/home/user/NUT/nut_headless.sh &
Restart=on-failure
TimeoutStopSec=300

[Install]
WantedBy=multi-user.target

save and exit (ctrl+x).

Set permissions using:
This can be /lib/system... or /etc/system... So check!
Code:
sudo chmod 644 /etc/systemd/system/NUT.service

Now reload your services:
Code:
sudo systemctl daemon-reload
Enable it:
Code:
sudo systemctl enable NUT.service
Check its status:
Code:
sudo systemctl status NUT.service
You should see it running.

You can use "restart, stop, disable, enable, start" in place of "status" to the service as options.

The shell script I used that was called upon was (you can use nano to make this like you did with the systemd file):
Code:
#!/bin/sh
sleep 20
python3 /home/user/NUT/nut.py -S
That really help my dear friend~~thank you for your great help~
<(_ _)>
 

pikachullk

Member
Newcomer
Joined
Aug 12, 2015
Messages
5
Trophies
0
Age
37
XP
64
Country
Switzerland
I had better experience running NUT as a service using systemd.
So, you would want to make a systemd file.

This can be /lib/system... or /etc/system... So check!
Code:
sudo nano /lib/systemd/system/NUT.service

And you need to fill that with information for the service to run, and how.
This script will call upon nut_headless.sh file I created beforehand.
Obviously you'd need to change locations, etc...
Plenty of further documentation about systemd and its uses.

Code:
[Unit]
Description=NUT Daemon
After=network-online.target

[Service]
Type=simple
User=username (or remove this)
Group=group (or remove this)
UMask=007 (if shared by other users, otherwise remove)
ExecStart=/home/user/NUT/nut_headless.sh &
Restart=on-failure
TimeoutStopSec=300

[Install]
WantedBy=multi-user.target

save and exit (ctrl+x).

Set permissions using:
This can be /lib/system... or /etc/system... So check!
Code:
sudo chmod 644 /etc/systemd/system/NUT.service

Now reload your services:
Code:
sudo systemctl daemon-reload
Enable it:
Code:
sudo systemctl enable NUT.service
Check its status:
Code:
sudo systemctl status NUT.service
You should see it running.

You can use "restart, stop, disable, enable, start" in place of "status" to the service as options.

The shell script I used that was called upon was (you can use nano to make this like you did with the systemd file):
Code:
#!/bin/sh
sleep 20
python3 /home/user/NUT/nut.py -S
I use this script~But this systemd file restart every 20second~I don't know why~
I've already change my path of nut.py in every script...would you please help me again~
I do all this on ubuntu 18.04...is that a problem?
 

Jeshjesh

New Member
Newbie
Joined
Nov 10, 2019
Messages
4
Trophies
0
Age
44
XP
56
Country
United States
I added SMB in tinfoil to my NAS but when I browse to directory no .nsp show. When I added SFTP and try installing an .nsp it gives and error Failed to open NSP. Any ideas? Just trying to get access to my collection wirelessly on my NAS since its always running
 

mdmachine

Well-Known Member
Member
Joined
Jun 15, 2009
Messages
189
Trophies
0
XP
882
Country
United States
I use this script~But this systemd file restart every 20second~I don't know why~
I've already change my path of nut.py in every script...would you please help me again~
I do all this on ubuntu 18.04...is that a problem?

If you simply run the nut.py on it's its own, does it run normally?

And you made a sh file for the service to execute?
If so, run that on its own as well make sure it's working.

Sounds like it's running the shell script, hence the 20 seconds. In that shell, it "sleeps" for 20 seconds, then attempts to run, which is failing, and restarting.
 

pikachullk

Member
Newcomer
Joined
Aug 12, 2015
Messages
5
Trophies
0
Age
37
XP
64
Country
Switzerland
both of the nut.py and sh scripts runs normally....as long as I execute it with systemd~it failed...
every 20second it restart again...even I use root to run it.....
 

mdmachine

Well-Known Member
Member
Joined
Jun 15, 2009
Messages
189
Trophies
0
XP
882
Country
United States
both of the nut.py and sh scripts runs normally....as long as I execute it with systemd~it failed...
every 20second it restart again...even I use root to run it.....
In the service script try to run it with your user (not root) and group, if you haven't already. If the scripts work normally than something is happening VIA the service executing, sleeping 20 seconds, then failing.

The nut.system contents properly pointing to the .sh?

Also feel free to read up about systemd for your distro, my post is just an example. It does work for me but different distros sometimes need different configuration.

I will say it was a royal pain to get nut to run on boot. As I had tried crontab, rc.local and other means before trying the service.
 
Last edited by mdmachine,

drguild

Active Member
Newcomer
Joined
Mar 2, 2014
Messages
29
Trophies
0
Age
41
XP
666
Country
Don't know if you guys have experienced this but tried to put in a couple things but it will install 1.3-1.4gb then just seems to hang I tried a game update as well as a full game.
I am on SXOS and swapped my card to a 400gb from 200gb I tried the SX and this Tinfoil version of version of Nut same result.

No idea if its because I upgraded my card.

Using the latest SX installer doesn't work with nut even with the SX Nut version, as it just doesn't start, so using the latest HBG Tinfoil which does the above.

Installing the update directly from SD with HBG worked no no idea why it seems to stall with usb nut at 1.3-1.4gb.
 
Last edited by drguild,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Did you pee in the water