yedukondalu has asked for the wisdom of the Perl Monks concerning the following question:

Hi.. I am trying to create a desktop icon for my perl program wrirren in perl Tk module.I tried creating using .desktop file..But it is not working.

[Desktop Entry] Version=1.0 Name=hotel Exec=perl /home/yathayed/yedukondalu/programs/perl/advanced/tk/hotel_b +ill.pl Path=/home/yathayed/yedukondalu/programs/perl/advanced/tk Terminal=false Type=Application Categories=Utility;Application;Development;

Replies are listed 'Best First'.
Re: Create a desktop icon for perl program in ubuntu?
by Discipulus (Canon) on Dec 01, 2015 at 08:16 UTC
    Hello yedukondalu,

    Tk programs often use pixmaps rather than bitmaps for their icon images, because pixmaps provide more than two colors and are plaintext.
    You can review my best Tk program Tk Tartaglia's triangle fun - Pascal's triangle fun where i use inline plaintext icon. Below the relevant part of the program.
    See also Tk::Pixmap
    my $mw = MainWindow->new (); $mw->Icon(-image => $mw->Pixmap(-data => &tart_icon)); [...] sub tart_icon { return <<EOI /* XPM */ static char * Icon_xpm[] = { "32 32 4 1", " c #000000000000", "g c #00FF00", "X c #FF0000", "D c #FFFF00", # 32 lines more with the inline pixmap [...]


    HtH
    L*
    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re: Create a desktop icon for perl program in ubuntu?
by Anonymous Monk on Dec 01, 2015 at 07:26 UTC

      Nothing is happing.A blank window pops up and terminates.

        Nothing is happing.A blank window pops up and terminates.

        What kind of window?