Choose style:

Author Topic: Problem with Docky [SOLVED]  (Read 5480 times)

0 Members and 1 Guest are viewing this topic.

Offline sandstormzach

  • Newly Subscribed
  • *
  • Posts: 22
  • Karma: 2
  • Linux Noob
    • View Profile
Problem with Docky [SOLVED]
« on: June 26, 2014, 01:26:45 pm »
Alright, this is something that's been bugging me for months now and I'm wondering if you guys have a solution.

I like Docky quite a bit because it's a nice, simple dock application and it has a transparent theme so there aren't any dumb decorations, just the icons. However, whenever I suspend my laptop (such as by closing the lid) and then wake it up again, Docky disappears. This happens on every OS I've used, and I do not have this problem with Cairo-Dock or with Plank. Does anyone know how to fix this?
« Last Edit: June 28, 2014, 11:16:32 am by sandstormzach »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26466
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline sandstormzach

  • Newly Subscribed
  • *
  • Posts: 22
  • Karma: 2
  • Linux Noob
    • View Profile
Re: Problem with Docky
« Reply #2 on: June 27, 2014, 08:13:20 pm »
Thanks for the reply and for the link, I appreciate it. However, that just raises more questions. How do I create a file and give it root access? And, once that is done, how do I make it executable?

Offline kendall

  • Administrator
  • Member
  • *****
  • Posts: 656
  • Karma: 129
  • Co-Founder
    • View Profile
Re: Problem with Docky
« Reply #3 on: June 28, 2014, 12:45:27 am »
Thanks for the reply and for the link, I appreciate it. However, that just raises more questions. How do I create a file and give it root access? And, once that is done, how do I make it executable?

Creating a file is quite simple actually. Either "touch" a file or opt to open a nonexistent file with a text editor and save it and it will then exist. For example:

Code: [Select]
touch file

will create a file called "file" in the current directory.

Code: [Select]
nano file

will create a file called "file" in the current directory as long as you opt to save it before you're done.

And then there is the option of root access. To enable root access you simply assign root privileges before you create the file:

Code: [Select]
sudo touch file

Code: [Select]
sudo nano file

Additionally adding executable privileges is a simple matter of assigning one flag. How you go about doing so depends on whether or not it's a "root" privileged file or not:

Code: [Select]
chmod +x file

Code: [Select]
sudo chmod +x file
Peppermint is powered by VPS.NET Cloud Servers.

Offline sandstormzach

  • Newly Subscribed
  • *
  • Posts: 22
  • Karma: 2
  • Linux Noob
    • View Profile
Re: Problem with Docky
« Reply #4 on: June 28, 2014, 01:01:55 am »
Alright then. For the moment I'm just going to use Plank, which is a quicker solution and much less likely to result in me accidentally breaking something. I really do appreciate the help though.  :)

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4893
  • Karma: 1053
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 10 (64-bit)
Re: Problem with Docky
« Reply #5 on: June 28, 2014, 01:05:25 am »
Hi sandstormzach, how's it going? Reference to link: http://forum.pinguyos.com/Thread-How-to-get-docky-to-work-on-14-04-after-suspend-and-laptop-unplug.  Your question is an important one as these are some of the core functions of Linux; very cool  8).  You are going to make two empty files, fill them with instructions and then make them executable. 

First make the file.  Open a terminal window by pressing Ctrl+Alt+t.  When the window opens, copy and past the following command into the window:
Code: [Select]
gksudo gedit /etc/pm/sleep.d/20_docky
Hit enter.  You will be asked to enter your user password, (this is the one you created on installation), hit enter.  Don't worry about the warnings. The text editor, gedit will open the  empty file, /etc/pm/sleep.d/20_docky.  The part I've highlighted in red is the file name.  The rest is the path to the file.  Copy and paste the following into the empty file window.  Hint: below this section you will see "Code: [Select]".  Click on the Select and the contents will become expanded.  You can highlight the text and copy it with right clicking and selecting, "Copy".  When you click with the mouse wheel in the terminal window , the highlighted contents will be pasted in.
Spoiler (click here to view / hide)
#!/bin/sh
case $1 in
  resume)
    USER=`who | grep ":0" | head -1 | cut -d" " -f1`
    USERHOME=/home/$USER
    export XAUTHORITY="$USERHOME/.Xauthority"
    export DISPLAY=":0"
    su $USER - -c "dbus-launch /usr/bin/docky >/dev/null" &
    exit 0;
    ;;
esac
[close]
Save this by pressing the keys Ctrl+s or select Save from the drop down file menu.  Now hit Ctrl+q or Close from the same drop down menu to close the file.

Second, make it executable.  Open a terminal window, Ctrl+Alt+t and enter the following code:
Code: [Select]
sudo chmod 755 /etc/pm/sleep.d/20_docky
Hit enter and do the password thing if asked.  As Kendal says, you could substitute +x for 755.  I'm using it because it is used in the tutorial.  Repeat the whole process for, /etc/pm/power.d/20_docky only insert the following into the empty file.
Spoiler (click here to view / hide)
#!/bin/sh
USER=`who | grep ":0" | head -1 | cut -d" " -f1`
USERHOME=/home/$USER
export XAUTHORITY="$USERHOME/.Xauthority"
export DISPLAY=":0"
su $USER - -c "dbus-launch /usr/bin/docky >/dev/null" &
exit 0;
[close]
Make that executable with the following command:
Code: [Select]
sudo chmod 755 /etc/pm/power.d/20_docky
That's it.  You should be good to go.  I hope this helps, have fun  ;)!
« Last Edit: October 11, 2014, 03:20:52 am by AndyInMokum »
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline sandstormzach

  • Newly Subscribed
  • *
  • Posts: 22
  • Karma: 2
  • Linux Noob
    • View Profile
Re: Problem with Docky
« Reply #6 on: June 28, 2014, 01:13:20 am »
Okay, got it. That's quite a bit more clear, I appreciate it.

Do I have to close the windows before I do the chmod part, or is that optional?

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4893
  • Karma: 1053
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 10 (64-bit)
Re: Problem with Docky
« Reply #7 on: June 28, 2014, 01:19:20 am »
Okay, got it. That's quite a bit more clear, I appreciate it.

Do I have to close the windows before I do the chmod part, or is that optional?

It is optional, out of habit I always close them.  Glad you understand it  ;)!
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline sandstormzach

  • Newly Subscribed
  • *
  • Posts: 22
  • Karma: 2
  • Linux Noob
    • View Profile
Re: Problem with Docky
« Reply #8 on: June 28, 2014, 01:23:45 am »
Okay, just checking.

I've created both the files and made them executable. I think I screwed something up with the second file, since Docky still vanishes if I unplug the power cord, but just having it stay there after suspending is a big improvement.

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4893
  • Karma: 1053
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 10 (64-bit)
Re: Problem with Docky
« Reply #9 on: June 28, 2014, 01:30:15 am »
Okay, just checking.

I've created both the files and made them executable. I think I screwed something up with the second file, since Docky still vanishes if I unplug the power cord, but just having it stay there after suspending is a big improvement.
Have you tried logging out and back in or rebooting?
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline sandstormzach

  • Newly Subscribed
  • *
  • Posts: 22
  • Karma: 2
  • Linux Noob
    • View Profile
Re: Problem with Docky
« Reply #10 on: June 28, 2014, 01:44:07 am »
Checking that right now, actually.

One last thing- do you know if those commands work the same way in Arch-based distributions?

Offline kendall

  • Administrator
  • Member
  • *****
  • Posts: 656
  • Karma: 129
  • Co-Founder
    • View Profile
Re: Problem with Docky
« Reply #11 on: June 28, 2014, 02:03:34 am »
One last thing- do you know if those commands work the same way in Arch-based distributions?

POSIX-compliant operating systems are all compatible with each other regardless of who put together which command. GNU/Linux is POSIX compliant so anything you use based on GNU/Linux "should" be POSIX compliant.
Peppermint is powered by VPS.NET Cloud Servers.

Offline Mynaardt

  • Member
  • ***
  • Posts: 160
  • Karma: 18
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Problem with Docky [SOLVED]
« Reply #12 on: April 01, 2015, 01:37:30 pm »
Glad I found this topic!  I was having the same problem with Docky terminating whenever I plugged in or unplugged the power from a laptop or netbook install of Peppermint.

The solution works fine.  I noticed there's a slight delay.  Whenever I plug in or unplug the AC adaptor, Docky disappears for a few seconds and then comes back.  But it does come back on a few seconds later.

Still and improvement over having to restart Docky through the menu, etcetera.
 8)
~*~  Mynaardt  ~*~
(Victoria, BC, Canada)
Peppermint OS is your computer's friend,
Always Trust Peppermint OS!