How do I run this script at startup? [sorted]

Forum rules
Before you post please read this

How do I run this script at startup? [sorted]

Postby blue_sky on Fri Dec 14, 2012 12:27 pm

I would like to run this script at startup to configure my dual monitor setup in Mint maya. The script works great but I lose the setting of my primary monitor on reboot.

Code: Select all
xrandr --output DVI-0 --primary


What is the easiest way to do it? Please keep it simple, I'm not that bright.
Last edited by blue_sky on Fri Dec 14, 2012 12:57 pm, edited 1 time in total.
User avatar
blue_sky
Level 1
Level 1
 
Posts: 26
Joined: Mon Jun 07, 2010 5:40 pm

Linux Mint is funded by ads and donations.
 

Re: How do I run this script at startup?

Postby Z-Xylon on Fri Dec 14, 2012 12:37 pm

In the Cinnamon Menu, look for Startup Applications. When the startup applications dialog comes up, click on add and where it says command, click on browse and look for the script in the popup file browser. Then give the new startup application a name, and an optional comment and click on add. This should make the script startup automatically when Mint starts.
However, make sure that the script is an executable, by running this in the terminal:

Code: Select all
chmod +x <path-to-file>


obviously replacing <path-to-file> with the actual path to the file.

Hopefully that helped :D
Last edited by xenopeek on Fri Dec 14, 2012 12:40 pm, edited 1 time in total.
Reason: Removed sudo from the command; sudo is not needed for files you own.
This is blue. And this is my blog about technology and stuff.
Z-Xylon
Level 1
Level 1
 
Posts: 26
Joined: Sun Oct 28, 2012 6:43 am

Re: How do I run this script at startup?

Postby blue_sky on Fri Dec 14, 2012 12:56 pm

^Works like a charm! Thanks!
User avatar
blue_sky
Level 1
Level 1
 
Posts: 26
Joined: Mon Jun 07, 2010 5:40 pm


Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 3 guests