Open LuKePicci opened 6 years ago
I'm no expert but my rigs would ideally run 100% in text. Without the need for KVM so I would fully support this. My needs are different to the masses so I don't expect the OS to have a text only switch, but I support this :)
This is not about full headless as we cant do it, nvidia drivers needs desktop and X server so we just trying to find a general way to start nvOC without binding it to gnome-terminal.
Systemd is your friend. Here's a miner.service started from systemd
[Unit] Description=Mine Something
[Service] Environment=GPU_FORCE_64BIT_PTR=0 Environment=GPU_MAX_HEAP_SIZE=100 Environment=GPU_USE_SYNC_OBJECTS=1 Environment=GPU_MAX_ALLOC_PERCENT=100 Environment=GPU_SINGLE_ALLOC_PERCENT=100
Environment=DISPLAY=:0 Environment=XAUTHORITY=/home/m1/.Xauthority
WorkingDirectory=/home/m1/ ExecStart=/bin/bash --login -c "ethminer -G --farm-recheck 200 -F http://127.0.0.1:8080/NAMEOFTHISRIG"
Restart=always
[Install] WantedBy=multi-user.target
What do you think about doing something like @doftorul described but launching a screen instance for 2unix in place of ethminer?
Then, in a terminal window one could either attach to the screen or tail its screenlog
If it starts 2unix screen again when its killed or stopped for any reason, then it can be the answer. We can easily add nvOC path to 2unix start command and change it from ssh with no problem.
I started working on this new solution to startup nvOC, is working fine except for some stuff related to features that need write access, like switchers and logging. You can review the systemd service description you see in the nvOC helper script under the install-service function. Please report in the PR thread any kind of issues you find, not here.
If it's possible to avoid gnome-desktop, i support your work about that. and i'm ready to test it.
There is already support for running nvoc as a systemd service after #62 merge, it you would like to test make sure you follow my guidelines for setting user permissions. Then, you can disable autorun based on gnome-terminal profile. The nvOC helper script has the service installer built-in, see command help for details.
Support for nvOC running as systemd service has reached the stable 3.0 branch but should be considered experimental, this issue thread is left open for support and discussion about this topic. Feedbacks are welcome.
As discussed during last weeks, nvOC should not depend on gnome-terminal to automatically launch 2unix on startup. This makes quite hard to set different path to 2unix in case nvOC scripts/repos are installed/cloned in custom locations. Additionally, it may create problems into choosing a different desktop manager where gnome-terminal is not the default terminal emulator (e.g. lubuntu).
Let's discuss here any possible alternative and how it will change current nvOC user experience.