SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-10-26 15:51:23

Nili
#! Die Hard
From: 127.0.0.1
Registered: 2013-03-20
Posts: 811
Website

mplayer2 icon on tint2

Hello!

For several days i am trying very very hard changing icon of mplayer2 on tint2.
Video player has assigned with a default icon which i think is tint2 or perhaps openbox? at /usr/share/tint2 there it is:
0cKo6zx.png

on tint2 appear like this
Ut5aHwb.png

As you can see i have renamed default_icon to default_icon2.png to make changing, no results.

then

there is another destination with that icon
/usr/share/pixmaps
which is
UhMwMIl.png
even here i tried for test changing these two icons with different icons, mplayer2 still no change on tint2.

since there is no mplayer.desktop i created one at /usr/share/applications/
JRnWWIh.png

within file

[Desktop Entry]
Version=1.0
Name=Mplayer media player
GenericName=Media player
Comment=Read, capture, broadcast your multimedia streams
Exec=mplayer %U
TryExec=mplayer
Icon=mplayer
Terminal=false
Type=Application
Categories=AudioVideo;Player;
MimeType=video/dv;video/mpeg;video/x-mpeg;video/msvideo;video/quicktime;video/x-anim;video/x-avi;video/x-ms-asf;video/x-ms-wmv;video/x-msvideo;video/x-nsv;video/x-flc;video/x-fli;application/ogg;application/x-ogg;video/x-ogm+ogg;audio/x-vorbis+ogg;application/x-matroska;audio/x-matroska;video/x-matroska;video/webm;audio/webm;audio/x-mp3;audio/x-mpeg;audio/mpeg;audio/x-wav;audio/x-mpegurl;audio/x-scpls;audio/x-m4a;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;application/vnd.rn-realmedia;audio/x-real-audio;audio/x-pn-realaudio;application/x-flac;audio/x-flac;application/x-shockwave-flash;misc/ultravox;audio/vnd.rn-realaudio;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;image/vnd.rn-realpix;video/vnd.rn-realvideo;audio/x-pn-realaudio-plugin;application/x-extension-mp4;audio/mp4;video/mp4;video/mp4v-es;x-content/video-vcd;x-content/video-svcd;x-content/video-dvd;x-content/audio-cdda;x-content/audio-player;video/x-flv;application/xspf+xml;

Provided this result
ZYQQpzu.png

i created another mplayer2.desktop at /home/nili/.local/share/applications still no change.
also i have seen with great care at /usr/share/icons/hicolor 16x16 22x22 24x24 32x32 etc...
Still icon is costumized well on menu and folder. but...

impossible to change at tint2 sad there is a bug thread also a lot of info on web but didn't see a fix. Anyone know a trick how to change mplayer2 icon on tint2. All my efforts gave me no result.

Thanks in advance,
Kind regards.

Nili


# Debian GNU/Linux 8:8.2 (netinst/stable)
# Packages Installed: 541
# Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) i686 GNU/Linux
# Startup finished in 2.850s (kernel) + 6.473s (userspace) = 9.324s

Offline

Help fund CrunchBang, donate to the project!

#2 2014-10-26 21:29:47

ohnonot
...again
Registered: 2012-05-22
Posts: 2,205

Re: mplayer2 icon on tint2

this is a really old topic.
please, use the search function before you post.

the simple answer is this: both tint2 and openbox try to use themed icons, but in the end it's up to the app to provide its icon.
mplayer2 is one of those apps that don't give a damn about it.

fbpanel has a nifty "icons" plugin that allows to override those.

Offline

#3 2014-10-26 22:00:31

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: mplayer2 icon on tint2

[damo@cb1-laptop ~]$ aptshow smplayer
Package: smplayer
Version: 14.9.0~ds0-1
Installed-Size: 3781
Maintainer: Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
Architecture: amd64
Depends: mplayer2 | mplayer, libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libqt4-dbus (>= 4:4.5.3), libqt4-network (>= 4:4.5.3), libqt4-script (>= 4:4.5.3), libqt4-xml (>= 4:4.5.3), libqtcore4 (>= 4:4.7.0~beta1), libqtgui4 (>= 4:4.8.0), libstdc++6 (>= 4.1.1), zlib1g (>= 1:1.1.4)
Recommends: smplayer-themes, smplayer-l10n
Description-en: complete front-end for MPlayer and MPlayer2
 Qt4 Mplayer front-end, with basic features like playing
 videos, DVDs, and VCDs to more advanced features like support
 for MPlayer filters and more. One of the most interesting features
 of SMPlayer: it remembers the settings of all files you play.
 So you start to watch a movie but you have to leave... don't
 worry, when you open that movie again it will resume at the same
 point you left it, and with the same settings: audio track,
 subtitles, volume...

...and it show a nice icon in Tint2 smile


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#4 2014-10-27 08:18:47

Nili
#! Die Hard
From: 127.0.0.1
Registered: 2013-03-20
Posts: 811
Website

Re: mplayer2 icon on tint2

I read some thread here regarding mplayer2 but didn't provide a fix for mplayer2 icon. Thread were old and thought not have any update lately. For this reason i opened this one, sorry. I am clearer now. It's mplayer2 fault.

^damo thanks for your suggestion but i'll stay with mplayer2 for a gui like smplayer already have VLC.
mplayer2 i use as a command line application or in mc. anyhow thank you smile

Last edited by Nili (2014-10-27 08:19:29)


# Debian GNU/Linux 8:8.2 (netinst/stable)
# Packages Installed: 541
# Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) i686 GNU/Linux
# Startup finished in 2.850s (kernel) + 6.473s (userspace) = 9.324s

Offline

#5 2014-10-27 17:59:08

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: mplayer2 icon on tint2

I can think of a possible workaround for mplayer2 - maybe you could start it via a script, and create a desktop file for that script with an assigned icon?  I haven't really investigated the idea though!

EDIT btw I tried smplayer after I suggested it - it's really nice smile

Last edited by damo (2014-10-27 18:00:19)


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#6 2014-10-27 18:46:36

Nili
#! Die Hard
From: 127.0.0.1
Registered: 2013-03-20
Posts: 811
Website

Re: mplayer2 icon on tint2

Sounds fine if it works damo, only if I would been a good programmer smile

Tried smplayer a years ago, it's really lightweight application but on my old computer can't decode well 1080p or some HQ videos, while VLC can. I have stick with VLC sine long time.


# Debian GNU/Linux 8:8.2 (netinst/stable)
# Packages Installed: 541
# Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) i686 GNU/Linux
# Startup finished in 2.850s (kernel) + 6.473s (userspace) = 9.324s

Offline

#7 2014-10-27 19:57:13

ohnonot
...again
Registered: 2012-05-22
Posts: 2,205

Re: mplayer2 icon on tint2

hmm, wasn't there this utility called xseticon?

Offline

#8 2014-10-27 21:39:17

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: mplayer2 icon on tint2

ohnonot wrote:

hmm, wasn't there this utility called xseticon?

There still is, and with that hint I've also found your xseticon script thread wink Change Your Application's (ugly) Taskbar Icon Programmatically!


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#9 2014-10-28 08:17:40

Nili
#! Die Hard
From: 127.0.0.1
Registered: 2013-03-20
Posts: 811
Website

Re: mplayer2 icon on tint2

How can i make working mplayer2 by the script on the link damo, sorry for my limited knowledge on this one too.


# Debian GNU/Linux 8:8.2 (netinst/stable)
# Packages Installed: 541
# Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) i686 GNU/Linux
# Startup finished in 2.850s (kernel) + 6.473s (userspace) = 9.324s

Offline

#10 2014-10-28 08:21:34

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: mplayer2 icon on tint2

Nili wrote:

How can i make working mplayer2 by the script on the link damo, sorry for my limited knowledge on this one too.

You need to download and compile the source for xseticon, then modify the scripts to suit.

Unless you find someone here who is willing to do all that for you, I suggest you use smplayer wink


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#11 2014-10-28 08:29:42

Nili
#! Die Hard
From: 127.0.0.1
Registered: 2013-03-20
Posts: 811
Website

Re: mplayer2 icon on tint2

Oh, i must do pretty work for that icon and i am weakness in some things, so? better to ignore icon on mplayer2 atm.

Ok. i'll give a try smplayer once again since is not anything bad doing...

damo, thank you very very much for your fast reply.

Kind regards!
Nili


# Debian GNU/Linux 8:8.2 (netinst/stable)
# Packages Installed: 541
# Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) i686 GNU/Linux
# Startup finished in 2.850s (kernel) + 6.473s (userspace) = 9.324s

Offline

#12 2014-10-28 08:33:48

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: mplayer2 icon on tint2

No problem smile

I did get xseticon, but I haven't spent any time trying it with those scripts. It wasn't straightforward to compile, because I needed to track down some dependencies. Definitely easier to use smplayer big_smile


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#13 2014-10-28 18:10:49

ohnonot
...again
Registered: 2012-05-22
Posts: 2,205

Re: mplayer2 icon on tint2

damo wrote:

You need to download and compile the source for xseticon

i kind of missed that bit when i wrote that howto - but i just found debian packages for xseticon here. so, no need to compile from source :-)

ps: nili said that they have succesfully used xseticon to change xterms icon before - it really makes me doubt the sanity of...

Last edited by ohnonot (2014-10-28 18:15:27)

Offline

#14 2014-10-29 20:06:48

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: mplayer2 icon on tint2

Using @ohnonot's script and a wrapper script here:  Change Your Application's (ugly) Taskbar Icon Programmatically! you can set an icon for mplayer as follows:

xseticon script: ~/bin/seticon

#!/bin/bash
##################################################
#
# Usage:
#	seticon <command> <path/to/icon.png>
#
#	Input:
#		$1: application's process name/command
#	Output:
#	 	$2: icon path
#
# adapted from this:
# http://blog.chewearn.com/2010/01/18/find-window-id-of-a-process-id-in-bash-script/
# (i had to change this: xwininfo -root -children -tree -int)

APP="$1"
PID=$(pidof "$APP" | awk '{print $1}')
#~ if you write a wrapper around this that has the same name as the application it's 
#~ assigning an icon to, you have to {print $2} here!

echo "APP is now" "$APP"
echo "PID is now" $PID

# Loop windows with application's executable name
while read WID; do

	WID=`echo $WID | awk '{print $1}'`
	echo "WID is now" $WID

	#~ # hex to dec
	#~ WID=$((WID))
	#~ echo "Line 31: WID is now " $WID

	# Check window's PID is matching application's PID
	if [ `xprop -id $WID _NET_WM_PID | awk '{print $3}'` -eq $PID ]
	then
		echo "Yes it equals! Window" $WID "belongs to" "$APP"
		
		#~ hack: simply set icons for all matching windows, visible or not.
		xseticon -id "$WID" "$2"
		echo "assigned icon" "$2" "to WINID" "$WID"
	
		#~ # Check is actual visible window
		#~ if [ "`xwininfo -id $WID | grep 'IsViewable'`" != '' ] ; then
			#~ echo "this should be the final result: " $WID
			#~ return 0
		#~ fi
	fi

done < <( xwininfo -root -children -tree -int 2>/dev/null | grep -i "$APP" )

Wrapper script ~/bin/mplayer-icon

Usage: "mplayer-icon /path/to/video"
(adjust the icon path and sleep time to suit your setup)

#!/bin/bash
icon='/usr/share/pixmaps/statler.png'

/usr/bin/mplayer "$@" &
sleep 0.2
seticon "mplayer" "$icon"

BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#15 2014-10-30 08:24:46

Nili
#! Die Hard
From: 127.0.0.1
Registered: 2013-03-20
Posts: 811
Website

Re: mplayer2 icon on tint2

Hi, thanks damo for your great effort,
i put the script both on /bin or /sbin run "mplayer-icon /path/to/video" but didn't provide icon on tint2.

Please damo, can you tell me specifically once again how to do with these scripts by steps. Forgive me to tease you again.

Regards,
Nili


# Debian GNU/Linux 8:8.2 (netinst/stable)
# Packages Installed: 541
# Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) i686 GNU/Linux
# Startup finished in 2.850s (kernel) + 6.473s (userspace) = 9.324s

Offline

#16 2014-10-30 09:21:33

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: mplayer2 icon on tint2

Did you install xseticon?
Did you set the icon path to what you want in the wrapper script?
Did you make the scripts executable?
Did you try lengthening the sleep time as I suggested?


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#17 2014-10-30 09:29:13

Nili
#! Die Hard
From: 127.0.0.1
Registered: 2013-03-20
Posts: 811
Website

Re: mplayer2 icon on tint2

wow! i think didn't any of those, just i created two scripts probably yes or not executable at /bin and run the command.
Sorry for the noob situation that i created. Apparently I need to read more than ask. smile

first, since xseticon is not on debian package, and there is not a instruction how to install, where to put extracted "xseticon"? or just i need to run Makefile?

Last edited by Nili (2014-10-30 09:34:14)


# Debian GNU/Linux 8:8.2 (netinst/stable)
# Packages Installed: 541
# Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) i686 GNU/Linux
# Startup finished in 2.850s (kernel) + 6.473s (userspace) = 9.324s

Offline

#18 2014-10-31 03:14:11

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: mplayer2 icon on tint2

Nili, try the .deb file which Ohnonot linked to, it's a version or two older but it's working fine for me on #! Waldorf. Just right-click the file and choose gdebi to open it.

Here: http://packages.leonerd.org.uk/pool/main/x/xseticon/
Choose the amd64 or i386 .deb file, depending on your machine.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#19 2014-10-31 08:48:23

Nili
#! Die Hard
From: 127.0.0.1
Registered: 2013-03-20
Posts: 811
Website

Re: mplayer2 icon on tint2

Thank you johnraff, already tried yesterday but dependency is not satisfiable libgd2-xpm (>= 2.0.36~rc1~dfsg).

Thanks guys but just i give up, only i few application like mplayer2, feh which i use daily have the same icons as openbox,
ignoring those is the best solution for me now. Is not the end of the world for a damn some icon on different applications smile

All efforts especially by damo are appreciated very much.
Kind Regards,

Nili


# Debian GNU/Linux 8:8.2 (netinst/stable)
# Packages Installed: 541
# Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) i686 GNU/Linux
# Startup finished in 2.850s (kernel) + 6.473s (userspace) = 9.324s

Offline

#20 2014-11-01 03:52:20

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: mplayer2 icon on tint2

Nili, if you feel you'd rather spend your efforts on something less trivial than an icon then fair enough!

However it seemed strange that your system can't install libgd2-xpm version >= 2.0.36~rc1~dfsg, because that's available in the main repository for both Wheezy and Squeeze: https://packages.debian.org/search?suit … libgd2-xpm

...but I just thought - are you running Jessie or Sid? The package seems to have changed there, and the deb is perhaps too old... neutral


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#21 2014-11-02 05:11:17

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: mplayer2 icon on tint2

@OP The default icon that tint2 shows can be found in /usr/share/tint2/default_icon.png. Swap it for the one you want for mplayer (rename it default_icon.png). Hey Presto, mplayer has its icon when you run it!

...so do all the other applications that tint2 gives a default icon to of course wink


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#22 2014-11-02 08:45:23

ohnonot
...again
Registered: 2012-05-22
Posts: 2,205

Re: mplayer2 icon on tint2

...damo, 2nd thanks in one session.
this icon looks just the same as /usr/share/pixmaps/openbox.png. that might cause some confusion...

Offline

#23 2014-11-02 09:16:20

Nili
#! Die Hard
From: 127.0.0.1
Registered: 2013-03-20
Posts: 811
Website

Re: mplayer2 icon on tint2

Already tried a few times damo no results, look the very first icon above named default_icon2.png i have made another default_icon.png and renamed original, tried, still no change even changing the original openbox icon.

However, was a icon package that made it possible to change default openbox icon, can't remember the name now.

^johnraff, yes i am using testing (currently, Jessie sources), it is true package is too old now for Jessie.


# Debian GNU/Linux 8:8.2 (netinst/stable)
# Packages Installed: 541
# Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) i686 GNU/Linux
# Startup finished in 2.850s (kernel) + 6.473s (userspace) = 9.324s

Offline

#24 2014-11-02 17:14:53

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: mplayer2 icon on tint2

Did you restart tint2, restart openbox, logout/in etc etc? An icon cache somewhere may need refreshing


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

Be excellent to each other!

#25 2014-11-03 08:36:38

Nili
#! Die Hard
From: 127.0.0.1
Registered: 2013-03-20
Posts: 811
Website

Re: mplayer2 icon on tint2

Yest did restart tint2, also restart openbox didn't log out/restart computer for some other reasons, but i'll kept in mind checking after restart.


# Debian GNU/Linux 8:8.2 (netinst/stable)
# Packages Installed: 541
# Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) i686 GNU/Linux
# Startup finished in 2.850s (kernel) + 6.473s (userspace) = 9.324s

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo