Forum › Forums › New users › New Users and General Questions › startup – I throw out a softball
- This topic has 9 replies, 5 voices, and was last updated Mar 8-12:34 pm by Anonymous.
-
AuthorPosts
-
March 6, 2018 at 9:08 pm #7441Member
JoeR
This should be an easy one. I want to run the following commands every time the computer boots so i don’t have to ssh in and type them in. How can I easily do it?
here are the commands:
tightvncserver
this allows me to use tightvnc to operate my antiX box remotelyboincmgr
this allows me to see what boinc is doingif you can even suggest a message thread to follow, which would be a good guide.
Thank you
March 6, 2018 at 10:08 pm #7445Anonymous
::You could try putting them in your ~.bashrc if the machine boots to user login.
otherwise they would have to be a sctript loaded by rc.d runlevel every
time the machine starts.March 6, 2018 at 10:45 pm #7449Anonymous
March 7, 2018 at 5:42 am #7453Forum Admin
Dave
::I think you can add those commands to /etc/rc.local
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
March 7, 2018 at 7:58 am #7455MemberJoeR
::Thank you Dave and linuxdaddy for your help,
I can certainly edit the /etc/rc.local file to include the command, question is what would the command look like?
ie
tightvncserver &
or
/usr/bin/tightvncserver &
or
./usr/bin/tightvncserver &
or otherMarch 7, 2018 at 8:13 am #7457Forum Admin
rokytnji
::I’d usually go with what terminal tells me
harry@biker:~ $ which antixcc.sh /usr/local/bin/antixcc.sh harry@biker:~ $ which synaptic /usr/sbin/synaptic harry@biker:~Sometimes I drive a crooked road to get my mind straight.
Not all who Wander are Lost.
I'm not outa place. I'm from outer space.Linux Registered User # 475019
How to Search for AntiX solutions to your problemsMarch 7, 2018 at 11:28 am #7470Anonymous
::I usually type the full path in so I would use the “/usr/bin/tightvncserver &” with no
leading dot and make sure it goes before the “exit 0” in rc.local.
the exit 0 has to be at the end of the file.March 8, 2018 at 11:15 am #7501MemberJoeR
::Still no joy – any ideas why?
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will “exit 0” on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#/home/joe/Scripts/joe_startup.sh
/usr/bin/tightvncserver &
/usr/bin/boincmgr &
exit 0March 8, 2018 at 12:28 pm #7502Moderator
caprea
::Possibly they are starting to early
You can influence this with the sleep command
which sleepCould maybe look like this
(/bin/sleep 60s && /usr/bin/tightvncserver &)That are 60 seconds.I’m not sure about the brackets, so this is without warranty.
March 8, 2018 at 12:34 pm #7503Anonymous
::Is the rc.local marked executable “chmod 755 /etc/rc.local” and all
examples I see online don’t have the & at the end of the lines. -
AuthorPosts
- You must be logged in to reply to this topic.