Glipper in "Precise Light 5.7.2" does not start automatically

Post here if you feel others can duplicate your so discovered "bug"

Moderator: Forum moderators

Post Reply
m-cuda
Posts: 62
Joined: Sun Jul 26, 2020 4:52 am
Location: USA
Has thanked: 41 times
Been thanked: 4 times
Contact:

Glipper in "Precise Light 5.7.2" does not start automatically

Post by m-cuda »

The glipper dialog says:

If you click the 'Enable Glipper' button, then Glipper will appear in
the takbar, and will also start automatically in the future.

Clicking the 'Enable Glipper' button does start glipper but glipper does not start automatically on reboot. The glipper dialog is from the script "/usr/local/bin/glipper_shell":

Code: Select all

#!/bin/sh
#Barry Kauler 2007

Xdialog --center --title "Glipper clipboard manager" --ok-label "Enable Glipper" --cancel-label "Disable Glipper" --yesno "Glipper is a great little taskbar applet for managing the clipboard.

If you click the 'Enable Glipper' button, then Glipper will appear in
the takbar, and will also start automatically in the future.
If you click the 'Disable Glipper' button, then if Glipper is runnng
it will be terminated now and will not be started in the future." 0 0

RETVAL=$?

if [ $RETVAL -eq 0 ];then
 touch /root/.glipper_on
 PSRUN="`ps`"
 [ "`echo "$PSRUN" | grep -v 'glipper_shell' | grep 'glipper'`" = "" ] && glipper &
 exit
fi

if [ $RETVAL -eq 1 ];then
 rm -f /root/.glipper_on
 killall glipper
 exit
fi

The file "/root/.glipper_on" is created.

Code: Select all

# ls -l /root/.glipper_on 
-rw-r--r-- 1 root root 0 Nov 19 07:36 /root/.glipper_on

I think the problem is the startup script that checks for this file does not exists. I searched the file .xinitrc, the files in Startup and .config/autostart:

Code: Select all

# egrep glipper .xinitrc Startup/* .config/autostart/*
.xinitrc:#130212 removed glipper code, see latest glipper pet.

The only reference to glipper is "removed glipper code" in ".xinitrc". As a workaround I created the file "/root/.config/autostart/glipper.desktop":

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Type=Application
NoDisplay=true
Name=glipper
Exec=glipper		
User avatar
PipzDex
Posts: 189
Joined: Sun Jul 12, 2020 11:16 pm
Location: Mexico
Has thanked: 61 times
Been thanked: 81 times

Re: Glipper in "Precise Light 5.7.2" does not start automatically

Post by PipzDex »

Hi @m-cuda

wanna try this pet??
Is the glipper from original precise
check it, maybe you can use it as a base to update to a new version

Cheers!! :thumbup2:

Attachments
glipper-130212.pet
(13.08 KiB) Downloaded 30 times

Pentium (R) 2.20GHz I RAM: 8.0 GB I F96-CE_5 I Kernel 6.6.8-64oz-ao I Glibc: 2.31 I 1600x900 Px

My Puppy Stuff and more

m-cuda
Posts: 62
Joined: Sun Jul 26, 2020 4:52 am
Location: USA
Has thanked: 41 times
Been thanked: 4 times
Contact:

Re: Glipper in "Precise Light 5.7.2" does not start automatically

Post by m-cuda »

@PipzDex Thank-you for your help. Although I did not install your attached .pet file as my workaround works well enough for me. I did analyze it to try and find out what "Precise Light 5.7.2" might be doing wrong. I diffed the glipper_shell scripts of "Precise Light 5.7.2" and your "glipper-130212.pet".

Code: Select all

# diff `which glipper_shell` glipper-130212.pet.extracted/glipper-130212/
...
14c19,20
<  touch /root/.glipper_on
---
>  #touch /root/.glipper_on
>  ln -snf ../../usr/local/bin/glipper /root/Startup/glipper_tray
...

As you can see the glipper_shell of "glipper-130212.pet" creates a symbolic link to glipper as "/root/Startup/glipper_tray" which the glipper_shell of "Precise Light 5.7.2" does not. This is a more concise solution than creating a ".desktop" file in ".config/autostart" but since "/root/Startup/" is now deprecated I surmise that the maker of "Precise Light 5.7.2" may have decided to not use "/root/Startup/" and probably forgot to make the ".desktop" file in ".config/autostart".

ADDENDUM
After seeing this working glipper_shell script I realized that we can do much better than my original workaround. Here is my new glipper_shell script:

Code: Select all

#!/bin/sh
#Barry Kauler 2007

Xdialog --center --title "Glipper clipboard manager" --ok-label "Enable Glipper" --cancel-label "Disable Glipper" --yesno "Glipper is a great little taskbar applet for managing the clipboard.

If you click the 'Enable Glipper' button, then Glipper will appear in
the takbar, and will also start automatically in the future.
If you click the 'Disable Glipper' button, then if Glipper is runnng
it will be terminated now and will not be started in the future." 0 0

RETVAL=$?

if [ $RETVAL -eq 0 ];then
 cat > /root/.config/autostart/glipper_tray.desktop <<'EOD'
[Desktop Entry]
Encoding=UTF-8
Type=Application
NoDisplay=true
Name=glipper
Exec=glipper
EOD
 PSRUN="`ps`"
 [ "`echo "$PSRUN" | grep -v 'glipper_shell' | grep 'glipper'`" = "" ] && glipper &
 exit
fi

if [ $RETVAL -eq 1 ];then
 rm -f /root/.config/autostart/glipper_tray.desktop
 killall glipper
 exit
fi

This script creates or removes the "glipper_tray.desktop" file as appropriate to the button clicked.

User avatar
PipzDex
Posts: 189
Joined: Sun Jul 12, 2020 11:16 pm
Location: Mexico
Has thanked: 61 times
Been thanked: 81 times

Re: Glipper in "Precise Light 5.7.2" does not start automatically

Post by PipzDex »

m-cuda wrote: Wed Nov 25, 2020 6:02 am

@PipzDex Thank-you for your help. Although I did not install your attached .pet file as my workaround works well enough for me. I did analyze it to try and find out what "Precise Light 5.7.2" might be doing wrong. I diffed the glipper_shell scripts of "Precise Light 5.7.2" and your "glipper-130212.pet".

Code: Select all

# diff `which glipper_shell` glipper-130212.pet.extracted/glipper-130212/
...
14c19,20
<  touch /root/.glipper_on
---
>  #touch /root/.glipper_on
>  ln -snf ../../usr/local/bin/glipper /root/Startup/glipper_tray
...

As you can see the glipper_shell of "glipper-130212.pet" creates a symbolic link to glipper as "/root/Startup/glipper_tray" which the glipper_shell of "Precise Light 5.7.2" does not. This is a more concise solution than creating a ".desktop" file in ".config/autostart" but since "/root/Startup/" is now deprecated I surmise that the maker of "Precise Light 5.7.2" may have decided to not use "/root/Startup/" and probably forgot to make the ".desktop" file in ".config/autostart".

ADDENDUM
After seeing this working glipper_shell script I realized that we can do much better than my original workaround. Here is my new glipper_shell script:

Code: Select all

#!/bin/sh
#Barry Kauler 2007

Xdialog --center --title "Glipper clipboard manager" --ok-label "Enable Glipper" --cancel-label "Disable Glipper" --yesno "Glipper is a great little taskbar applet for managing the clipboard.

If you click the 'Enable Glipper' button, then Glipper will appear in
the takbar, and will also start automatically in the future.
If you click the 'Disable Glipper' button, then if Glipper is runnng
it will be terminated now and will not be started in the future." 0 0

RETVAL=$?

if [ $RETVAL -eq 0 ];then
 cat > /root/.config/autostart/glipper_tray.desktop <<'EOD'
[Desktop Entry]
Encoding=UTF-8
Type=Application
NoDisplay=true
Name=glipper
Exec=glipper
EOD
 PSRUN="`ps`"
 [ "`echo "$PSRUN" | grep -v 'glipper_shell' | grep 'glipper'`" = "" ] && glipper &
 exit
fi

if [ $RETVAL -eq 1 ];then
 rm -f /root/.config/autostart/glipper_tray.desktop
 killall glipper
 exit
fi

This script creates or removes the "glipper_tray.desktop" file as appropriate to the button clicked.

Hi @m-cuda

That is precisely my idea, it is not precisely to use my pet but to know what the difference is between both pets and to find the best solution for the problem that arose, in my particular case, almost most of the pets that I have had the fortune of making it work in my version of precise has been done in this way, using several pets and making one fully functional for my problem and thus being able to share one more solution option to any other puppy user ...
Thank you for your time, your effort and for sharing your experience.

If we can help you with anything else, count on me

Cheers!! :thumbup2:

Pentium (R) 2.20GHz I RAM: 8.0 GB I F96-CE_5 I Kernel 6.6.8-64oz-ao I Glibc: 2.31 I 1600x900 Px

My Puppy Stuff and more

Post Reply

Return to “Bug Reports”