LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-08-2006, 12:53 AM   #1
indraveni
LQ Newbie
 
Registered: May 2006
Posts: 28

Rep: Reputation: 15
Command Line for creating shortcut icons


Hi Friends,

I want to know whether there is any way for adding the Applcaition shortcut to the panel through command line.

for example : I want to add the mozilla browser icon or shorcut ( what ever it may be ) to the panel through commad line. Is it possible . If so HOW ???


Regards
Indraveni.K
 
Old 05-08-2006, 01:38 AM   #2
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
One way is to create the panel icon file through command line interface and restart gui.
Just check the similar panel shortcut files available in the users home directory.
In redhat
~user/.gnome/panel.d/
This dir may be different in different distros.
 
Old 05-08-2006, 01:49 AM   #3
indraveni
LQ Newbie
 
Registered: May 2006
Posts: 28

Original Poster
Rep: Reputation: 15
I am using debian distro. and I checked in /usr/share/gnome/ but i dint find any such file. can any one tell me where is such file in debian distro
 
Old 05-08-2006, 01:53 AM   #4
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
Dont check in /usr/share/gnome dir.
That dir will have files shared across users.

If you have logged in as user guest then check in
/home/guest/.gnome/ [it will be a hidden dir ]

Or if u have logged in as root check in
/root/.gnome dir

Cheers
Zulfi
 
Old 05-08-2006, 02:00 AM   #5
indraveni
LQ Newbie
 
Registered: May 2006
Posts: 28

Original Poster
Rep: Reputation: 15
Yes it is there in /root/.gnome2 but panel2.d folder is having all the shortcut icons present in it. But what is the file which is effecting this folder, that is from where the information is beeing passed to add the shortcut icon to this panel.

Thankyou
 
Old 05-08-2006, 02:05 AM   #6
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
Cool
So you have the dir there.

Now you try to create shortcut in the panel normally.[Right-clink on the panel and create a shortcut with your name]

See if a new file is ccreated into panel2.d dir.
Take this file as a reference and try creating a similar file in command line interface.[Copy,paste,modify]
Hope that should work.
 
Old 05-08-2006, 02:10 AM   #7
indraveni
LQ Newbie
 
Registered: May 2006
Posts: 28

Original Poster
Rep: Reputation: 15
I have done i and checked it already and I have seen its creating an icon in the panel2.d.

But what copy,paste and modify work I can do here through command line. How can I map an application and create an icon on panel though command line.

Need some more help please
 
Old 05-08-2006, 02:18 AM   #8
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
Write a small script that will create the file based on user input.

The final file created should be placed in the panel2.d dir.
 
Old 05-08-2006, 02:26 AM   #9
indraveni
LQ Newbie
 
Registered: May 2006
Posts: 28

Original Poster
Rep: Reputation: 15
The dir panel2.d is having only the icons present in it. How can I get access to the application shortcut. can u give me a sample to the script please.

Thankyou
 
Old 05-08-2006, 02:35 AM   #10
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
Can u find any dir with name launchers.
Go into launchers directory and you will see the files like these

bar-001c87e536.desktop foo-007ed6fd00.desktop hammer-006ed869da.desktop larry-0034d9a609.desktop

You will have to create a similar file like this.
Also you will have to put an entry in the confif file .
In my system the config file is
/home/user/.gnome/panel.d/default/Applet_Config

And the launcher dir is in
/home/user/.gnome/panel.d/default/launchers

Just create and delete a shortcut or two , observe the dir and config file and u will get the idea.

As for the script you will have to work it out.
 
Old 05-08-2006, 02:48 AM   #11
indraveni
LQ Newbie
 
Registered: May 2006
Posts: 28

Original Poster
Rep: Reputation: 15
Ya I found the Launchers dir and this is the place where all my shortcut icons are present. I dint find any file as you told in this directory. /root/.gnome2/panel2.d/default/launchers -- Here i have the shorcut icons only..

Still I will search for the file. If u have idea about Debian system where it is exactly locating then please tell me...

Thankyou,

Indraveni
 
Old 05-08-2006, 03:00 AM   #12
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
Easy

cd /root/.gnome2/panel2.d/default/launchers
ls

Get one file name from this dir
ex: bar005.desktop
[I have assumed this filename , you take the filename of the file available in the above dir ]

cd /root/.gnome2/panel2.d/default/
grep 'bar005.desktop' *

This will tell you the name of the config file where the shortcut is mentioned.

or try grep in /root/.gnome2/panel2.d/

grep -r 'bar005.desktop' /root/.gnome2/panel2.d/
 
Old 05-08-2006, 03:16 AM   #13
indraveni
LQ Newbie
 
Registered: May 2006
Posts: 28

Original Poster
Rep: Reputation: 15
Thankyou very much for your support. I will continue now.
 
Old 05-08-2006, 07:00 AM   #14
indraveni
LQ Newbie
 
Registered: May 2006
Posts: 28

Original Poster
Rep: Reputation: 15
I am not able to trace where the config file present about which u specified in the above post.

and one more thing, if I am going to add a new file then how can I select which filename I need to specify, for that particular application shotcut...

Thankyou

Last edited by indraveni; 05-08-2006 at 07:03 AM.
 
Old 05-08-2006, 07:15 AM   #15
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
Ok have you tried copying a shortcut file and changing the contents to see if a new shortcut is created.

Paste one shortcut files content if possible.

If gnome has got information about the position of shortcut in some binary file then it will a tough time trying to do it from command line.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating shortcut of Icons jignesh1 Linux - General 4 01-28-2006 09:03 AM
LXer: Creating and compiling Qt projects on the command line LXer Syndicated Linux News 0 01-13-2006 05:31 AM
Command line question - creating ISO image satimis Linux - General 8 09-25-2004 03:18 AM
Installing themes/icons etc using the command line? Boggit Linux - Newbie 1 08-25-2003 04:52 PM
creating email account at command line gdthomas67 Linux - Software 5 07-15-2003 11:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration