Guide: Putting Firmware Applications On The Desktop


Joined
May 17, 2010
Messages
2,198
Location
:|
PND software can be put on the desktop or the menu, which is great! But sadly the built in firmware applications are stuck only on the menu. What if you want your launcher to be in a handy place without having to mess around?

In this example we'll put the CPU overclocking utility right there on your desktop.

You'll need the terminal for this, as you require admin (or root) privileges to work with the needed files (otherwise this would be a drag-and-drop procedure).

Open up your terminal. Now type the following and hit enter:

Code:
cd /usr/share/applications

What folder is this? Well /usr/share contains various files that are shared by all the users of your Linux system. For example, themes are in /usr/share/themes and icons are in /usr/share/icons. The file heirarchy was created for mainframe systems decades ago, and they were quite eccentric people... probably best not to ask too many questions!

All the shortcuts for our applications, including the PND files on the SD cards are right here in '.desktop' format. If you're a Windows user, they're essentially the same as a program shortcut (but they contain lots of data, for example what part of the menu they should go into).

We need to find our application within this list of files, and this may require some trial and error (if in doubt, just repeat this entire procedure till you've done the correct one). Unless you fancy reading the '.desktop' files in a text editor, just take your best guess from the list of file names. No harm will be done, and you can delete it from your desktop at any time.

To see a readable listing of the directory we're in, type the following and hit enter:

Code:
ls | less

What is ls? It lists the contents of the directory, like 'dir' in dos.

What is less? Less is a terminal based program to browse through a a bunch of text in scrollable form.

What's that funny character? It's called a pipe, by putting a pipe in the middle you've sent the output from ls to less. Less loads the listing of the directory and allows you to scroll through it in the terminal.


Use 'up' and 'down' on the D-Pad to look through the files until you find one that looks likely. When you've finished hit ctrl-z to quit out of Less.

If you're like me, you won't remember the full filename you want. You can type 'ls' again with a partial match and it will give you a smaller list of files with a similar name.

For example, type the following and hit enter:

Code:
ls op*

What does the asterix do? Well, it represents 'anything'. Kind of like the blank letter in a Scrabble set only it can be more than one letter. By putting 'op*' we're asking for any file that begins with 'op' and ends with... anything/everything!

From the listing, I can see a file which looks like the overclocking utility. Can you see it?

It's called 'op_cpuspeed#5.desktop'

Now we need to copy this to the desktop (terminal style!).

Type the following, but DO NOT hit enter yet (you'll see why):

Code:
sudo cp op_cpu

Typing in a long file names seriously sucks, but Linux/Your Terminal has auto-completion! Just type in enough for it to identify it and hit TAB.

Hit TAB now, we get the following:

Code:
sudo cp op_cpuspeed#5.desktop

Now we need a destination. Type the remainder of the command and hit enter. It should look like this:

Code:
sudo cp op_cpuspeed#5.desktop ~/Desktop

You now need to enter your password. Do that, and hit enter. Everything is done! Check your desktop and it should automatically appear there.

What is sudo? It means 'superuser do' and enables you to run an admin command without having to be logged in, and have all those powers all the time. For example, any script you run cannot do nasty things to your system without requiring a password from you. For this example we had to use sudo because the areas of the filesystem used are locked out from normal users.

What is cp? Copy command, like in dos. You specify the original file first, then the destination.

What is '~/' It's the systems shorthand for your current home directory. It saves you having to type it all out or remember what user you're logged in as at the moment.
 
or slightly differently from the terminal or an SSH session

Code:
sudo ln -s /usr/share/applications/op_cpuspeed#5.desktop ~/Desktop/op_cpuspeed#5.desktop

This creates a symbolic link rather than a copy of the file so when you run it you're actually just using a shortcut back to the original file.

You'd still need to use someguy99's guide to find the file you wanted to link to, this is just an alternative to the last step.
 
illusionx said:
or slightly differently from the terminal or an SSH session

Code:
sudo ln -s /usr/share/applications/op_cpuspeed#5.desktop ~/Desktop/op_cpuspeed#5.desktop

This creates a symbolic link rather than a copy of the file so when you run it you're actually just using a shortcut back to the original file.

You'd still need to use someguy99's guide to find the file you wanted to link to, this is just an alternative to the last step.

Good point, cheers. Not being brought on Unix I tend to forget about linking!
 
Last edited by a moderator:
Multiplex said:
You need to be root to write to "~/Desktop"? :huh:
That's a bit unusual.

Ignore me, I replied to a different question to the one that was asked :p
 
Last edited by a moderator:
Multiplex said:
You need to be root to write to "~/Desktop"? :huh:
That's a bit unusual.

You do. And yes, it's weird!

I guess it has something to do with the PND system using that area.
 
Last edited by a moderator:
thankyou very much to both of you, especially the detailed explanations of the commands purposes.

I now have a nice wifi toggle icon on the desktop to speed up re-connecting. Diamond!
 
SomeGuy99 said:
Multiplex said:
You need to be root to write to "~/Desktop"? :huh:
That's a bit unusual.

You do. And yes, it's weird!

I guess it has something to do with the PND system using that area.

It has to do with /Desktop being in /home/[user] and /home/[user] being on the NAND, which is root access only.
 
Last edited by a moderator:
mindlord said:
It has to do with /Desktop being in /home/[user] and /home/[user] being on the NAND, which is root access only.
Nope, $HOME belongs to the user, as do all the files and subdirectories, except Desktop, which is mysteriously owned by root. Looks like a bug to me. I've chown'ed mine, we'll see if something chowns it back!
 
Last edited by a moderator:
SteveM said:
Nope, $HOME belongs to the user, as do all the files and subdirectories, except Desktop, which is mysteriously owned by root. Looks like a bug to me. I've chown'ed mine, we'll see if something chowns it back!
Just a thought, but it's probably the libpnd stuff. When you load an SD card with PND files on it, the daemon puts .desktop files onto the desktop. If Desktop isn't there, it probably creates it. Since the daemon is running as root, it creates it as root.

edit to say this can easily be tested: delete Desktop, and then insert an SD card with PND files in the /desktop folder, see what it does. If I'm right, file a bug report
 
Last edited by a moderator:
Interesting. I guess I understood it and I'm a Linux noob.
Would be cool to see more such little things - also beginner friendly of course. :)
I still fear the Linux Terminal but I guess I have to deal with it when I have my Pandora. XD
 
fusion_power said:
Interesting. I guess I understood it and I'm a Linux noob.
Would be cool to see more such little things - also beginner friendly of course. :)
I still fear the Linux Terminal but I guess I have to deal with it when I have my Pandora. XD

Gonna write up some more over the weekend. Leave some sort of feedback (I have no idea if anyone is even reading these things).

Next one will be how to create hotkeys for firmware apps (and dynamically) pnd apps.
 
Last edited by a moderator:
Middo said:
Hi Someguy99,

Great guides. I am one of the many LINUX noobs, so I enjoy reading and learning your Linux tutorials etc.

Keep em coming!

Middo

Awesome!

By the way, there's an easier way to do this one which involves less terminal. I'll edit it later to reflect both methods I think!

It may make you feel better that I'm learning a lot of shell stuff too! The depth you can go into is insane, and I feel like a total noob myself. :blink:
 
Last edited by a moderator:
when I try this the file ends up under my user directory and not in the desktop subdirectory :blink:
 
MonkeyChops said:
when I try this the file ends up under my user directory and not in the desktop subdirectory :blink:

Code:
sudo cp op_cpuspeed#5.desktop ~/Desktop

Are you using a capital 'D' on 'Desktop'? It matters a lot, because Linux is case sensitive.
 
Last edited by a moderator:
SomeGuy99 said:
Are you using a capital 'D' on 'Desktop'? It matters a lot, because Linux is case sensitive.
Ext2 is case sensitive. Fat32 is not. So long as the card is FAT32 or NTSC, it doesn't matter what case is used.
 
Last edited by a moderator:
Back
Top