• Generate a random hostname on stratup

    I hope it’s not a stupid question…
    I stumbled upon this article on Archwiki and wanted to try adding sudo hostname $RANDOM to my autostart sctipt (~/.config/openbox/autostart as I use ob). It didn’t work for me, either I can’t sudo from this script or the hostname change is temporary for the running of the script only I guess (or both).
    Is there a right&smart way to do this?

  • I dont think that is working because it needs elevated privileges which openbox wont run.

    I think you could make a systemd service that does the same thing.
    Here is a link on how to create a systemd service

    Cheers! I don't know what I'm talking about!

random5 stratup1 hostname3 generate2 Posts 2Views 454
Log in to reply