I found a workaround.

I created two scripts (one of them I found it on this website, but now I
lost the link).

Let's called the first script: "discover_session_bus_address.sh"

#!/bin/bash

# Remember to run this script using the command "source ./filename.sh"

# Search these processes for the session variable 
# (they are run as the current user and have the DBUS session variable set)
compatiblePrograms=( nautilus kdeinit kded4 pulseaudio trackerd )

# Attempt to get a program pid
for index in ${compatiblePrograms[@]}; do
   PID=$(pidof -s ${index})
    if [[ "${PID}" != "" ]]; then
        break
    fi
done
if [[ "${PID}" == "" ]]; then
    echo "Could not detect active login session"
    return 1
fi

QUERY_ENVIRON="$(tr '\0' '\n' < /proc/${PID}/environ | grep 
"DBUS_SESSION_BUS_ADDRESS" | cut -d "=" -f 2-)"
if [[ "${QUERY_ENVIRON}" != "" ]]; then
    export DBUS_SESSION_BUS_ADDRESS="${QUERY_ENVIRON}"
    echo "Connected to session:"
    echo "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}"
else
    echo "Could not find dbus session ID in user environment."
    return 1
fi

return 0
Save it an then, in the same folder, create another script called 
"recover_unity.sh".

Code:

#!/bin/bash

export DISPLAY=:0
source ./discover_session_bus_address.sh unity
unity &
save it and give both script execution permissions: chmod +x 
discover_session_bus_address.sh chmod +x recover_unity.sh

Now, every time unity freezes, use CTRL+ALT+F1, login and, within the
folder where those scripts were saved, type

source recover_unity.sh

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1426751

Title:
  Ubuntu-desktop not working when suspend/resume or connecting an
  external monitor -after upgrade this week (14.04)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-meta/+bug/1426751/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to