Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

READ-ONLY-MODE: PLEASE DO NOT POST NEW STUFF!
  New Forum: http://forum.puppylinux.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 15 Aug 2020, 14:07
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Q:How restore icons/programs in notification area?(SOLVED)
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 3 of 3 [43 Posts]   Goto page: Previous 1, 2, 3
Author Message
B.K. Johnson

Joined: 12 Oct 2009
Posts: 810

PostPosted: Wed 21 Sep 2016, 10:42    Post subject:  

MochiMoppel wrote:
Quote:
Try to click on a .desktop file that you say opens in leafpad at startup.

Clicked on netmon_wce and network_tray. Icons for both appeared in the notification area and has remained.

Quote:
Also try to execute such .desktop file in a terminal:
Code:
xdg-open filename.desktop

I entered:
Code:
xdg-open freememapplet_tray.desktop

an empty leafpad opened at line 1
see screenshot xdgopen2leafpad

Quote:
I've seen (old) bug reports claiming that xdg-open opens the .desktop file in the default editor (is leafpad your default editor?) instead of executing it.

Looks like what's happening here. You're on to something MochiMoppel. How do I find what my default editor is on the system?

Quote:
Quote:
The only thing I can do to ease your discomfort is to reduce the text length.
That's always a good idea, but you don't need to reduce the text. Instead you should press ENTER after each line. And you have more than 3 lines, but please don't test the limits of the forum software. Have mercy with the readers.

I have edited the line already. You can see the original text in my previous post.

I'll deliberately include a long text in this post. Enter will be used where the software breaks for wrapping. Provide feedback.
xdgopen2leafpad.png
Description  xdg-open freememapplet_tray.desktop results in the opening of a leafpad
page. The partview icon does not show in the notification area.
png

 Download 
Filename  xdgopen2leafpad.png 
Filesize  12.03 KB 
Downloaded  178 Time(s) 

_________________
B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM

Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 13981
Location: S.C. USA

PostPosted: Wed 21 Sep 2016, 12:21    Post subject:  

Quote:
I don't have a link to autostart in the Startup directory like you do.

Well, try putting a link to /root/.config/autostart in the /root/startup and see what happens.

This may also work to get stuff corrected.
I wonder if you could get the Tahrpup 6.0.5. iso.
In your Tahrpup frugal install. Just replace all the Puppy files with the ones from this iso.
Use your old save file .
And let the save file get updated on first boot.

Probably will need to rerun the bootloader config to get the boot info using the correct file names.
Yours probably is still using the names from Tahrpup 6.0

_________________
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
YaPI(any iso installer)
Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 810

PostPosted: Wed 21 Sep 2016, 15:21    Post subject:  

Interesting piece of info.
This could be the bug report MochiMoppel mentioned.
https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/378783
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Wed 21 Sep 2016, 23:33    Post subject:  

B.K. Johnson wrote:
Code:
xdg-open freememapplet_tray.desktop

an empty leafpad opened at line 1
Not good
Quote:
[I'll deliberately include a long text in this post. Enter will be used where the software breaks for wrapping. Provide feedback.
Better.

Back to your main problem. As you know I don't use tahrpup and can only speculate. If tahrpup uses xdg-open to execute the .desktop files in /root/.config/autostart and if you had installed musher0's MRUF-lst pet then you now have a xdg-open that opens .desktop files with defaulttextviewer and not - as the original - with rox (which would be the equivalent of clicking on a .desktop file). Leaves the question why no one else has this problem. But you can easily check if this is really the cause. Open /usr/local/bin/xdg-open in a text editor and see if you find the line
Code:
        *.txt|*.sh|*.lst|*.desktop)defaulttextviewer "$1" ;; # m0

Remove "|*.desktop" so that the line looks like this:
Code:
        *.txt|*.sh|*.lst)defaulttextviewer "$1" ;; # m0


Then look for lines
Code:
        *)if [ "`file -bp --mime-type $1 | grep -o text`" ];then  # m0
         defaulttextviewer "$1" # We play it safe!

Change the second line to gxmessage "$1" # We play it safe!
Save the script and restart X. If you see gxmessage dialogs instead of leafpad windows you know what causes the tray icons problems.
Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 810

PostPosted: Thu 22 Sep 2016, 18:15    Post subject:  

@MochiMoppell
I have been on to xdg-open being a source of the problem for a while. I figured from the code that any <applet>.desktop call would be opened in a textviewer (leafpad if that is my default). As I could not uninstall MRUF_lst I wanted a way to clear my system of everything related, so that is why I asked musher0 about the statement at the bottom of the xdg-open file which would reverse the changes he had made to the file.

I had begun to lose confidence in musher0 and certainly did not like his attitude. I tried the gxmessage that you suggested but that did not work. I thought that it would be safer to use the jemimah written xdg-open that he referred to, so I started looking in my archived pupsaves. Most likely it should be in either saluki or carolina but it wasn't there. I finally found it in an earlier tahr-602 backup which also has an early version of MRUF-lst. By co-incidence only. So xdg-open was introduced into my system by the developer 666philb and modified by MRUF-lst.

Here is what I found.

Code:

#!/bin/sh
#this script created by Jemimah. see: http://murga-linux.com/puppy/viewtopic.php?t=63400&start=150
#110115 xdg-open used to be a symlink to defaulthandler.

#!/bin/bash
case "$1" in
        '') exit
                ;;
        *://*) exec rox -U "$1"
                ;;
        *@*.*) exec rox -U "mailto:${1}"
                ;;
        *) exec rox "$1"
                ;;
esac

After backing up and copying the above into xdg-open, I restarted the X graphic server from Menu >Exit >Restart graphical server, all my icons were restored. Very Happy Very Happy Very Happy This is strange in light of the error you noted in your discussion with drunkjedi. So, I did a quick and dirty edit of my copy, keeping only the bash,
Code:
#!/bin/bash
#this script created by Jemimah. see: http://murga-linux.com/puppy/viewtopic.php?t=63400&start=150
#110115 xdg-open used to be a symlink to defaulthandler.

#!#/#bin/bash
case "$1" in
        '') exit
                ;;
        *://*) exec rox -U "$1"
                ;;
        *@*.*) exec rox -U "mailto:${1}"
                ;;
        *) exec rox "$1"
                ;;
esac

Then I Menu >Exit >Restart graphical server; the icons were still OK, and they still persist despite reboots. Very Happy

I have got my icons restored but there is stll much to analyse and explore before we mark this one as closed. All right Flash. Smile

[EDIT]
Mochi, This was written before your other changes to xdg-open. I did not test them. And now that my icons are restored, I don't know how feasible it will be. We'll see.

_________________
B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM

Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Thu 22 Sep 2016, 23:27    Post subject:  

B.K. Johnson wrote:
I thought that it would be safer to use the jemimah written xdg-open that he referred to, so I started looking in my archived pupsaves. Most likely it should be in either saluki or carolina but it wasn't there. I finally found it in an earlier tahr-602 backup
Why didn't you look into /initrd/pup_ro2?
Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 810

PostPosted: Fri 23 Sep 2016, 00:06    Post subject:  

MochiNoppel asked:
Quote:
Why didn't you look into /initrd/pup_ro2?

That's where musher0 said it would be but I could open several pupsaves from my system whereas I would have to reboot into another system to look at the target initrd/pup_ro2 without any risk of further corruption. Furthermore, I wanted to see if xdg-open was used in other puppies.

_________________
B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM

Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Fri 23 Sep 2016, 11:16    Post subject:  

FWIW:
Code:
#!/bin/sh
# /root/my-applications/bin/solve-autostart.sh
#
# Goal: Solve the problem of *.desktop files in /root/.config/autostart
# loading as text in the text viewer under jwm.
#
# This script puts the name of the executables in those *.desktop files
# in an autostart.sh bash script in /root/Startup so they can be
# activated normally at the next launch of jwm.
#
# IMPORTANT:
# Restart your jwm normally after running this script. By that I mean
# either issue the command < restartwm > (without the chevrons) from
# a regular terminal OR issue the usual < xstart jwm > command from
# the initial black console (the one before X starts).
#
# WARNING
# Use -- at your own risk -- only if you have the problem of the
# *.desktop files in /root/.config/autostart loading as text in
# the text viewer.
#
# This solution has been tested as working ONLY with the jwm WM.
# Other WM's may not need it. For ex., I know for a fact that the wmx
# WM doesn't need this solution since it doesn't have the problem.
#
# At your option, if you change WM's from jwm to something else, you
# may manually move the *.desktop files back to their original
# /root/.config/autostart location after using this script -- and erase
# script /root/Startup/autostart.sh or make it non-executable.
#
# Or not; from the Puppy OS point of view, it does not matter where
# those executables get loaded from, as long as they get loaded.
#
# (c) musher0, Friday Sept. 23 2016. GPL3.
####
cd /root/.config/autostart
if [ "`cat /etc/windowmanager`" = "jwm" ];then
   if [ "`ls -1 *.desktop 2>/dev/null`" != "" ];then
      AutO="/root/Startup/autostart.sh"
      CrunchBang="#!/bin/sh"

      echo "${CrunchBang}" | awk '{ print $1 }' > $AutO
      echo -e "# $AutO\n####" >> $AutO
      awk -F= '$1 ~ /Exec/ { print $2" &" }' *.desktop >> $AutO
      echo -e "wait\n### End ###" >> $AutO

      chmod +x $AutO

      mkdir -p /root/.config/autostart-NO
      mv *.desktop /root/.config/autostart-NO
   else
      echo -e "\n\n  There are no *.desktop files in this \"$PWD\" directory.\n\n"
   fi
fi
### End ###

Feel free to use or not -- if you still have the problem after reverting
to the pristine xdg-open and defaulthandler files.


To use, copy the code above in your text editor, save as file
< solve-autostart.sh > (without the chevrons) in directory
~/my-applications/bin, make executable and run once from a terminal.

If by error it is run again, nothing will happen, except a message will
tell the user that there are no *.desktop files in that directory.

Also this script will do nothing if jwm is not the WM.

IHTH.

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 810

PostPosted: Sun 25 Sep 2016, 00:15    Post subject:  

I incorrectly posted to the wrong thread.
Please read this

_________________
B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM

Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 810

PostPosted: Sun 25 Sep 2016, 00:48    Post subject:  

Name is withheld to avoid banisment for alleged badgering. Laughing
Quote:
badger: to ask (someone) repeatedly and annoyingly for something; pester.

The ginias whose script is perfect writes this in his modified xdg-open here and does not expect *.desktop files to appear in the default textviewer?
Code:
*.txt|*.sh|*.lst|*.desktop)defaulttextviewer "$1" ;; # m0

If he excluded the *.desktop and allowed the <applet>.desktop processing to be done by rox with the addition of,
Code:
*.desktop)rox "$1" ;;

the applet would have been correctly launched.

As said before, I have restored the default xdg-open and eliminated one of the shebangs in my system.
Entering at the terminal:
Code:
rox  /us/share/applications/evince.desktop

launches evince. Very Happy
Entering
Code:
xdg-open  /us/share/applicationsevince.desktop
launches evince. Very Happy Very Happy

I renamed the xdg-open that I purged from my system, xdg-open-bak, made it executable and entered at the terminal:
Code:
xdg-open-bak /usr/share/applications/evince.desktop

leafpad opened with the contents of evince.desktop. Crying or Very sad
I removed *.desktop from the line that called defaulttextviewer and added a new line so these are the two consecutive lines.
Code:
        *.txt|*.sh|*.lst)defaulttextviewer "$1" ;; # m0
        *.desktop)rox  "$1" ;; #bkj
 

Entered at the terminal:
Code:
xdg-open-bak /usr/share/applications/evince.desktop
An evince PDF Viewer page opened. Very Happy Very Happy

As the bandit in Sierra Madre would say: solve-autostart.sh, we don't need no stinking solve-autostart.sh.
Every coder makes mistakes. What is deeply offensive is those that refuse to acknowledge and insist that they are infallable even faced with the evidence.

I have no intention of re-installing MRUF_lst, so if anyone feels so inclined, he can repeat my experiments and confirm/deny the results.

_________________
B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM

Back to top
View user's profile Send private message 
Sailor Enceladus

Joined: 22 Feb 2016
Posts: 1566

PostPosted: Sun 25 Sep 2016, 10:13    Post subject:  

Just wondering B.K., did you find the reason why your icons disappeared? Or is it still up in the air and possibly one of these?

Semme wrote:
As for the issue you've posted about, sure.. FS corruption, program used to format, flash drive quality, or lack thereof, wonky electrical connections.. Could be attributed to just about anything. Running my everyday system off a stick doesn't exactly shout reliability.
Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 810

PostPosted: Sun 25 Sep 2016, 18:34    Post subject:  

Sailor Enceladus asked:
Quote:
Just wondering B.K., did you find the reason why your icons disappeared? Or is it still up in the air and possibly one of these?

All of Semme's suggestions were possible culprits, but the reason was bad code in the program, MRUF_lst, that I had installed. I could not point a finger to that software at the time of my initial post, but when it happened again with a brand new tahr-6.0.5, and the icons restored following uninstalling, then I knew. It took some detective work with the help of MochiMoppel to identify the problem and for the reluctant author to acknowledge the error.

Perhaps I should summarize what anyone who encounters the problem needs to do. Hopefully, the author of MRUF_lst will make the changes in the latest versions to avoid a re-occurrence.

_________________
B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM

Back to top
View user's profile Send private message 
april

Joined: 14 Sep 2013
Posts: 1241
Location: Green Island baby!

PostPosted: Sun 25 Sep 2016, 19:36    Post subject:  

Poor old Semme ,Getting a roasting lately . Nice helpful fellow normally Can't understand it's.
Back to top
View user's profile Send private message Yahoo Messenger 
Display posts from previous:   Sort by:   
Page 3 of 3 [43 Posts]   Goto page: Previous 1, 2, 3
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1043s ][ Queries: 13 (0.0387s) ][ GZIP on ]