Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid using gnome-terminal profile as auto-launch method #41

Open
LuKePicci opened this issue Apr 21, 2018 · 9 comments
Open

Avoid using gnome-terminal profile as auto-launch method #41

LuKePicci opened this issue Apr 21, 2018 · 9 comments
Labels
help wanted nvOC 2.1 Issue targeting nvOC 2.1

Comments

@LuKePicci
Copy link
Collaborator

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.

@sizzlephizzle
Copy link
Collaborator

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 :)

@papampi
Copy link
Owner

papampi commented Apr 22, 2018

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.

@doftorul
Copy link
Contributor

doftorul commented May 5, 2018

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

@LuKePicci
Copy link
Collaborator Author

LuKePicci commented May 5, 2018

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

@papampi
Copy link
Owner

papampi commented May 6, 2018

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.

@LuKePicci
Copy link
Collaborator Author

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.

@LuKePicci LuKePicci added the nvOC 2.1 Issue targeting nvOC 2.1 label Jun 15, 2018
@cartesien
Copy link
Collaborator

If it's possible to avoid gnome-desktop, i support your work about that. and i'm ready to test it.

@LuKePicci
Copy link
Collaborator Author

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.

@LuKePicci
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted nvOC 2.1 Issue targeting nvOC 2.1
Projects
None yet
Development

No branches or pull requests

5 participants