Author Topic: Openbox - edit desktop config files  (Read 2413 times)

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Openbox - edit desktop config files
« on: January 08, 2011, 01:09:20 AM »
After a lot of indecision I finally bit the bullet and replaced my aging pclinuxos kde3 with the openbox version.  Got to love the random right click!  I don't use any task bars and prefer Thunar as WM.  My query is this - I installed Earth3D by manually placing it in opt, placed a "link to executable" in /usr/bin, then raised a "desktop configuration file" in /usr/share/applications.  However for love nor money I can't get a link in the main menu.  It works through terminal, and also if I put the link into menu.xml.  I have tried all sorts of category ideas, but no success.  For eg, Screenie just says "Graphics", and there it is.  Didn't work with mine.  Any suggestions greatly appreciated.       
Linux Registered User # 529407


Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Openbox - edit desktop config files
« Reply #1 on: January 08, 2011, 06:26:59 AM »
My query is this - I installed Earth3D by manually placing it in opt, placed a "link to executable" in /usr/bin


Hi,
I prefer hand installed application placed in /usr/local/bin. This way, no need for a symlink elsewhere, as /usr/local is in the $PATH of the executables.

Quote
then raised a "desktop configuration file" in /usr/share/applications.  However for love nor money I can't get a link in the main menu.  It works through terminal, and also if I put the link into menu.xml.  I have tried all sorts of category ideas, but no success.  For eg, Screenie just says "Graphics", and there it is.  Didn't work with mine.  Any suggestions greatly appreciated.


I think I can help you, if you give me a few more informations. First, I would like to know which one of theses archives you have used, so that I can also try this program ! ^^
http://www.earth3d.org/downloads.html

It might be interesting to discover, and ask for a package ? And I will see by myself what it the method that works best and faster to create the desktop file that works in the right-click menu.

Then, I would like you to copy here entirely the desktop file you have created, and also provide the name you have used for it. With this, I will install, do the tests and bring you back what will find.

I'll be looking forward to your informations.

PS: bye the way, if you go to package suggest and ask for a package we might have it packaged for all.
PS2: and if a packager needs a patch for gcc, there is one here that could be useful: http://aur.archlinux.org/packages.php?ID=22501

PS3 : I found a desktop file in the sources:

$ cat earth3d.desktop
Quote
[Desktop Entry]
Type=Application
Version=1.0
Name=Earth3D
Comment=A 3D model of the planet
TryExec=/usr/bin/earth3d
Exec=earth3d
Icon=earth_rotate_icon
Categories=Network;


« Last Edit: January 08, 2011, 06:44:29 AM by melodie »
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Openbox - edit desktop config files
« Reply #2 on: January 08, 2011, 07:41:29 AM »
Hi,

The desktop file that works for me:
Quote
[Desktop Entry]
Encoding=UTF-8
Name=Earth3D
Comment=A 3D model of the planet
Exec=/usr/local/bin/earth3d
Terminal=false
Type=Application
Icon=earth_rotate_icon
Categories=Network;X-MandrivaLinux-Internet-WebBrowsers;


I could not compile the program, so I put the binary "earth3d" in /usr/local/bin. I have used this package : earth3d-1.0.5-withoutQT.tar.bz2

What do you use Earth3d for ? I have tried GoogleEarth, and find it very attractive, whereas I don't really know what use Earth3d I could have.


melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: Openbox - edit desktop config files
« Reply #3 on: January 08, 2011, 07:56:41 AM »
Hi, thanks for the response.  I downloaded http://prdownloads.sourceforge.net/earth3d/earth3d_client-1.0.5-src.tar.bz2?download from the earth3d link you listed.  I have now placed the earth3d executable directly into /usr/bin and put the support folder into my home folder.
Below is my desktop config file in /usr/share/bin 
Quote
[Desktop Entry]
Encoding=UTF-8
Name=Earth3D
Icon=/usr/share/icons/education_geography_section.png
Comment=View the world
TryExec=/usr/bin/earth3d
Exec=earth3d
Terminal=false
Type=Application
Categories=Network;
X-Desktop-File-Install-Version=0.11

I took bits from the one you found.  But still the same result - terminal and menu.xml work, but nothing in the main menu.  Curious.
     
Linux Registered User # 529407


Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: Openbox - edit desktop config files
« Reply #4 on: January 08, 2011, 08:37:16 AM »
Hi  melodie, our posts must have crossed each other.  We're out of sync!  The upshot is that I tried your pkg and desktop file and used /usr/local/bin  - the only thing I changed was the icon.  Same result as before.  I am running Thunar as WM - could this change the way things work?

I had only downloaded Earth3d out of curiosity.  I had been playing around with your Edu_RC2 and was looking around at other software that might be suitable.  It now seems to have become an exercise in system conundrums!  By the way, well done on PCLinuxOS Openbox - now my OS of choice.     
Linux Registered User # 529407


Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Openbox - edit desktop config files
« Reply #5 on: January 08, 2011, 09:35:04 AM »
Hi,

I do not know what you call main menu. When I do as I told you, I get an entry menu in the right click at "Applications > Internet > Earth3d".

Is that ok for you, or do you want earth3d directly under "right-click" ? Maybe would you also want a key-shortcut (I mean several keyboard keys pressed together) ?

Bye the way, is it the PCLinuxOS Openbox version you have installed, or is it openbox from the openbox package, or even task-openbox ?

PS: the file manager is not involved. You can choose anyone you want.
PS2 : you will not see icons in the openbox right-click menus anyhow.



melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Openbox - edit desktop config files
« Reply #6 on: January 08, 2011, 09:38:10 AM »
PS 3 : your desktop file is not ok. Take mine, and replace just the icon name (without the full path).

Code: [Select]
[Desktop Entry]
Encoding=UTF-8
Name=Earth3D
Comment=A 3D model of the planet
Exec=/usr/local/bin/earth3d
Terminal=false
Type=Application
Icon=education_geography_section.png
Categories=Network;X-MandrivaLinux-Internet-WebBrowsers;

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: Openbox - edit desktop config files
« Reply #7 on: January 08, 2011, 05:03:31 PM »
Hi,

I don't get it.  The "main menu" that I want is as you said - "Applications > Internet > Earth3d".  The openbox version I am running is the full version downloaded from the pclinuxos site.  I removed tint2 and replaced pcmanfm with thunar.  I have pasted, cut and pasted, created new file etc.  Still the same result.  I'm missing something really obvious here somewhere. 
Linux Registered User # 529407


Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Openbox - edit desktop config files
« Reply #8 on: January 08, 2011, 05:23:43 PM »
Hi,

Please give me the result from "ls -l /usr/share/applications/earth3d.desktop"

and it's content as well.

« Last Edit: January 08, 2011, 05:33:34 PM by melodie »
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: Openbox - edit desktop config files
« Reply #9 on: January 08, 2011, 10:18:12 PM »
Hi,

Is this what you are looking for?
Quote
[root@localhost ejt]# cd /usr/share/applications
[root@localhost applications]# ls -l Earth3D
-rw-r--r-- 1 root root 231 Jan  9 07:34 Earth3D
Linux Registered User # 529407


Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Openbox - edit desktop config files
« Reply #10 on: January 09, 2011, 04:08:24 AM »
Hi,

You just found what is wrong. The name of the file that allow getting the entry menu displayed must have a name with .desktop extension. Rename this "Earth3D" in "earth3d.desktop" and it should work.

Under /usr/share/applications do a "ls -l", and you will see that all the desktop files look like this. :)



melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: Openbox - edit desktop config files
« Reply #11 on: January 09, 2011, 05:40:21 AM »
Hi,

Well that was all a bit subtle!!  I renamed the file with Earth3D.desktop and rebooted.  Sure enough, there it was in Internet - right where it belonged.  And it worked.  One small query though - in the menu it appears as "Earth3D.desktop".  It was also listed as such in /usr/share/applications.  The name listed in the file was also that - no other files have that.  So I deleted the .desktop from "Name=..." and the name in the /applications folder also lost the .desktop.  However in Geany the file name is still Earth3D.desktop.  But the listing in the Internet menu still retains the .desktop.  And it still works.  What have I missed?

Linux Registered User # 529407


Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: Openbox - edit desktop config files
« Reply #12 on: January 09, 2011, 06:04:12 AM »
Aha!  I worked out what I missed.  My process of editing the file as I described was correct.  The missing bit was not a logout or a reboot.  It was to turn the 'puter off and restart it.  There it was in Internet without the .desktop.  And it still worked!!

Thanks very much for the help melodie - couldn't have done it without you.   
Linux Registered User # 529407


Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Openbox - edit desktop config files
« Reply #13 on: January 09, 2011, 08:17:15 AM »
Hi Taco,

I still think the method I brought to you might be better. I didn't even have to logout for it to work. Any thought ?

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: Openbox - edit desktop config files
« Reply #14 on: January 09, 2011, 08:52:46 AM »
Hi melodie,

I used your method to change the file name but got some funny glitches that I edited out.  So what you said worked fine.  I have a clean and unmodified install of pclinuxos openbox on another computer and replicated the process there.  All worked as you suggested, with only a logout to seal the process.  No glitches, no hiccups.  It may be that cut and paste may have introduced some errors on my system - on the clean computer I manually typed everything.  I often find that a logout on my computer sets changes that otherwise don't seem to take straightaway.  

As I mentioned before, the file name was quite a subtle detail.  I hadn't thought of the file suffix when saving the file - I just assumed it was just a done thing.  I'm glad you pointed that out to me as I think I might never have spotted it.  
« Last Edit: January 09, 2011, 09:06:22 AM by Taco.22 »
Linux Registered User # 529407