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 |
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. |
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
|
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 |
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 |
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. |
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 |
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. |
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 |
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. |
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 |
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/ |
Thankyou very much for your support. I will continue now.
|
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 |
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. |
All times are GMT -5. The time now is 11:44 AM. |