Download your favorite Linux distribution at LQ ISO.
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: pclos2015, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 15,902

Rep: Reputation: 3021Reputation: 3021Reputation: 3021Reputation: 3021Reputation: 3021Reputation: 3021Reputation: 3021Reputation: 3021Reputation: 3021Reputation: 3021Reputation: 3021
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, Linux Mint, Ubuntu
Posts: 1,395

Rep: Reputation: 278Reputation: 278Reputation: 278
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

All times are GMT -5. The time now is 03:20 PM.

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