nvidia-xrun icon indicating copy to clipboard operation
nvidia-xrun copied to clipboard

presetup nvidia-xrun on a tty session

Open DxCx opened this issue 7 years ago • 11 comments

Hey,

i was wondering, is it possible to "bind" nvidia-xrun on tty start? for example. bind it to tty6, so when im using CTRL+ALT+F6 it will switch to nvidia-xrun right away (login should be there first ofc)

DxCx avatar Oct 26 '18 07:10 DxCx

Adding this to your shell profile should work:

# Run nvidia-xrun when logged in on tty6.
if [ "$(tty)" = "/dev/tty6" ]; then
        nvidia-xrun
fi

luukvbaal avatar Nov 20 '18 14:11 luukvbaal

Thank you :) Will give it a try and report back hehe. Also, is there a way to disable root password request for nvidia-xrun script? I can allow it in sudoers i guess but then the whole script needs to be run as root which is not what i want, Also adding insmod to sudoers fills wrong to me Any suggestions?

DxCx avatar Nov 20 '18 15:11 DxCx

If you extract the parts of the script that require sudo and put them in a different script (see #87, b142b007cab0c3535fecce7f929cdb7463a84971), you can (probably) safely add the extracted script to your sudoers file/sudoers.d.

ExoticMatter avatar Nov 25 '18 06:11 ExoticMatter

That actually awsome thanks alot @ExoticMatter I hope it will get merged and released soon enough, if it wouldnt i will have to reinstall from git instead from offical package but im using it so much that it worth it anyway XD

DxCx avatar Nov 25 '18 06:11 DxCx

Hi guys, i'll try to have a look at it during weekend

Witko avatar Jan 17 '19 23:01 Witko

Ty @witiko I got xrun setup on fixed tty like i wanted It just requires now 2 more sudo passwords (one for insmod on login, other for rmmod on logout) which i hope to cancel by having isolated scripts which i can auto sudo

DxCx avatar Jan 18 '19 06:01 DxCx

Could you prepare a PR with documentation for this in readme? Seems like a nice thing.

Witko avatar Jan 18 '19 14:01 Witko

Do you want me to add readme on auto run xrun? Or you want @ExoticMatter to document hes no-sudo approach?

DxCx avatar Jan 18 '19 16:01 DxCx

The auto run feature. I'll look deeper into the better sudo support.

Witko avatar Jan 18 '19 16:01 Witko

Sure, will do. Thanks

DxCx avatar Jan 18 '19 16:01 DxCx

https://github.com/Witko/nvidia-xrun/issues/61

Fincer has a good approach already. Perhaps something from there could be used?

IngeniousDox avatar Jan 19 '19 20:01 IngeniousDox