Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32

Thread: How to install dual monitor command file permanently

  1. #1
    Join Date
    Oct 2013
    Beans
    3

    How to install dual monitor command file permanently

    Hello,
    I run xubuntu 13.10 on my desktop with two monitors.
    In Settings Manager I created a .sh file with ArandR to get a extended Desktop.
    Each time I restart, I have to execute the .sh file again.
    The script looks like this:
    #!/bin/sh
    xrandr --output VGA-0 --mode 1920x1080 --pos 0x0 --rotate normal --output DVI-0 --mode 1920x1080 --pos 1920x0 --rotate normal
    What do I have to do .....to get this command executed at boot?
    In other words: .....to have it installed permanently?
    Last edited by jgrauca; October 27th, 2013 at 08:52 AM. Reason: additional question

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-land
    Beans
    10,873
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: How to install dual monitor command file permanently

    There are different ways depending on your GPU. In the end, modifying the /etc/X11/xorg.conf file is what happens.
    For nvidia, this: http://blog.jdpfu.com/2010/05/12/ubu...-nvidia-driver explains.

  3. #3
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: How to install dual monitor command file permanently

    In addition to @TheFu's suggestion, you could also try to use lightdm's "display-setup-script" parameter. To do this, save the script to /usr/local/bin/ (for example as /usr/local/bin/displaysetup.sh) and make the file executable. Then edit /etc/lightdm/lightdm.conf and add the line:
    Code:
    display-setup-script=/usr/local/bin/displaysetup.sh
    ...to the end of the file and reboot to test.

  4. #4
    Join Date
    Oct 2013
    Beans
    3

    Re: How to install dual monitor command file permanently

    Thank you both, TheFu and Toz, for the prompt response...
    My hardware is:
    Processor >>> AMD Athlon II X2 240 on MSI 785GM-E51 Mainboard
    integrated Graphic >>>ATI Radeon HD4200GPU
    I put this information here before I try your suggestions in case it needs a different approach!

  5. #5
    Join Date
    Mar 2009
    Location
    The Freight Yard
    Beans
    210
    Distro
    Ubuntu Mate 16.10 Yakkety Yak

    Re: How to install dual monitor command file permanently

    Despite my board name, I'm NOT trying to derail this topic, but was wondering if this would work in KDM as well? Or how to do it, as I'm having the same trouble as the OP. Thanks!
    This post is like Brigadoon!

  6. #6
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: How to install dual monitor command file permanently

    Quote Originally Posted by SantaFe View Post
    Despite my board name, I'm NOT trying to derail this topic, but was wondering if this would work in KDM as well? Or how to do it, as I'm having the same trouble as the OP. Thanks!
    Either solution _should_ work, yes. If you've got time, maybe you can try both and report back the results?

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-land
    Beans
    10,873
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: How to install dual monitor command file permanently

    My solution does NOT care which DE or login manager you use. It is related ONLY to the GPU and xorg.conf ... which any LinuxOS running a GUI will use ... er ... until Canonical stops using X/Windows. But all the other distros will and Ubuntu will have the X/Windows as an option forever, I bet.
    Last edited by TheFu; October 28th, 2013 at 12:20 AM.

  8. #8
    Join Date
    Oct 2013
    Beans
    3

    Re: How to install dual monitor command file permanently

    Quote Originally Posted by Toz View Post
    In addition to @TheFu's suggestion, you could also try to use lightdm's "display-setup-script" parameter. To do this, save the script to /usr/local/bin/ (for example as /usr/local/bin/displaysetup.sh) and make the file executable. Then edit /etc/lightdm/lightdm.conf and add the line:
    Code:
    display-setup-script=/usr/local/bin/displaysetup.sh
    ...to the end of the file and reboot to test.


    After restart, boot stops in a dead lock ---> see attachment!
    I could only get out of it by "hardware reset" and new xubuntu installation.
    What could have gone wrong?
    I'm not sure if I made the file executable...Here are the screenshots 02,03 to show what I did.
    I wonder if this is correct?
    Attached Images Attached Images

  9. #9
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: How to install dual monitor command file permanently

    Yipes! I've used this method successfully on a number of occassions. Sorry you had to resort to a full re-install. For future reference, instead of re-installing, you could try to go to a text console (Ctrl+Alt+F1) and undo the change or, if the text console is unavailable, boot into recovery mode and undo the change.

    Looking at your screenshots, the issue may have been the ownership and permissions of the file. You have:
    -rxw------ 1 jg jg 136 ...etc
    ...I would have left it at the default:
    Code:
    -rwxr-xr-x 1 1 root root 136 ...etc
    ...as I believe the script is run by the lightdm user, who would not have had access to that file with the permissions you set. It might have hung the process.

  10. #10
    Join Date
    Mar 2010
    Location
    Squidbilly-land
    Beans
    10,873
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: How to install dual monitor command file permanently

    Looks like someone is ready for a tutorial on Linux/UNIX file permissions. 30 minutes now will pay off for the next 40+ yrs. Trust me.
    To find a tutorial - google "tutorial Linux UNIX file permissions"
    The first page of results seemed reasonable to me.

Page 1 of 4 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •