LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices


Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
  1. Old Comment

    Fixing the annoying firefox' associations issue once and for all

    Linux has to makeup somehow, for not having viruses. "Linux doesn't have virus - it doesn't need them".
    Posted 01-10-2016 at 11:16 PM by the dsc the dsc is offline
  2. Old Comment

    Fixing the annoying firefox' associations issue once and for all

    Ok, when updating Calligra the desktop link quite naturally comes back...
    But otherwise the recipe seems to work as it should.

    update-desktop-database clearly needs to handle priorities between the applications in some way.
    Posted 01-05-2016 at 10:55 PM by joakim joakim is offline
  3. Old Comment

    Fixing the annoying firefox' associations issue once and for all

    I've got no mimeapps.list on my machine. I can temporarily solve problem by editing /usr/share/applications/mimeinfo.cache.

    Problem is that after a while (probably some update) it goes back to previous (e.g. using krita for pdfs )

    From Arch http://https://wiki.archlinux.org/in...t_applications I got
    Quote:
    When the program update-desktop-database is run (usually as root during the (un)installation of a package), it updates files called mimeinfo.cache
    Running update-desktop-database --verbose I see that it reads from /usr/share/applications/.

    Thus, removing the file /usr/share/applications/kde4/krita_pdf.desktop
    and then running update-desktop-database I conclude that my /usr/share/applications/mimeinfo.cache at least for the moment looks as it should .

    Let's hope it stays that way!
    /Joakim

    PS. I'm on Gentoo and KDE
    Posted 12-29-2015 at 07:12 AM by joakim joakim is offline
  4. Old Comment

    Download files from a list while (re)naming them at the same time

    Youtube-dl is specialized in certain "big" sites, and tries to guess some others as "generic". I think there's the risk that it won't always know how to give a meaningful file name, using something akin to a file "ID" or the actual remote file name, whatever it may be. Maybe the meta-data would be just "podcast 23123132" or whatever.

    But it never occurred to me to try to use it for non-video multimedia sites, even though often I use it to download just the audio from youtube itself. Got to try it sometime. But I bet it would be more likely to work on sites such as soundcloud.com than something like im-this-random-guy-who-has-this-podcast.com.
    Posted 12-04-2015 at 01:40 AM by the dsc the dsc is offline
  5. Old Comment

    Download files from a list while (re)naming them at the same time

    Quote:
    Originally Posted by jheengut View Comment
    why don't you use youtube-dlyoutube-dl, you can even program it to perform renaming according to its meta-data.
    though it is still limited to multimedia files only
    Posted 12-01-2015 at 06:24 AM by jheengut jheengut is offline
  6. Old Comment

    Download files from a list while (re)naming them at the same time

    why don't you use youtube-dlyoutube-dl, you can even program it to perform renaming according to its meta-data.
    Posted 12-01-2015 at 06:23 AM by jheengut jheengut is offline
  7. Old Comment

    Collection of random small tricks

    Just another box not setup as my previous post but showing what Debian Jessie provides. I am current with dist-upgrades on this box today.

    Code:
    $ apt-cache policy youtube-dl
    youtube-dl:
      Installed: (none)
      Candidate: 2014.08.05-1+deb8u1
      Version table:
         2014.08.05-1+deb8u1 0
            500 http://ftp.gr.debian.org/debian/ jessie/main i386 Packages
    using cclive on this unit

    Code:
    $ apt-cache policy cclive
    cclive:
      Installed: 0.7.16-2+b1
      Candidate: 0.7.16-2+b1
      Version table:
     *** 0.7.16-2+b1 0
            500 http://ftp.gr.debian.org/debian/ jessie/main i386 Packages
            100 /var/lib/dpkg/status
    Posted 09-30-2015 at 04:11 PM by rokytnji rokytnji is offline
  8. Old Comment

    Collection of random small tricks

    The irony is that I get:

    Code:
     youtube-dl --version
    2015.01.23.4
    (And right now 2015.09.28)

    So it's actually mpv that misunderstands the newer version as an old one, perhaps due to deprecated syntax or something.


    Hey, but for some reason with the latest update it worked! Go figure...
    Posted 09-30-2015 at 01:47 PM by the dsc the dsc is offline
    Updated 09-30-2015 at 01:50 PM by the dsc
  9. Old Comment

    Collection of random small tricks

    Jessies package manager version is too old also

    Code:
    harry@biker:~
    $ mpv https://www.youtube.com/watch?v=DI9irFLcVgA
    Playing: https://www.youtube.com/watch?v=DI9irFLcVgA
    [ytdl_hook] Your version of youtube-dl is too old! You need at least version '2014.11.26', try running `youtube-dl -U`. 
    Failed to recognize file format.
    Just for grins

    Code:
    root@biker:/home/harry# youtube-dl -U
    It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update.
    Not happening on this install. I like your way better.
    Posted 09-27-2015 at 01:23 PM by rokytnji rokytnji is offline
  10. Old Comment

    Collection of random small tricks

    I just had to test this out out of curiosity. Worked for me in AntiX 15.
    I had installed youtube-dl during my install process. Using Debian Jessie.

    http://www.imagebam.com/image/b2ffbf438020349
    Posted 09-27-2015 at 01:09 PM by rokytnji rokytnji is offline
  11. Old Comment

    [solved?] New GTK2 bug? Maybe it's a QtCurve bug. Theme changes randomly

    deleted -- added to the body of the post as an edition. I had the impression I couldn't edit anymore after a short time, but it's not so.
    Posted 09-07-2015 at 02:29 AM by the dsc the dsc is offline
    Updated 09-07-2015 at 02:36 AM by the dsc
  12. Old Comment
    Posted 09-01-2015 at 08:39 PM by the dsc the dsc is offline
    Updated 09-07-2015 at 02:35 AM by the dsc
  13. Old Comment

    [solved] HTML5 Youtube with no video on Firefox/Iceweasel, in Debian testing/Stretch

    It's still possible to activate the gstreamer-related thing on firefox and have HTML5 video working on youtube. But you got to uninstall some gstreamer-related packages. I don't remember which ones I've uninstalled, but my list of installed gstreamer-related things is:

    gstreamer-codec-install
    gstreamer-tools
    gstreamer0.10-alsa:amd64
    gstreamer0.10-audiosink
    gstreamer0.10-audiosource
    gstreamer0.10-gconf:amd64
    gstreamer0.10-gnomevfs:amd64
    gstreamer0.10-hplugins
    gstreamer0.10-lame
    gstreamer0.10-nice:amd64
    gstreamer0.10-packagekit
    gstreamer0.10-plugins-bad:amd64
    gstreamer0.10-plugins-bad-multiverse
    gstreamer0.10-plugins-base:amd64
    gstreamer0.10-plugins-farsight
    gstreamer0.10-plugins-good:amd64
    gstreamer0.10-plugins-good-doc
    gstreamer0.10-plugins-really-bad
    gstreamer0.10-plugins-ugly:amd64
    gstreamer0.10-pulseaudio
    gstreamer0.10-schroedinger
    gstreamer0.10-tools
    gstreamer0.10-videosink
    gstreamer0.10-videosource
    gstreamer0.10-visualization
    gstreamer0.10-x:amd64
    gstreamer0.10-x264
    gstreamer0.10-xvid
    gstreamer0.8-tools
    gstreamer1.0-alsa:amd64
    gstreamer1.0-audiosink
    gstreamer1.0-audiosource
    gstreamer1.0-ffmpeg
    gstreamer1.0-libav:amd64
    gstreamer1.0-nice:amd64
    gstreamer1.0-packagekit
    gstreamer1.0-plugins-bad:amd64
    gstreamer1.0-plugins-base:amd64
    gstreamer1.0-plugins-base-apps
    gstreamer1.0-plugins-good:amd64
    gstreamer1.0-plugins-ugly:amd64
    gstreamer1.0-pulseaudio:amd64
    gstreamer1.0-tools
    gstreamer1.0-videosink
    gstreamer1.0-videosource
    gstreamer1.0-visualization
    gstreamer1.0-x:amd64
    libgstreamer-plugins-bad0.10-0:amd64
    libgstreamer-plugins-bad1.0-0:amd64
    libgstreamer-plugins-base0.10-0:amd64
    libgstreamer-plugins-base0.10-0:i386
    libgstreamer-plugins-base1.0-0:amd64
    libgstreamer-vaapi1.0-0:amd64
    libgstreamer0.10-0:amd64
    libgstreamer0.10-0:i386
    libgstreamer1.0-0:amd64
    libgstreamermm-1.0-0:amd64
    libqt5gstreamer-1.0-0:amd64
    libqtgstreamer-0.10-0:amd64
    libqtgstreamer-1.0-0:amd64
    libqtgstreamerutils-0.10-0:amd64
    libqtgstreamerutils-1.0-0:amd64
    libreoffice-avmedia-backend-gstreamer
    phonon-backend-gstreamer:amd64
    phonon-backend-gstreamer-common:amd64
    phonon4qt5-backend-gstreamer:amd64
    totem-gstreamer



    (dpkg-query -f '${binary:Package}\n' -W '*gstreamer*' -- to search installed packages on a debian system, su/sudo isn't required, or wasn't, to me)
    Posted 09-01-2015 at 03:36 AM by the dsc the dsc is offline
  14. Old Comment
    Posted 09-01-2015 at 03:31 AM by the dsc the dsc is offline
    Updated 09-07-2015 at 02:35 AM by the dsc
  15. Old Comment

    Awk line to convert [HH]:MM:SS to seconds

    Quote:
    Originally Posted by Skaperen View Comment
    so what if the input does not have seconds?
    Funnily enough, if it's just a single number without ":", it takes it as hours.

    The input can have no seconds as long as it's at least "[M]M:[0]0" -- or even just "M:".
    Posted 08-30-2015 at 04:00 PM by the dsc the dsc is offline
    Updated 08-30-2015 at 04:30 PM by the dsc
  16. Old Comment

    Awk line to convert [HH]:MM:SS to seconds

    so what if the input does not have seconds?
    Posted 08-24-2015 at 08:01 AM by Skaperen Skaperen is offline
  17. Old Comment

    "Systemd sometimes doesn't shutdown" -- collecting links and info

    Eventually it ceased to occur, it seems. I wonder if everybody is still hating systemd as much or even more.
    Posted 06-25-2015 at 01:07 PM by the dsc the dsc is offline
  18. Old Comment

    Rough script that waits until processes finish their businesses, then exit

    I think that /dev/shm is quite handy and more appropriate for some temporary files, even more so for temporary files with no actual data, like in this case. It's both faster in itself (at least than hdd) and by reducing writes to the hdd it also will leave the hdd free to only work on writes that really matter. My old hdds are unbearably slow, so, even if I couldn't really measure the difference (and I never rally bothered to), I'd avoid writing things that don't really need to be written, just on principle.

    Or, almost that. There are a few people who actually have scripts that will copy the whole "./config/webbrowser/profile" folder to /dev/shm while it's in use, and update it back to the hdd with rsync when they close the browser. But I don't do that, mostly because I'm also somewhat short on RAM. I thikn arch linux even has this script packaged.



    But I speak as a more or less single-user (non root) desktop perspective, for server/real system administrators, the thing may really be very, very wrong, for some good reason I can't really imagine right now.
    Posted 06-23-2015 at 10:58 PM by the dsc the dsc is offline
  19. Old Comment

    Rough script that waits until processes finish their businesses, then exit

    Hi, your choice of work directory being /dev/shm... is strange. The only places I consider safe to write user data is /home/$USER or /tmp. /dev is, let's call it a reserved directory, don't put stuff there as a general rule.
    Posted 06-17-2015 at 01:32 AM by rhubarbdog rhubarbdog is offline
  20. Old Comment

    Fixing the annoying firefox' associations issue once and for all

    Annoying Firefox' associations issue II, the return

    The file manager association seems to be because of a combination of a Dbus-method that is more or less Gnome-specific/not widely adopted elsewhere, and a myriad of possible locations of xdg-mime config files.

    For the Dbus part one may need do rename/delete a file called "org.freedesktop.FileManager1.service" located at /usr/share/dbus-1/services/ and $HOME/.local/share/dbus-1/services.

    It's a ".desktop" kind of thing, I originally thought I could edit it and put konqueror in the "exec" part, but it seems it's not compatible, or maybe that the whole xdg thing was what was really going on, even though it didn't look that way.

    The deal with the xdg system is that there can be config files everywhere.

    Here's a list, from ArchWiki:

    Code:
    $HOME/.config/$desktop-mimeapps.list 	user overrides, desktop-specific
    $HOME/.config/mimeapps.list 	user overrides
    /etc/xdg/$desktop-mimeapps.list 	sysadmin and vendor overrides, desktop-specific
    /etc/xdg/mimeapps.list 	sysadmin and vendor overrides
    $HOME/.local/share/applications/$desktop-mimeapps.list 	for compatibility but now deprecated, desktop-specific
    $HOME/.local/share/applications/mimeapps.list 	for compatibility but now deprecated
    /usr/local/share/applications/$desktop-mimeapps.list and
    /usr/share/applications/$desktop-mimeapps.list 	distribution-provided defaults, desktop-specific
    /usr/local/share/applications/mimeapps.list and
    /usr/share/applications/mimeapps.list 	distribution-provided defaults
    I'm not 100 sure but I think I even had konqueror as the output of some "xdg-query" command that would tell me the association for folders, but, regardless, firefox would open folders with pcmanfm, if it was installed.

    What I hadn't noticed was that I actually had the $HOME/.config/mimeapps.list, which funnily enough had only the pcmanfm settings. All the others are set on $HOME/.local/share/applications, and the file over there even has both the directory lines, set to KFM.

    For whatever reason the file at .config takes precedence over the other, at the same time it's not apparent on whatever command that would tell me the settings (but again, I'm not 100% sure on that, if I did that it was months ago, before I gave up).


    The end...

    ...or is it?
    Posted 05-03-2015 at 08:45 PM by the dsc the dsc is offline
    Updated 05-03-2015 at 08:48 PM by the dsc

  



All times are GMT -5. The time now is 12:45 PM.

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