Configuring a dual screen setup - XBMCbuntu (Ubuntu 11.10 LXDE)

It will only let me save it in Home>smiler>.screenlayout

no results from the terminal request which I assume is due to the file not being in the home folder.

/home/smiler IS “your” home folder :slight_smile:

Ok, run:

gedit ~/.screenlayout

and post the contents back here.

Sorry, just getting a blank page.

Did you save the layout to /home/smiler/.screenlayout first ?

[EDIT]

Ahh, I see … OK, in ARandR, go to Layout>Save As … give it the filename arandr.sh and save the file.

now run:

gedit ~/.screenlayout/arandr.sh

and post the contents.

That worked. I may have been using the wrong terminal before, I was using root terminal.

Results:

#!/bin/sh
xrandr --output DP3 --off --output DP2 --off --output DP1 --off --output HDMI3 --off --output HDMI2 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --mode 1920x1080 --pos 0x1232 --rotate normal --output VGA1 --off

Are you happy with that configuration ?

If so we’ll move on to autostarting it …

I’m hoping the underlying LXDE “autostart” structure is the same in XBMCbuntu as in Peppermint … but just to check, can you send the output from:

ls ~/.config/autostart

I am happy yes.

XTerm did nothing.

Try’d it in root terminal and got:

ls: cannot access /root/.config/autostart: no such file or directory

Forget the root shell … in any path “~” means the current users home directory, but if you use a root shell, that becomes roots home directory.

So if you’re logged on as smiler “~” = “/home/smiler” …it just saves you having to type /home/smiler then the rest of the path.
but in a root shell, “~” = “/root”

OK, in xterm, run

ls ~/.config

and post the output.

If it’s still nothing I’m going to have to download an XBMCbuntu LiveCD and bung it in a VM and have a looksee.

[EDIT]

Which version of XBMCbuntu did you download ?
10.1 Dharma (Stable)
or
11 Eden (Testing - Release Candidate 2)

Results:
autostart evolution gnome-session lxpanel pcmanfm yelp
chromium Flavio Tordin goa-1.0 lxsession software-centre
dconf gedit leafpad menus Trolltech.conf
enchant ghb libfm openbox update-notifier

All the above in blue except ‘Trolltech.conf’

I’m 95% certain that I have version 10.1

Cheers.

Thanks for the explanation by the way, little snippets like that help to de-mistify the magic a bit.

OK, lets create a .desktop file in the /home/smiler/.config/autorun directory:

gedit ~/.config/autostart/monitor-adjust.desktop

When the gedit window opens a blank file, make it read:-

[Desktop Entry] Name=Monitor Auto Adjust Comment=run ARandR saved config Exec=lxterminal --command "/home/smiler/.screenlayout/arandr.sh" Terminal=true
(obviously leave out the [b]Quote[/b] line .. start with the [b][Desktop Entry][/b] line)

SAVE the file, and exit gedit.

Now reboot … it should start on one monitor, and then switch to two as the settings stored by ARandR are applied.

Gedit file created satis.

Still booting up in single screen though…

I think I’ve realised my error :slight_smile:

You may not have lxterminal installed … you were using xterm weren’t you.

OK, run:

gedit ~/.config/autostart/monitor-adjust.desktop

and make it read:-

[Desktop Entry] Name=Monitor Auto Adjust Comment=run ARandR saved config Exec=xterm "/home/smiler/.screenlayout/arandr.sh" Terminal=true

so you’re just changing the line i’ve highlighted in red.

SAVE the file, and reboot … what happens now ?

I try’d dropping the ‘l’ when it didn’t work the first time (see, I’m learning) but still had ‘terminal’ instead of just ‘term’.

I have now try’d the above (and think I’m starting to grasp the structure of what is going on, thanks.) but I’m afraid it hasn’t worked.

OK, I’m going to guess that maybe XBMCbuntu ignores the autostart directory ???

Leave it with me and I’ll download XBMCbuntu 10.1, bung it in a virtual machine and work it out, then post back here.

meanwhile can you send the contents of

gedit ~/.config/autostart/monitor-adjust.desktop

and

gedit ~/.screenlayout/arandr.sh

and the output from:

ls -l ~/.config/autostart/monitor-adjust.desktop

and

ls -l ~/.screenlayout/arandr.sh

Oh, and your username on te PC is smiler right ?

Please don’t go to too much trouble, I truly appreciate your time and don’t want to put you out. You have been a huge help already.

[Desktop Entry]
Name=Monitor Auto Adjust
Comment=run ARandR saved config
Exec=xterm–command “/home/smiler/.screenlayout/arandr.sh”
Terminal=true

#!/bin/sh
xrandr --output DP3 --off --output DP2 --off --output DP1 --off --output HDMI3 --off --output HDMI2 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --mode 1920x1080 --pos 0x1232 --rotate normal --output VGA1 --off

I’m guessing from that that everything is in place, it’s just not being activated.

Sorry I added 2 more commands above I’d like the output from.

And it’s no trouble :slight_smile: … I’ll work it out … I mean we could add the command to /etc/rc.local … but I’d rather test that first, and I’d prefer to find a way of running it in userspace than as root at the end of every run level (don’t quite know why, but there you go:) )

Ahh … just spotted a typo …

YOUR file reads:-

[Desktop Entry]
Name=Monitor Auto Adjust
Comment=run ARandR saved config
Exec=xterm–command “/home/smiler/.screenlayout/arandr.sh”
Terminal=true

when it SHOULD read:-

[Desktop Entry]
Name=Monitor Auto Adjust
Comment=run ARandR saved config
Exec=xterm “/home/smiler/.screenlayout/arandr.sh”
Terminal=true

So run:

gedit ~/.config/autostart/monitor-adjust.desktop

and remove the bit I’ve highlighted in red.

Then try rebooting, and let me know what happens

Eureka! It works!

Thanks very much Mark, your brilliance know no bounds. :slight_smile: