Author Topic: How to recover Opera as K-menu item entry?  (Read 1149 times)

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2469
  • Any Bugs in site?
How to recover Opera as K-menu item entry?
« on: June 24, 2010, 09:04:10 PM »
I have been scanning the forum and in this thread
http://www.pclinuxos.com/forum/index.php/topic,75106.0.html
there is a graphical description on how to edit K-menu, thank you old-polack, this triggered my memory and after a bit of trial and error I discovered that a right click on the application launcer (bottom left corner, first icon) gets me to the menu editor.  Following my nose and your pictures I have now recovered my Opera application menu item in K-menu to a workable point.

One problem left, I can not find the Opera Icon picture anywhwere. I believe I went through all the pictures vis the option in K-menu editor. At present I have selected a random picture.

Thinking that by updating I would get the icon back as Opera was listed as an upgrade, but this made no difference. Knowing that I have a hidden directory for Opera I went searching  in this.:

drwx------ 15 gert gert  4096 2010-06-25 13:55 .opera/

This has stretched me knowledge to the end and I am calling for suggestions.

Where are the applications Icons normally extracted from?

I was assuming that when installing by synaptic somehow the magic would ensure that via K-menu editor the "popular" Icon for the application would show up? Where am I going wrong?   ???

Running PCLOS 2010 update minutes ago.
I have also checked the FireFox menu entry, where it seems to me that the icon is available, where expected.
The attached pic shows where I expected Opera Icon to be.   ;D

« Last Edit: June 24, 2010, 09:12:01 PM by wedgeling »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6266
Re: How to recover Opera as K-menu item entry?
« Reply #1 on: June 24, 2010, 10:20:51 PM »
look for it at the "other" section

Two areas i know kde go look for icons is at "/usr/share/icons" and at "/home/<user>/.local/share/icons"

If you cant find the icon you want, you can go online and look for it and download it to one of two folders and it should show up on the dialog you showed.

if it stil doesnt, click the "other" section and then "browse" and manually point to where you downloaded the icon

most icons appear to be in a png format.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: How to recover Opera as K-menu item entry?
« Reply #2 on: June 24, 2010, 10:48:22 PM »
wedgeling:

[root@littleboy ~]# locate opera-browser.png
/usr/share/icons/hicolor/128x128/apps/opera-browser.png
/usr/share/icons/hicolor/16x16/apps/opera-browser.png
/usr/share/icons/hicolor/22x22/apps/opera-browser.png
/usr/share/icons/hicolor/24x24/apps/opera-browser.png
/usr/share/icons/hicolor/32x32/apps/opera-browser.png
/usr/share/icons/hicolor/48x48/apps/opera-browser.png
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2469
  • Any Bugs in site?
Re: How to recover Opera as K-menu item entry?
« Reply #3 on: June 24, 2010, 11:43:13 PM »
muungwana
I forgot to spell out that I had looked in others
Thanks for giving me the directory locations, I shall investigate closer once more I did have a fool around using Dolphin, I thought I would actually be able to see the pictures using that.


old-polack
Ooooh locate not find however I am not in luck

Code: [Select]
[gert@localhost ~]$ locate opera-browser.png
[gert@localhost ~]$ su
Password:
[root@localhost gert]# locate opera-browser.png
[root@localhost gert]#

Looks pretty darned empty to me.  My thinking was that if I had deleted something by accident then a reload/update via Synaptic would have fixed it. I think perhaps I need to completely remove Opera vis Synaptic and then reload it again!  I am just so curious what is going on.  

[root@localhost hicolor]# ls
128x128/  192x192/  24x24/    32x32/  48x48/  72x72/  icon-theme.cache  scalable/
16x16/    22x22/    256x256/  36x36/  64x64/  96x96/  index.theme

[root@localhost icons]# ls opera.png
opera.png


[gert@localhost ~]$ locate opera.png
[gert@localhost ~]$ cd /
[gert@localhost /]$ locate opera.png
[gert@localhost /]$


Please, what is going on? locate does not find the opera.png (I manually plowed my way down directory structure). Also confirmed that the icon does exist here with Dolphin.
« Last Edit: June 25, 2010, 12:30:40 AM by wedgeling »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2469
  • Any Bugs in site?
Re: How to recover Opera as K-menu item entry?
« Reply #4 on: June 25, 2010, 12:51:24 AM »
muungwana
Now I understand what you meant by using others as I have just used it to navigate to the Opera Icon that is found

/usr/share/icons/opera.png

But there is no Firefox Icon here, however that can be found for example here:

/usr/share/icons/hicolor/32x32/apps/firefox.png

The content of this directory also seems to co incide with what the K-menu Editor will show if I go to Firefox menu item in internet section.

Of course there is no Opera Icon in here either. Not sure where I go from here. I don't think it is a simple matter of placing one icon in one spot, from some icon work I have done in Windows there were a number of sizes of pictures that was needed and I have checked that the Firefox Icon exist in another directory 48x48 as well as the 32x32.
« Last Edit: June 25, 2010, 12:56:28 AM by wedgeling »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6266
Re: How to recover Opera as K-menu item entry?
« Reply #5 on: June 25, 2010, 01:03:57 AM »

"locate" command search for files in a database and the search will come out empty if a file is added to  the system after the last locate database update.

it is best to always update the database before doing a search using locate with "updatedb" command. If you dont want to wait for the database to be updated, use "find" command.

Both have their tradeoffs, locate can speed up the search if the searched item is deep inside a heavily populated folder but it may come up empty if the database is old, find command will always work but may take a while to complete.

icon size do not matter, they will just appear distorted if you pick an icon whose size is too far from expected size.

i though you said you found where the opera icon is(/usr/share/icons/opera.png), cant you use this icon?

can you try to solve one thing at a time? bringing up firefox icons will complicate the issue.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2469
  • Any Bugs in site?
Re: How to recover Opera as K-menu item entry?
« Reply #6 on: June 25, 2010, 01:46:07 AM »
muungwana
Sorry to appear unclear in what I have written. When I found the Icon, I have no problem using this in K-menu by browsing to it via "others" as you suggested.

As Firefox still appeared in K-menu, I used this application to find out where I could find the Firefox K-menu item's Icon. The Firefox Icon does appear in the logical selection (applications section) offered when you try to set up a new K-menu item. I followed the icon in the directory structure and found that Firefox Icons, you could say in the correct path

My conclusion was that the single Opera Icon I found was not in the correct path, may perhaps be a lost item in the wrong place. I don't feel comfortabel with the situation as I might be perpetuating an error which might show up and bite me severely later on at a time when I have forgotten all about it. Better sort it out now.

I am going to completely remove Opera and re run the Opera installation and see what happens. The Opera I am using is the Qt 3 based by the way, I think that was recommended.
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2469
  • Any Bugs in site?
Re: How to recover Opera as K-menu item entry?
« Reply #7 on: June 25, 2010, 02:49:03 AM »
muungwana
Sorry I forgot to acknowledge your info on the locate/find, very much appreciated as I was struggling with the difference. Will try it some time.

Opera
I removed Opera qt3 completely and installed qt4 version at the same time.
K-menu item for Opera, this was not replaced or removed, the item was left with non opera icon. I expected either replacement or a new item added.
Opera Icon sent to Panel neither removed or changed (I expected this, as I assume this is a custom setup)
The lonely icon in /usr/share/icons/opera.png has been removed though, and not replaced by the qt4 version.

2nd attempt
This time I only removed Opera qt4 completely, found that the Opera k-menu item still in place.
Removed the panel Opera icon
K-menu item for opera I have left, but with non opera icon, I expect it will be replaced or another menu item to be added
Downloaded Opera qt 3 again
Icon opera.png goes into the /usr/share/icons/opera.png
No item installed in K-menu, well not under Internet section, but this did happen the very first time I tried. (none in panel either of course)

Can anybody tell me when installing Opera, if an Opera menu item shows up under the Internet section.   ???

« Last Edit: June 25, 2010, 02:51:58 AM by wedgeling »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline everge48

  • Sr. Member
  • ****
  • Posts: 383
Re: How to recover Opera as K-menu item entry?
« Reply #8 on: June 25, 2010, 03:43:19 AM »
From reading this thread I think it's because you edited the menu and added Opera manually so KMenu is still using the config file (without the Opera icon) that you created. Just reset KMenu.
First make sure this is an isolated problem by opening Konsole and typing:
Code: [Select]
kbuildsycoca4 --menutestIf you don't get any other error messages then resetting KMenu should do the trick.
Open 'KDE Menu Editor' as you did before by right clicking on the PC button and choosing 'Menu Editor'
Then in the 'KDE Menu Editor' window at the top click 'Edit' then click 'Restore to System Menu' from the drop down list.
Then logout and back in and hopefully all will be well with your KMenu.
« Last Edit: June 25, 2010, 08:06:25 AM by 4evergr8ful »
Any sufficiently advanced technology is indistinguishable from magic.

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2469
  • Any Bugs in site?
Re: How to recover Opera as K-menu item entry?
« Reply #9 on: June 25, 2010, 05:29:30 AM »
 ;D Now I am in deep water I only understand a fraction of what may be going on, I am doing some guessing. I think I know what your are suggesting but have no idea of ramifications. Anyway here are a few lines from the test that looks a bit suspicious. In a moment I will edit the thread and add the full test as an attachment for the diehard.

Code: [Select]
[gert@localhost ~]$ kbuildsycoca4 --menutest
kbuildsycoca4 running...
kbuildsycoca4(3539) KConfigGroup::readXdgListEntry: List entry MimeType in "/usr/share/applications/opera.desktop" is not compliant with XDG standard (missing trailing semicolon).                                                                              
kbuildsycoca4(3539) KConfigGroup::readXdgListEntry: List entry Categories in "/usr/share/applications/firefox.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(3539) parseLayoutNode: The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file.                                      

I have added the full test, got a bit on the big side but perhaps some gold corn hidden.

The first few lines seem to indicate that all is not well, is this something I have caused?

The trouble started when I was getting used to the desktop/folderview.

While having the default 2 desktops I had installed Opera and it seemed fine. I use 6 desktops so I increased the number of desktops to 6 and noticed that I had lost the "default column of Icon/widgets/plasmoids" (?) I was trying to add Opera Icon to show on desktop, nothing happened and I tried a few times before adding one successfully to the Panel. It is not quite as clear as written as I thought the nice Opera Icon was a Widget with drag handles but now I am no longer so sure.

Then I started finding out about the difference between "Desktop" and "Folder View".  when that became clearer at some stage I thought I would delete the Opera Icon on the desktop thinking that I could always get it back.  However I discovered the the Opera K-menu item had been removed. Ever since I have been in trouble. At this stage I was still very confused about the two different  options of desktop "layouts" 

Perhaps above explanation ought to be listed.
« Last Edit: June 25, 2010, 05:46:08 AM by wedgeling »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline everge48

  • Sr. Member
  • ****
  • Posts: 383
Re: How to recover Opera as K-menu item entry?
« Reply #10 on: June 25, 2010, 06:08:59 AM »
All the output in kbuildsycoca4 --menutest was perfectly normal except opera and firefox which are the two that you edited manually.
Continue to the second step of what I posted and you should get Opera back where it belongs in KMenu.
« Last Edit: June 25, 2010, 08:08:28 AM by 4evergr8ful »
Any sufficiently advanced technology is indistinguishable from magic.

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2469
  • Any Bugs in site?
Re: How to recover Opera as K-menu item entry?
« Reply #11 on: June 25, 2010, 06:23:42 AM »
Hold your horses  ;D

Regarding the error lines:
1.. I never edited the Firefox menu in any way I did follow the Firefox Icon trail in the directory structure. The missing semicolon is not missing in my opinion.
Code: [Select]
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;
2.. The Opera error, there is no MimeType in the file. ??? (Was tempted to stuff it with Firefox content and make changes to suit but this is not really the way, the Opera file is 4 lines shorter.)

3.. Error, oops I am lost for the moment, I assume the reset will fix that.

I was itching to hit the button as you suggested but because of the errors I decided to hold off but no longer, right into it.   ;D
Actually earlier today I was sniffing around exactly near these files and found those two would "run" the applications I even squinted in the files with the Dolphin Preview but I should have opened.
« Last Edit: June 25, 2010, 06:54:51 AM by wedgeling »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2469
  • Any Bugs in site?
Re: How to recover Opera as K-menu item entry?
« Reply #12 on: June 25, 2010, 06:48:33 AM »
I have reset the K-menu as you suggested, except I have not logged out and in again, we are talking linux so I thought do I need to, seems not.
K-menu has recovered and the two desktop folders below have changed massively

"/usr/share/applications/opera.desktop"
"/usr/share/applications/firefox.desktop"

Any idea what is going on? Unfortunately I have not looked in any other files but I am guessing that this re-set has changed a lot of files.
The system seems fine. The Opera Menu Item is now back in exactly the place where it very first appeared. I still don't understand why the Opera Icon is not in the same file as Firefox (see attached pic) the Opera Icon is hidden somewhere else, I guess same spot as where I found it before. To me it seems that Opera does not follow same install as Firefox. Though I will not worry too much about this now.

Can I throw another challenge: Opera will only open in the last desktop, dt-6 in this case.  Firefox will open up in the active desktop which I quite like as I can move to an empty desktop and just have look with Firefox.  This I found useful with Opera in KDE 3. Opera is my preferred browser across platforms

Where is it determined in which desktop an application opens

Thank you very much anyway   8) I am happy customer.

« Last Edit: June 25, 2010, 06:53:06 AM by wedgeling »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline everge48

  • Sr. Member
  • ****
  • Posts: 383
Re: How to recover Opera as K-menu item entry?
« Reply #13 on: June 25, 2010, 07:45:58 AM »
Next time you login to KDE open Opera through 'K-Menu Application Launcher' and see if it will open normally on any desktop.
Hope that helps, good luck.
Any sufficiently advanced technology is indistinguishable from magic.

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2469
  • Any Bugs in site?
Re: How to recover Opera as K-menu item entry?
« Reply #14 on: June 25, 2010, 07:58:08 AM »
4evergr8ful

I have logged out and in again, but Opera still insists upon opening in dt-6 even though I start with active dt-1. I have added Opera icon to panel and click on that when dt-1 is active and Opera opens in dt-6.

I had a "Desktop" where I accidentally copied an Icon-->>Opera Widget with some trepidation I have removed this again.  It seems without problems as the K-menu item is still there. I am still happy  ;D ;D where I am it is well past midnight and for a change I am closing down now.

Thank you.
« Last Edit: June 25, 2010, 05:59:46 PM by wedgeling »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen