Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-15-2011, 01:12 AM   #1
LQ Newbie
Registered: Feb 2011
Posts: 17

Rep: Reputation: 0
Change the image of an executable file from commandline.

Hi all,

I want to change the icon image of the executable files from command line. Can any one help me in this regard.

Thanks in advance.

Old 02-15-2011, 01:35 AM   #2
Senior Member
Registered: Oct 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
What app sets your icon in the first place? Would it be your desktop environment kde maybe. To answer your question, I don't know but I'm just chiming in cause I'm curious.
Old 02-15-2011, 03:17 AM   #3
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2018 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,101

Rep: Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488Reputation: 3488
In Linux with 'Gnome Desktop', the Desktop entry ( Icon ) is a text file,
<application>.desktop .

The most easy way of changing the "Icon" is to 'right click',
select Properties, and then click the Icon image.

In a terminal : gedit <entry>(.desktop) , and then edit the line : Icon=<image>

In KDE 4, the file can be a link. Probably easier to create a new Icon,
than finding a way to do the editing.

Other 'Window Managers' ( Desktops ) : the entry will most often be a hidden
text file.

Old 02-15-2011, 04:18 PM   #4
Senior Member
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Linux Mint
Posts: 1,677

Rep: Reputation: 387Reputation: 387Reputation: 387Reputation: 387
The icon info for a normally-installed file is found in the .desktop file in /usr/share/applications. Uuse your favorite cli editor (as root) to edit - just change the Icon= field to whatever you like


gnome, kde, linux, redhat, unix

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
compile fortran using g77 into executable binary image tuas Programming 2 11-21-2008 11:03 AM
Breaking avi file into 3 via the commandline? Maverick1182 Linux - Newbie 12 11-09-2007 04:27 AM
How to change the script of an executable? Nishant Desai Programming 1 02-26-2007 08:44 AM
Is there an interactive way to change date/time from commandline? Akhran Linux - Newbie 1 10-14-2005 12:18 AM
Commandline to change firewall setting? Arodef Fedora 2 01-06-2005 04:38 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:25 AM.

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