VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: Where to put a shell script  (Read 2412 times)

Martin109

  • Vectorite
  • ***
  • Posts: 290
Where to put a shell script
« on: June 19, 2011, 07:20:34 am »

Havng learnt about synclient and its control of the Touchpad on my laptop, and found some commands which tweak the Touchpad satisfactorily, I have put them in a little shell script, so all 3 can be executed with one little command.

It would be even easier if the lines could be appended to a VL shell script that runs anyway on booting, so that setting up of the Touchpad becomes totally automatic, but where would I place the lines?

It's always been a mystery to me which scripts are executed on boot up and in which order.
Logged
Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

hata_ph

  • Packager
  • Vectorian
  • ****
  • Posts: 3261
  • -- Just being myself --
Re: Where to put a shell script
« Reply #1 on: June 19, 2011, 07:45:38 pm »

If you want the script to be run at boot time, add your script path to /etc/rc.d/rc.local

PS: It apply to all the linux based OS
Logged

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4085
Re: Where to put a shell script
« Reply #2 on: June 19, 2011, 08:33:58 pm »

rc.local is great for commands that are run as root, early in the boot process. Its location varies some.

To run a command as regular user, your WM or DE should have a location for you to put your startup commands.

Icewm uses ~/.icewm/startup
KDE3 uses ~/.kde/Autostart

XFCE users, what method do you use?
Logged

hata_ph

  • Packager
  • Vectorian
  • ****
  • Posts: 3261
  • -- Just being myself --
Re: Where to put a shell script
« Reply #3 on: June 19, 2011, 08:48:22 pm »

For XFCE, you can add command in Session and Startup Menu.
Logged

Martin109

  • Vectorite
  • ***
  • Posts: 290
Re: Where to put a shell script
« Reply #4 on: June 20, 2011, 01:43:23 pm »

For XFCE, you can add command in Session and Startup Menu.

Thanks - and which file would that be found in?
Logged
Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Andy Price

  • Packager
  • Vectorite
  • ****
  • Posts: 237
Re: Where to put a shell script
« Reply #5 on: June 20, 2011, 05:21:42 pm »

It's on the menu under Settings > Session and Startup. You can add items on the Application Autostart tab via a dialogue box.
Andy
Logged

Pita

  • Vectorian
  • ****
  • Posts: 1326
Re: Where to put a shell script
« Reply #6 on: June 20, 2011, 06:05:16 pm »

rc.local is great for commands that are run as root, early in the boot process. Its location varies some.

To run a command as regular user, your WM or DE should have a location for you to put your startup commands.

Icewm uses ~/.icewm/startup
KDE3 uses ~/.kde/Autostart

XFCE users, what method do you use?

And please not to forget fluxbox ~/.fluxbox/startup ;)
Logged

Martin109

  • Vectorite
  • ***
  • Posts: 290
Re: Where to put a shell script
« Reply #7 on: June 21, 2011, 12:35:53 am »

Under 'Sessions and Startup' I have two tabs, 'General' and 'Advanced'.

Under 'General', there are tick boxes, as follows:

Session chooser
[] Display chooser on login

Logout settings
[] Automatically save session on logout
[tick] Prompt on logout

Under 'Advanced', there are tick boxes, as follows:

Compatibility
[] Launch Gnome services on startup
[] Launch KDE services on startup

Security
[] Manage remote applications

so, there's no 'Application Autostart' tab.

There's an 'Autostarted Applications' entry on the Settings menu, but that's just a list of autostarted applications.
Logged
Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Andy Price

  • Packager
  • Vectorite
  • ****
  • Posts: 237
Re: Where to put a shell script
« Reply #8 on: June 21, 2011, 12:48:51 am »

Sorry, I upgraded XFCE to 4.6.1 and I guess it's a little different from the version which comes with VL6. But I know there's somewhere to add autostarts in there too!
Logged