Small Linux Laptop Forum

Elonex One T & One T+, CnM Minibook => How-to's => Topic started by: Leven2e on December 10, 2008, 09:02:30 PM

Title: Creating Shortcut Icons on the desktop
Post by: Leven2e on December 10, 2008, 09:02:30 PM
Hi,I don't think it's difficult,but I am quite clueless,I wonder if anyone can tell me how to create new icons on the desktop for internet addresses?It should be something like the Printer icon.I have taken a look,but I don't know.If somebody could help me I'd really appreciate it.Thus I could simplify some jobs,make shortcuts for radio stations,TV channels etc..Thanks ,Levi
Title: Re: Creating Shortcut Icons on the desktop
Post by: bafni on December 13, 2008, 08:44:27 AM
You need to create a .desktop file in share/applications

The easiest way to do an internet shortcut is to edit the web browser file

Simply add the url to the end of the Exec entry and change the Name entry

So for Google mine reads, 'Exec=/mozopt/bin/firefox http://www.google.co.uk' & 'Name=Google' (not sure if you need the http), you could change the icon too.

Don't forget to save it back with a different filename  :)


This will actually work to pass parameters to any app. I have made one to launch Midnight Commander using the xTerm file. Changed the Exec line to 'Exec=/usr/bin/xterm -geometry 130x37 mc' and the Name entry to 'Name=Midnight Commander'

Title: I am so excited :-)
Post by: Leven2e on December 13, 2008, 10:53:14 AM
Thanks a lot for your help,I shall let you know how I get on.
If I have any difficulties I will post it here. Where do you place the icon file? I hope I will find it.
Title: Re: Creating Shortcut Icons on the desktop
Post by: tonyk on December 15, 2008, 10:57:00 PM
Useful info cheers Garry :)
Title: Re: Creating Shortcut Icons on the desktop
Post by: bafni on December 16, 2008, 12:47:18 AM
Sorry forgot about the icon info

If you want to make your own it needs to be a 32x32, although other sizes may work, .png and you put it in /share/pixmaps/

The system will then find it itself

Title: Re: Creating Shortcut Icons on the desktop
Post by: Leven2e on December 16, 2008, 10:33:39 AM
Thank you very much for your help again!
Title: Re: Creating Shortcut Icons on the desktop
Post by: ThatWikiGuy on December 23, 2008, 10:46:19 AM
Sorry forgot about the icon info

If you want to make your own it needs to be a 32x32, although other sizes may work, .png and you put it in /share/pixmaps/

The system will then find it itself


How can I move the icon to /share/pixmaps
Title: Re: Creating Shortcut Icons on the desktop
Post by: Leven2e on December 23, 2008, 08:55:23 PM
Open up with something (NediT) and save it there.
Title: Re: Creating Shortcut Icons on the desktop
Post by: bafni on December 24, 2008, 03:30:08 AM
Midnight Commander is probably your best option

Title: Re: Creating Shortcut Icons on the desktop
Post by: ThatWikiGuy on December 24, 2008, 11:54:49 AM
Does any body know where I can get a good icon set from?
Title: Re: Creating Shortcut Icons on the desktop
Post by: Pieter071265 on January 02, 2009, 11:03:31 AM
Hi, I managed to start up a movie directly from a short cut. Now I like to add an icon that I create from the DVD cover. I have made small pictures 3,2x3,2 cm in PNG format for this.

But how to get them in the /share/pixmaps/ folder. Opeing and saving with Nedit does not work. I try to refer to an other folder, but this also does not work.

What to do now?

Thans! Pieter
Title: Re: Creating Shortcut Icons on the desktop
Post by: ThatWikiGuy on January 02, 2009, 04:42:35 PM
Hi, I managed to start up a movie directly from a short cut. Now I like to add an icon that I create from the DVD cover. I have made small pictures 3,2x3,2 cm in PNG format for this.

But how to get them in the /share/pixmaps/ folder. Opeing and saving with Nedit does not work. I try to refer to an other folder, but this also does not work.

What to do now?

Thans! Pieter
You need to install xterm and midnight commander.
Title: Re: Creating Shortcut Icons on the desktop
Post by: bafni on January 02, 2009, 07:41:30 PM
Does any body know where I can get a good icon set from?

Personally I like the Oxygen set (www.oxygen-icons.org & http://www.kde-look.org/content/show.php/Oxygen+Icons?content=74184) (get the nosvg set, it's a much smaller download) and its off shoots, Oxygen-Refit (http://deviantdark.deviantart.com/art/Oxygen-Refit-70199755) & Hydroxygen (http://deviantdark.deviantart.com/art/hydroxygen-iconset-100826865)

But there are just so many out there, just google 'Linux Icon Set'
Title: Re: Creating Shortcut Icons on the desktop
Post by: ThatWikiGuy on January 02, 2009, 11:34:54 PM
Does any body know where I can get a good icon set from?

Personally I like the Oxygen set (www.oxygen-icons.org & http://www.kde-look.org/content/show.php/Oxygen+Icons?content=74184) (get the nosvg set, it's a much smaller download) and its off shoots, Oxygen-Refit (http://deviantdark.deviantart.com/art/Oxygen-Refit-70199755) & Hydroxygen (http://deviantdark.deviantart.com/art/hydroxygen-iconset-100826865)

But there are just so many out there, just google 'Linux Icon Set'

I've learn to leave the icons alone now, lol.
After constant software recovery
Title: Re: Creating Shortcut Icons on the desktop
Post by: glassjaw on January 20, 2009, 09:34:13 AM
If you are okay with the shell just use the cp command to copy files around the place.

cp source_path/source_file destination_path

e.g.

cp /USB/USB_1/myimage.png /share/pixmaps

If you are clueless then just use midnight commander a very good file manager.
Title: Re: Creating Shortcut Icons on the desktop
Post by: ThatWikiGuy on January 20, 2009, 04:21:54 PM
its the .desktop files i forget to back-up
Title: Shortcuts for Firefox Add-ons
Post by: Leven2e on February 21, 2009, 11:20:03 PM
I would like to create a shortcut by modifying the browser's desktop file with the aim of starting a game-add on ("Cards") straight away from the desktop,without the need of starting up Bon Echo first and clicking on the Tools>Cards.Is there any other way?
I tried some ways,but failed so far.
What should I put after this line?:
Exec=/mozopt/bin/firefox

If you could help or think you have an idea please let me know!
Thanks,
Levi
Title: Re: Creating Shortcut Icons on the desktop
Post by: ThatWikiGuy on February 22, 2009, 12:34:39 PM
when you click on cards does to open a tab to somthing like chrome://cards?
Title: Re: Creating Shortcut Icons on the desktop
Post by: Leven2e on February 22, 2009, 01:44:30 PM
hey,thanx for ur suggestions,I think I have tried that (or very similar),as soon as my gets off of the 1T,I will try anyway!
Edit: no,nothing happened.
Title: Re: Creating Shortcut Icons on the desktop
Post by: ThatWikiGuy on February 22, 2009, 07:31:41 PM
could just install the
cards program in the games topic on this forum
Title: Re: Creating Shortcut Icons on the desktop
Post by: Leven2e on February 22, 2009, 07:36:22 PM
why should I? It's not about the game,it's about how to create a shortcut-in this case for a Firefox add-on
Title: Re: Creating Shortcut Icons on the desktop
Post by: oldbloke on February 24, 2009, 02:52:15 PM
You need to create a .desktop file in share/applications

The easiest way to do an internet shortcut is to edit the web browser file

Simply add the url to the end of the Exec entry and change the Name entry

So for Google mine reads, 'Exec=/mozopt/bin/firefox http://www.google.co.uk' & 'Name=Google' (not sure if you need the http), you could change the icon too.

Don't forget to save it back with a different filename  :)


This will actually work to pass parameters to any app. I have made one to launch Midnight Commander using the xTerm file. Changed the Exec line to 'Exec=/usr/bin/xterm -geometry 130x37 mc' and the Name entry to 'Name=Midnight Commander'


Garry,
Thanks for this info.
I have a OneT+, currently running the great new 3MX distro from WickNix. This method does not appear to work with 3MX
I want to create desktop icons for the GameBoy Colour games which run on the emulator included within 3MX so that our Grandchildren can use the games easily, without having to bother "Grandad" every time they want to play a different game  ::)
I have edited a .desktop file so that the EXEC line reads /usr/games/sdlgnuboy --scale=2 /SD/SD_1/Roms/Aladdin.gbc (for example)
but the icon does not appear anywhere that I can see, even after reboot.
Would you have any suggestions.
TIA
Martin
Title: Re: Creating Shortcut Icons on the desktop
Post by: wicknix on February 25, 2009, 05:49:58 AM
oldbloke, you are on the right track, but are missing just a wee bit for it to work. The /share/applications directory holds the .desktop files, but to use them on 3MX copy them to /root/Desktop to be able to see them. :)

You also may want to add --samplerate=11000 to gain a little better performance by chopping sound quality in half.

Cheers.
Title: Re: Creating Shortcut Icons on the desktop
Post by: oldbloke on February 25, 2009, 02:10:52 PM
Matt,
Thank you, that works great.
Next question......how do I get them to appear in the menu, under Games?  ::)
I don't pretend to understand this stuff, but am fumbling my way around.  :-[

Can anyone explain the strange characters against the "Name=" entry of some .desktop files?
Or, alternatively post a basic .desktop file for me to use. I'm not confident about what to leave in and what to take out of the ones I am copying across!

TIA
Martin

[edit] Oh! and what form should the .png files for the game icons be i.e. colour depth, size etc. can I produce them on an XP machine?  [/edit]
Title: Re: Creating Shortcut Icons on the desktop
Post by: ThatWikiGuy on February 25, 2009, 06:28:11 PM
Matt,
Thank you, that works great.
Next question......how do I get them to appear in the menu, under Games?  ::)
I don't pretend to understand this stuff, but am fumbling my way around.  :-[

Can anyone explain the strange characters against the "Name=" entry of some .desktop files?
Or, alternatively post a basic .desktop file for me to use. I'm not confident about what to leave in and what to take out of the ones I am copying across!

TIA
Martin

[edit] Oh! and what form should the .png files for the game icons be i.e. colour depth, size etc. can I produce them on an XP machine?  [/edit]
png's can be any type (i think) size? best to have square shape any size on elonex it resizes, best to include transparency
Title: Re: Creating Shortcut Icons on the desktop
Post by: oldbloke on February 25, 2009, 08:35:54 PM
png's can be any type (i think) size? best to have square shape any size on elonex it resizes, best to include transparency

Thanks for that.
Grabbed some images from Google, tweaked 'em in paint and they look good  ;D
The Grandchildren will be over the moon. (well, to be honest so am I 'cos I found Space Invaders for the Gameboy Colour  :o )
Desktop could get a little overcrowded with games though, so it would be good if I knew how to get them in the Menu system.......hint, hint!

Martin
Title: Re: Creating Shortcut Icons on the desktop
Post by: wicknix on February 26, 2009, 01:50:23 AM
It's fairly easy to add them to the menu, so long as you aren't afraid of a text editor. :)

First i'd suggest making a backup of jwmrc just in case you should botch the syntax up, which could leave your menu unusable. In xterm type this: cp /etc/jwm/jwmrc /etc/jwm/jwmrc.bk

Now open /etc/jwm/jwmrc in an editor of your choice. I'd suggest creating a new menu entry called "Gameboy" if you have alot of games so you dont overload the "Games" folder. So to do this scroll down just past the "Games" entry (it should make sense once you are looking at the file as to what i'm talking about). Now after the xgalaga entry you'll see </Menu> That signifies the end of the "Games" folder. Now hit enter to start youself just under that </Menu> tag.

Add the following:
<Menu icon="folder.png" label="Gameboy">
      <Program icon="whatever-icon-you-want.png" label="Name-of-game">/usr/games/sdlgnuboy --scale=2 --samplerate=11000 /SD/SD_1/roms/name-of-rom.gbc</Program>
      <Program= blah blah blah blah</Program>    (keep doing this until your done adding games)
</Menu>  (closes the gameboy folder)

Save the file and reboot. If you didn't mess up the syntax any it should work :)

If by chance you messed up copy the backup jwmrc back to restore the original. cp /etc/jwm/jwmrc.bk /etc/jwm/jwmrc

Also .png can be any shape/size/color. The desktop icons are auto sized to 48x48 on the desktop.

As for a the basics needed in a .desktop file, here ya go:

[Desktop Entry]
Encoding=UTF-8
Name=Name of app
Exec=/path/to/executable
Icon=some-icon.png
Type=Application

Thats it, dont need more than that.

Cheers.
Title: Re: Creating Shortcut Icons on the desktop
Post by: oldbloke on February 26, 2009, 11:48:14 AM
Matt,
That is a very full answer, just right for an old fart like me  :D

It works a treat. Good job I backed up jwmrc as you advised, 'cos I must have screwed something at the first attempt; ended up with no Menu  :o
All good now.

Thanks a bunch for the info, and a really big THANK YOU for 3MX, it has made the LLL come alive.

Martin
Title: Re: Creating Shortcut Icons on the desktop
Post by: ThatWikiGuy on February 28, 2009, 07:59:19 AM
Matt,
That is a very full answer, just right for an old fart like me  :D

It works a treat. Good job I backed up jwmrc as you advised, 'cos I must have screwed something at the first attempt; ended up with no Menu  :o
All good now.

Thanks a bunch for the info, and a really big THANK YOU for 3MX, it has made the LLL come alive.

Martin

Ow, man, 3MX sounds so cool, i wish i could get my laptop fixed, i there a small linux distrib that simular to 3MX, or would wicknix be willing to make a x86 3MX? (which open the standard install file for linux)
Title: Re: Creating Shortcut Icons on the desktop
Post by: utd_grant on February 28, 2009, 01:51:54 PM
Ow, man, 3MX sounds so cool, i wish i could get my laptop fixed, i there a small linux distrib that simular to 3MX, or would wicknix be willing to make a x86 3MX? (which open the standard install file for linux)

Any of the small x86 Linux distros are very similar to 3MX, and will run on low-spec x86-based laptops. There's Damn Small Linux (http://damnsmalllinux.org/), Puppy Linux (http://www.puppylinux.org/) and Xubuntu (http://www.xubuntu.org/) for starters.

I run Xubuntu on my old Dell 800MHz laptop, and it's very responsive. The great advantage of Xubuntu for me is having the Synaptic package manager (https://help.ubuntu.com/community/SynapticHowto) combined with Ubuntu's huge repositories. If you can't find the software you want in there, you won't find it anywhere ! As with Ubuntu, you can download a Live CD which you can boot directly without having to install anything on your hard drive.