Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 32

Thread: How to install dual monitor command file permanently

  1. #11
    Join Date
    May 2006
    Location
    Kelowna, BC
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: How to install dual monitor command file permanently [SOLVED]

    Quote Originally Posted by Toz View Post
    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:
    ...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.
    I got a little further....No dead lock after 'Restart' ...but still not permanent. I had to run Arandr again to get the Dual Monitor setting.

    It seems there is still something missing, but I can't figure it out.
    I attached the screenshots of Ownership/Permission and lightdm.conf and the screenlayout.sh file. I'm just wondering if it is necessary to make lightdm.conf executable too?
    Attached Files Attached Files
    Last edited by Cariboo1938; November 1st, 2013 at 01:49 AM. Reason: [SOLVED]
    Life is full of setbacks; Success is determined by how you handle them!

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

    Re: How to install dual monitor command file permanently

    Lightdm.conf does not need to be made executable.

    Instead of running arandr to fix the issue, can you instead run:
    Code:
    /usr/local/bin/screenlayout.sh
    ...and see if it sets up the monitor configuration correctly?

    There are also lightdm log files in /var/log/lightdm. Of interest would be lightdm.log. You'll need root privledges to view the file. Try:
    Code:
    sudo -i mousepad /var/log/lightdm/lightdm.log
    ...to view the file. Copy the contents and paste back in between [code] [/code] tags.

  3. #13
    Join Date
    May 2006
    Location
    Kelowna, BC
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: How to install dual monitor command file permanently

    Quote Originally Posted by Toz View Post
    Lightdm.conf does not need to be made executable.
    Instead of running arandr to fix the issue, can you instead run:
    Code:
    /usr/local/bin/screenlayout.sh
    ...and see if it sets up the monitor configuration correctly?
    I put the screenlayout.sh on the Desktop and after boot, when I get the mirrored monitors only,
    I execute the .sh file dirctly from there.
    It does the same as running /usr/local/bin/screenlayout.sh from the terminal.


    Quote Originally Posted by Toz View Post
    There are also lightdm log files in /var/log/lightdm. Of interest would be lightdm.log. You'll need root privledges to view the file. Try:
    Code:
    sudo -i mousepad /var/log/lightdm/lightdm.log
    ...to view the file. Copy the contents and paste back in between [code] [/code] tags.
    Here is the lightdm log-file
    Code:
    [+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
    [+0.00s] DEBUG: Starting Light Display Manager 1.8.2, UID=0 PID=979
    [+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf.d/50-greeter-wrapper.conf
    [+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf.d/50-xserver-command.conf
    [+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
    [+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
    [+0.00s] DEBUG: Registered seat module xlocal
    [+0.00s] DEBUG: Registered seat module xremote
    [+0.00s] DEBUG: Registered seat module unity
    [+0.00s] DEBUG: Registered seat module surfaceflinger
    [+0.00s] DEBUG: Adding default seat
    [+0.00s] DEBUG: Seat: Starting
    [+0.00s] DEBUG: Seat: Creating greeter session
    [+0.00s] DEBUG: Seat: Setting XDG_SEAT=seat0
    [+0.00s] DEBUG: Seat: Creating display server of type x
    [+0.00s] DEBUG: Seat: Starting local X display
    [+0.02s] DEBUG: Deactivating Plymouth
    [+0.04s] DEBUG: Using VT 7
    [+0.04s] DEBUG: DisplayServer x-0: Logging to /var/log/lightdm/x-0.log
    [+0.04s] DEBUG: DisplayServer x-0: Writing X server authority to /var/run/lightdm/root/:0
    [+0.04s] DEBUG: DisplayServer x-0: Launching X Server
    [+0.04s] DEBUG: Launching process 993: /usr/bin/X -core :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
    [+0.06s] DEBUG: DisplayServer x-0: Waiting for ready signal from X server :0
    [+0.06s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
    [+0.06s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
    [+0.71s] DEBUG: Got signal 10 from process 993
    [+0.71s] DEBUG: DisplayServer x-0: Got signal from X server :0
    [+0.71s] DEBUG: DisplayServer x-0: Connecting to XServer :0
    [+0.71s] DEBUG: Quitting Plymouth; retaining splash
    [+0.73s] DEBUG: Launching process 1017: /usr/local/bin/screenlayout.sh
    [+0.86s] DEBUG: Process 1017 exited with return value 0
    [+0.86s] DEBUG: Seat: Exit status of /usr/local/bin/screenlayout.sh: 0
    [+0.86s] DEBUG: Seat: Display server ready, starting session authentication
    [+0.86s] DEBUG: Session: Setting XDG_VTNR=7
    [+0.86s] DEBUG: Session pid=1024: Started with service 'lightdm-greeter', username 'lightdm'
    [+1.03s] DEBUG: Session pid=1024: Authentication complete with return value 0: Success
    [+1.03s] DEBUG: Seat: Session authenticated, running command
    [+1.03s] DEBUG: Session pid=1024: Setting XDG_VTNR=7
    [+1.03s] DEBUG: Session pid=1024: Running command /usr/lib/lightdm/lightdm-greeter-session /usr/sbin/lightdm-gtk-greeter
    [+1.05s] DEBUG: Session pid=1024: Logging to /var/log/lightdm/x-0-greeter.log
    [+1.06s] DEBUG: Activating VT 7
    [+1.49s] DEBUG: Session pid=1024: Greeter connected version=1.8.2
    [+2.34s] DEBUG: Session pid=1024: Greeter start authentication for jg
    [+2.34s] DEBUG: Seat: Setting XDG_SEAT=seat0
    [+2.34s] DEBUG: Session: Setting XDG_VTNR=7
    [+2.34s] DEBUG: Session pid=1099: Started with service 'lightdm', username 'jg'
    [+2.35s] DEBUG: Session pid=1099: Got 1 message(s) from PAM
    [+2.35s] DEBUG: Session pid=1024: Prompt greeter with 1 message(s)
    [+13.63s] DEBUG: Session pid=1024: Continue authentication
    [+13.65s] DEBUG: Session pid=1099: Authentication complete with return value 0: Success
    [+13.65s] DEBUG: Session pid=1024: Authenticate result for user jg: Success
    [+13.67s] DEBUG: Session pid=1024: User jg authorized
    [+13.67s] DEBUG: Session pid=1024: Greeter sets language en_CA
    [+13.71s] DEBUG: Writing /home/jg/.dmrc
    [+13.80s] DEBUG: Session pid=1024: Greeter requests session xubuntu
    [+13.84s] DEBUG: Writing /home/jg/.dmrc
    [+13.92s] DEBUG: Seat: Stopping greeter; display server will be re-used for user session
    [+13.92s] DEBUG: Session pid=1024: Sending SIGTERM
    [+13.92s] DEBUG: Session pid=1024: Exited with return value 0
    [+13.92s] DEBUG: Seat: Session stopped
    [+13.92s] DEBUG: Seat: Greeter stopped, running session
    [+13.92s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
    [+13.92s] DEBUG: Session pid=1099: Setting XDG_VTNR=7
    [+13.92s] DEBUG: Session pid=1099: Running command /usr/sbin/lightdm-session startxfce4
    [+13.92s] DEBUG: Session pid=1099: Logging to .xsession-errors
    [+13.94s] DEBUG: Activating VT 7
    
    Life is full of setbacks; Success is determined by how you handle them!

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

    Re: How to install dual monitor command file permanently

    Can you also try adding:
    Code:
    session-setup-script=/usr/local/bin/screenlayout.sh
    ...to the end of /etc/lightdm/lightdm.conf?

  5. #15
    Join Date
    May 2006
    Location
    Kelowna, BC
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: How to install dual monitor command file permanently

    Quote Originally Posted by Toz View Post
    Can you also try adding:
    Code:
    session-setup-script=/usr/local/bin/screenlayout.sh
    ...to the end of /etc/lightdm/lightdm.conf?
    Nope, didn't do the trick...

    As you can see, the file screenlayout is located in /usr/local/bin
    and the end line of line ightdm.conf is now
    Code:
    session-setup-script=/usr/local/bin/screenlayout.sh
    but I still have the same display on both monitors.
    Attached Images Attached Images
    Last edited by Cariboo1938; October 30th, 2013 at 04:47 AM.
    Life is full of setbacks; Success is determined by how you handle them!

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

    Re: How to install dual monitor command file permanently

    Hmm.

    Can you try putting the command in .xprofile in your home directory?
    Code:
    mousepad ~/.xprofile
    ...and copy/paste:
    Code:
    #!/bin/sh
    xrandr --output VGA-0 --mode 1920x1080 --pos 0x0 --rotate normal --output DVI-0 --mode 1920x1080 --pos 1920x0 --rotate normal
    ...save the file and make it executable:
    Code:
    chmod +x ~/.xprofile
    ...and try it again?

  7. #17
    Join Date
    May 2006
    Location
    Kelowna, BC
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: How to install dual monitor command file permanently

    nope...I again have to execute screenlayout.sh (in my case,from /home/jg/Dektop) after a reboot.
    Do I have to bring lightdm.conf first back to the originale state?
    Attached Files Attached Files
    Life is full of setbacks; Success is determined by how you handle them!

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

    Re: How to install dual monitor command file permanently

    The .xprofile file is owned by root in your home directory - this one should be owned by you. Try:
    Code:
    sudo chown jg:jg ~/.xprofile
    ...and try again.

    I've used the lightdm procedure successfully in the past. If I have time today, I'm going to hook up my external monitor to my 13.10 install and have a closer look. Maybe there has been some sort of regression in lightdm.

  9. #19
    Join Date
    May 2006
    Location
    Kelowna, BC
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: How to install dual monitor command file permanently

    Still not working...
    BTW:
    I thank you so much for your patience and support...I am really interested how to solve the issue
    Attached Images Attached Images
    Life is full of setbacks; Success is determined by how you handle them!

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

    Re: How to install dual monitor command file permanently

    Was able to do some testing this morning.

    xrandr in the lightdm configuration files no longer works for me either - must be a regression (or change) in lightdm.

    .xprofile worked for me. My .xprofile file:
    Code:
    #!/bin/bash
    xrandr --output DP2 --auto --right-of LVDS1
    ..and:
    Code:
    $ ls -al  |grep xprofile
    -rwxr-xr-x  1 toz  toz    132 Oct 30 10:36 .xprofile
    Can you try with a small delay in the file and using the bash shell:
    Code:
    #!/bin/bash
    sleep 3
    xrandr --output VGA-0 --mode 1920x1080 --pos 0x0 --rotate normal --output DVI-0 --mode 1920x1080 --pos 1920x0 --rotate normal
    Also check your ~/.xsession-errors file for any xrandr errors:
    Code:
    cat ~/.xsession-errors

Page 2 of 4 FirstFirst 1234 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
  •