XFCE workaround: Laptop wallpaper not kept when undocked

So I've been running into the minor annoyance of XFCE always using the wallpaper from the monitor on the left screen after I unplug my secondary monitor. Not sure if anyone else runs into this. Just to clarify:
(pretend the pipe is the border between screens)   
While docked: Wallpaper A (VGA-1) | Wallpaper B (LVDS)
Undocked: Wallpaper A (LVDS)
I would expect wallpaper B to persist on the laptop display regardless of whether the second monitor is hooked up or not.
Since I use a script to toggle my monitor off and on using a hotkey I made a few modifications to it so that you can specify the wallpaper setup while docked or undocked. You could also have completely different wallpapers while mobile if you don't want to be seen in public with your My Little Pony wallpaper.
(I still use a CRT as a second monitor, don't make fun of me)
#!/bin/bash
#Absolute path seems to be required for some reason.
location="/home/jason/.config/xfce4"
function xfset {
cat $location/$1 | while read line; do
variable=`echo $line |awk '{print $1}'`
setting=`echo $line |awk '{print $2}'`
xfconf-query -c xfce4-desktop -p $variable --create -s $setting
done
current=`xrandr |grep current |awk '{print $8 $10}'`
if [ $current == '1366768,' ]
then
#Going to Dual
xfconf-query -c xfce4-desktop -l -v|grep backdrop>$location/single.set
xrandr --output LVDS --mode 1366x768 --pos 1600x432 --rotate normal --output CRT1 --mode 1600x1200 --pos 0x0 --rotate normal --output DFP1 --off;
xfset dual.set
else
#going to single
xfconf-query -c xfce4-desktop -l -v|grep backdrop>$location/dual.set
xrandr --output LVDS --mode 1366x768 --rotate normal --output CRT1 --off --output DFP1 --off
xfce4-panel -r
xfset single.set
fi
Let me know if you have any feedback or found this useful. I'm curious if this is a problem anyone else has.
Last edited by Jasonvw (2013-02-21 09:51:36)

You could look at xfconf properties comparing both monitors with one montor connected to find out differences.
i.e. xfconf-query -c xfce4-desktop -l
Setting a wallpaper in xfce through xfconf:
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path --create -t string -s $wp
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-show --create -t bool -s true
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-style --create -t int -s 0
Where $wp is set to full path of image file.
When comparing the properties you might find monitor1 becomes monitor0 and that might explain the wallpaper switching.
You can find out the path to the current wallpaper using a query like:
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path
May be some of the above will help you figure something out. I only mention it because it is disconcerting to me that you are killing stuff like xfconfd and xfdesktop to achieve the proper wallpapers.

Similar Messages

  • [SOLVED]Gnome 3.4 is not suspending when the lid is closed.

    Hey..
    Since upgrading to gnome 3.4.1, my laptop does not suspend when the lid is closed.
    I have read this this thread without getting a clear answer...
    I have checked the setting in gnome tweak tool, and they are both set to "Suspend"
    The laptop has no problem suspending, if i run the command, or choose the option in the menu to the right.
    Is this a bug ?
    What can i do to fix it. ?
    Last edited by Munken (2012-06-20 05:54:08)

    See this thread for updates on the problem.

  • Notebook HP Probook 6560b not booting when my book essential is plugged in.

    Dear sirs, 
    My laptop will not boot when the my book essential is plugged in. 
    The facts 
    MY book essential 3.0 TB 
    HP Probook 6560B 
    My book works well, is installed in windows and works perfect. 
    Drivers are up to date. 
    However when i want to boot my pc the system freezes.Doesnt do anything not even the bios menu. 
    When i unplug the my book it resumes the boot. 
    I did the following things to solve the problems. 
    Changed bios boot order in to primary hardisk first. 
    Disabled booting for USB. 
    USB legacy option is diabled in bios menu. 
    I have contacted Western Digital but they say i have to change something in windows but don't know what exact.
    I am really out of options and do no what to do, can you please help. 
    Yours sincereley, 
    Gerben Tierie

    Hello Gerben,
    Your ProBook is a Business model.  Your issue would be best answered on the HP Enterprise Business Community Forum
    Good luck!
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • Built-In Mic not working when Headphones plugged in?

    I'm currently using the 13 inch Macbook Pro with the latest software. I noticed just today that the built-in microphone that comes with the laptop will not work when I plug in my headphones. However, as soon as I remove them, they resume working.
    Does anyone have a solution to this?

    Use headphones that also have a microphone.

  • Cq61-240ED laptop does not power on

    I have a Compaq CQ61-240ED laptop. For some time the battery was week, only lasted for 5 minutes to run the laptop. Suddenly the laptop would not power up anymore. The AC adapter was broken. After connecting a different adapter. when pressing start button, the battery indicator light flashes 3 times, furthermore no sign of life. No fan, no HD spinning, no screen, nothing. Also, when I connect the power adapter, AC light near the power inlet on the laptop does not burn. When I remove the battery and plug in the adapter, the AC light comes on for 4 seconds and then switches off. The laptop does not start  when I press the power switch the battery indicator flashes 3 times, even when the battery is out. I searched most of the posts but could not find this situation. 
    Tried already hard reset, took RAM memory out and put it back. Took CMOS battery out, no result.
    Anybody has a clue?

    Hi Roberto_57,
    Turn on the computer and press F2 or select Diagnostics (F2) to open the Diagnostics menu. Make sure the ram is in the computer at the time of diagnostics and make sure no external device is in the USB ports. If the ram was bad you might have had other issue before it stopped working.
    Here is a document on issue when the computer will not start that might help.
    http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&dlc=en&docname=bph07107&lc=en&product=4107711&tmp_...
    Let me know.
    Thanks
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • Spotify closes when undocking laptop

    For some reason, when I physically eject my laptop from its docking station (like, if I want to move my laptop from my desk to another location) Spotify closes itself. It doesn't seem to matter if I have my music playing or not, although I generally have it paused at that point the vast majority of the time. I can restart Spotify just fine afterwards. I am using Windows 7 Professional, and I have a Dell-brand laptop and docking station.
    Has this happened to anyone else? If so, did you figure out a way to keep it from happening? It's not a huge deal by any means, but it is a little weird.

    I haven't ever received an official response, and it still does it for me occasionally (not every single time, though) regardless of which Spotify version I have, since I generally update when prompted. Like others have said, it also defaults to some pretty old tracks when I reopen it... like, something that I had listened to the week prior, which can be a pain sometimes. One thing that seems to maybe help a little is if I do not pause my music when undocking my laptop. I work in a pretty casual office, though, and I listen to very calm (and quiet!) music, so this is definitely not a solution for everyone.

  • HT5622 my apple id is not working when i sign in from my laptop it works but when i sign in from my iphone4 then its not working it gives the message of "your aapleid or password is incorrect"? how can i solve this problem please help

    my apple id is not working when i sign in from my laptop it works but when i sign in from my iphone4 then its not working it gives the message of "your aapleid or password is incorrect"? how can i solve this problem please help

    Hey nocillado,
    Thanks for using Apple Support Communities.
    It sounds like you have 2 things you want to address. These articles can help you use iCloud with your existing Apple ID.
    Get help activating your iPhone
    http://support.apple.com/kb/ts3424
    Using your Apple ID for Apple services
    http://support.apple.com/kb/ht4895
    Using the same Apple ID for Store purchases and iCloud (recommended)
    Have a nice day,
    Mario

  • TS3276 My o2 email account does not work when sending from my MAC it will accept incoming mail but not send it gives me a message that  o2 account (offline) my mac I have no problem with my iPhone  or mac laptop. any suggestions please.

    My o2 email account does not work when sending from my MAC it will accept incoming mail but not send it gives me a message that  o2 account (offline) my mac I have no problem with my iPhone  or mac laptop. any suggestions please.

    Sorry for the delay...
    I did what you've told me, new account and manually copied my files from Time Machine. I had lots of permissions problems, but at the end, almost everything is in order... It seems it had to be with some of the Apple Preferences, but I can't be sure, as most of them were dumped to the trash can.
    I still don't have my Mail Rules back, unfortunately, although I did goggled some. It is a pity, as I had around 30 or 40 of them, getting my mail in order to each of its mailboxes, but it is a small price as the rest doesn't show the before syntoms.
    Thanks for the help, anyway!!

  • Hi, I need help my computer is not starting up at all, nothing happening when I press the button on/off. The battery charger is working as using it for another laptop. Not sure what to do. Anyone have any idea? many thanks

    Hi, I need help my computer is not starting up at all, nothing happening when I press the button on/off. The battery charger is working as using it for another laptop. Not sure what to do. Anyone have any idea? many thanks

    You could try a SMC reset:
    http://support.apple.com/kb/HT3964
    If no change, do what Allan advises.
    Caio.

  • I'm receiving error Boot Device Not Found and Hard disk not exist when I boot up my laptop

    I'm receicing the error Boot Device Not Found when i power on my HP G60-235DX laptop.  After following HP's recommended troubleshooting steps, I receive error Hard disk not exist.  Hmmmm....that's a little concerning.  My guess is I need a new hard drive?    I have the 17 recovery disks I made when I setup this laptop, however I'm not sure if they will resolve this issue.  Any suggestions?

    One of 3 things has happened, listed from most likely to least likely
    1. Hard drive has died, replace it with one of the same size or larger, then use the HP recovery discs to re-install windows.
    2, The motherboard has serious problems. (Replace the notebook)
    3. The hard drive cable that connects it to the motherboard has somehow failed, not very likely. (replace the cable)
    Replace the hard drive with a new one and use your recovery discs to get Windows back on it.
    Here is your service manual, will show you how to replace the hard drive
    http://h10032.www1.hp.com/ctg/Manual/c02985882.pdf
    Recovery Instructions for Vista
    Recovery Instructions for Windows 7

  • Have a mac mini. Just got a external HD. I want to store my itunes media on my external HD and play back on Windows XP laptop. My laptop does not recognize the HD. Only recognizes the empty partition I created on my mac when I partition the drive. What's

    I have a mac mini-snow leopard. I recently bought an external HD. I want to use part of the HD to back up my mac via Time Machine. The other part I want to use to store my Itunes and other media such as movies with VLC so that I can take the HD and play it back thru my windows XP laptop. The problem is that my laptop does not see the part of the external drive that has my mac info stored on it. Only sees the drive ( as drive E ) with zero data that was created by me when I partitioned it on my mac. I partitioned the drive in two. One partitioned under GUID for mac. The other part under exfat for windows. Any suggestions on why my XP laptop cannot view the mac info on the HD. Thanks.

    DBG413 wrote:
    Any suggestions on why my XP laptop cannot view the mac info on the HD. 
    you'll have to install e.g. MacDrive or HFS+ for Windows on your winsloth machine.

  • I have just installed Photoshop Elements for a MAC. MY photos were in iPhoto, I have 47,000 pictures and my drive on my Mac laptop is not large enough. I store my photos in iPhoto on an external drive. Can I store all my photos on an external drive when u

    I have just installed Photoshop Elements for a MAC. MY photos were in iPhoto, I have 47,000 pictures and my drive on my Mac laptop is not large enough. I store my photos in iPhoto on an external drive. Can I store all my photos on an external drive when using Photoshop Elements? If so, in what format should they be stored in? I do I move them from iPhoto to the new storage location? How do I call them up in organizer? And how do I call them up to Edit? I do not want to store any pictures on my Apple Mac laptop. I want to store pictures on several external devices.

    Yes you can store images on an external hard dive and have them referenced in Organizer. It’s best to export copies to separate folders/subfolders and that will ensure iPhoto does not get corrupted.
    Alternatively you could continue to use iPhoto with the Elements Editor set up in the iPhoto prefs as your external editing app. Then there is no need to use Organizer and no need to duplicate your images.
    You can then call up photos directly from iPhoto as normal with the additional option e.g.
    Double-click on a thumbnail to edit in iPhoto editor.
    Control (right) - click on a thumbnail to edit in the elements app.
    http://helpx.adobe.com/photoshop-elements/kb/photoshop-elements-iphoto-mac-os.html

  • I bought a brand new 5th gen ipod touch. im trying to restore from itunes backup. then it says connect to itunes but my hp laptop is not syncing it. when i plug it in it does nothing but say connect to itunes... how do i fix this?

    i bought a brand new 5th gen ipod touch. im trying to restore from itunes backup. then it says connect to itunes but my hp laptop is not syncing it. when i plug it in it does nothing but say connect to itunes... how do i fix this?

    Hey jtom234412,
    Thanks for the question. Based on the information you have provided, it sounds like your device is not detected in iTunes for Windows. The following resource may help resolve this issue:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    Furthermore, if your device is in recovery mode (displaying an iTunes symbol, with a plug), see the relevant information under Step 5.
    Thanks,
    Matt M.

  • TS3274 I keep getting an error when trying to download a tv series right on my iPad from the iTunes store. I am able to download on my laptop then synchronize but it's a hassle specially if my laptop is not with me. All other Apps seem to be working fine.

    I keep getting an error when trying to download a tv series right on my iPad from the iTunes store. I am able to download on my laptop then synchronize but it's a hassle specially if my laptop is not with me. All other Apps seem to be working fine. Help!

    If anyone is reading this still looking for what caused the issue and how to fix it here is what I discovered.
    The antivirus program our company uses, Bitdefender Antivirus Plus, was causing some of the PDF files not to open. After troubleshooting the different modules and settings the culprit was..
    Scan SSL in Privacy Control Settings. Turning it OFF solved the problem and all the PDF files that previously would not open now open just fine. This issue has been sent to Bitdefender for them to review. If you use a different antivirus program and are having this issue try locating the Scan SSL setting and see if turning it off solves the problem.

  • I have purchased new iphone 3gs, its usb cable and charger not working.When I plugged in usb cable to my laptop it says"usb power hub exceeded". When I use another cable I have, it works fine.But the original one not working.Any help?

    I have purchased new iphone 3gs, its usb cable and charger not working.When I plugged in usb cable to my laptop it says"usb power hub exceeded". When I use another cable I have, it works fine.But the original one not working.Any help?

    Are you connecting your iPhone directly to your PC or to a USB hub?

Maybe you are looking for

  • Deleting Duplicates from a table

    Its a huge table with 52 fields and 30k rows. I need to delete the duplicates based on one of the fields. GROUP BY is taking a lot of time. Is there a quicker way to delete the duplicates using SQL. Thanks.

  • Adding a new layout for DME for file download

    Hi All, How do i add a new layout for file download in DME? Thanks William Wilstroth

  • External display problem after 10.8.3 upgrade

    After applying 10.8.3 Combo Updater, the external display would not wake up after the computer resume from sleep. Mac: MBP Retina 13" Late 2012 Display: Acer S230HL Connection: DisplayPort - DVI cable Please fix it Apple!

  • Signal strength fluctuation

    Hi all, We are installing a WLC-4402 with 1252 APs connected; they have been working ok; but we have a problem with a Lenovo x61's wireless laptop card; the signal strength of this client fluctuate (up and down) each few seconds (sometimes it gets di

  • Anyone else seeing problems with mouse interfering with awesome bar?

    I think I've found a bug that has crept in, I've only noticed it recently, perhaps only since 13 but maybe 11 or 12, not sure. I am a power user and use keyboard and awesomebar features heavily. This is a common sequence: 1. Ctrl L to focus in addres