LinuxQuestions.org
Review your favorite Linux distribution.
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

    mimeopen: a nice tool to setup default applications

    xdg-open will ise the native desktop tools to open files if the desktop is detectable, eg exo-open when using xfce.
    Posted 11-20-2016 at 07:13 AM by Keith Hedger Keith Hedger is offline
  2. Old Comment

    mimeopen: a nice tool to setup default applications

    Thanks. I'll look into this, rather than xdg-open for my Openbox pipe menus. Maybe it will make sharing them easier. xdg-open works for me, never ran into any issue Keith has (I use Openbox, no DE) but then again I guess some application I have installed may have pulled in what makes it work.
    Posted 11-20-2016 at 04:54 AM by goumba goumba is offline
  3. Old Comment

    mimeopen: a nice tool to setup default applications

    I think that fairly recently I've had problems with file associations, but unfortunately I had forgotten about this tool then, and sorted it out in a much more annoying and clumsy manner, whatever it turned out to be.
    Posted 11-17-2016 at 04:55 PM by the dsc the dsc is offline
  4. Old Comment

    mimeopen: a nice tool to setup default applications

    mimetype and mimeopen work so much better than xdg-open, especially as i run a custom DE, xdg-* only really supports kde/gnome/xfce
    Posted 11-12-2016 at 10:09 AM by Keith Hedger Keith Hedger is offline
  5. Old Comment

    Poor, but acceptable, work-around to the lack of image previews for XCF and ORA (maybe other formats as well)

    Thanks. It's ImageMagick. I haven't tried GraphicsMagick that yet, but the problem with some non-GIMP XCF-to-something conversion methods is that they often won't deal correctly with transparencies, creating images with some 100% black rectangular areas, sometimes obscuring stuff that was supposed to be visible.
    Posted 09-27-2016 at 08:33 PM by the dsc the dsc is offline
    Updated 09-27-2016 at 09:16 PM by the dsc
  6. Old Comment

    Poor, but acceptable, work-around to the lack of image previews for XCF and ORA (maybe other formats as well)

    I see you're using convert for the ORA previews, so I guess you are using GraphicsMagick? At least on Sid, GM supports XCF.

    If so, give this one a shot:

    Code:
    convert -layers merge -quality 72 ${1} ${however_you_want_to_name_preview}
    would perhaps knock down your script to :

    Code:
    function make_thumbnail() {
        new_filename=${1/./_}_preview.png
        convert_flags="-layers merge -quality 72"
        case ${1##*.} in
            ora)
                # Check ORA version and proceed...?
                unzip -p ${1} mergedimage.png | convert png:- ${convert_flags} ${new_filename}
                ;;
            xcf)
                convert ${convert_flags} ${1} ${new_filename}
                ;;
        esac
    }
    Of course you don't need to make it a function, but doesn't hurt either if you want to add it to a larger library later on.
    Posted 09-27-2016 at 10:30 AM by goumba goumba is offline
    Updated 09-27-2016 at 10:44 AM by goumba
  7. Old Comment

    [MYSTERY SOLVED] What does "echo ???????????????" really do?

    It would probably have been more obvious if I hadn't had the impression that it was somehow echoing history entries, for some reason.
    Posted 04-28-2016 at 09:01 AM by the dsc the dsc is offline
  8. Old Comment

    [MYSTERY SOLVED] What does "echo ???????????????" really do?

    erm,
    I don't know why that didn't "click" earlier.

    Glad it worked out.
    Posted 04-21-2016 at 09:27 PM by Habitual Habitual is offline
  9. Old Comment

    [MYSTERY SOLVED] What does "echo ???????????????" really do?

    Code:
    18:07 dsc / $ \echo ????
    boot home proc root sbin
    (Didn't know this inverted dash shorthand for the non-aliased executable, cool)

    Just noticed something similar happens even with printf, with a less "parsed" output (no newlines, as usual), and somewhat different as well:

    Code:
    18:12 dsc / $ printf ????
    boot18:12 dsc / $ 
    18:12 dsc / $ \printf ????
    boot18:12 dsc / $ 
    18:12 dsc / $

    And also with plain bash (I guess):

    Code:
    18:43 dsc / $ bash --norc
    bash-4.3$ echo ????
    boot home proc root sbin
    bash-4.3$

    Eventually I'll boot on Debian to see if it does the same.

    Still on Ubuntu Wily, the mystery-folder/file through "?????" is also present in other commands, such as ls:

    Code:
    18:57 dsc / $ echo ???
    bin dev etc lib mnt opt run smb srv sys tmp usr var
    18:57 dsc / $ ls -1 ???
    bin:
    bash
    bunzip2
    bzcat
    
    [...]
    Posted 04-21-2016 at 05:07 PM by the dsc the dsc is offline
    Updated 04-21-2016 at 05:59 PM by the dsc
  10. Old Comment
    Posted 04-21-2016 at 07:09 AM by Habitual Habitual is offline
  11. Old Comment

    Opera Presto had the best GUI ever. Ever.

    Quote:
    It is still the open code Apple put out a long time ago. everyone just gives it a new name.
    Including Apple whom originally forked it from KDE's KHTML.


    I've been trying out the beta of Vivaldi and so far I like what I see.It's kind of what I was expecting from Opera when they first announced that they would be switching to webkit/blink, but unfortunately Opera decided to abandon their existing user base and go in a completely different direction with the new Opera Browser.

    I won't be returning to an Opera product: they've burnt that bridge. What I'm not sure of yet is whether I want to become invested in another proprietary solution (Vivaldi) given the lessons learnt from what happened with Opera/Presto and more recently Google's decision to kill off 32bit Chrome. "Once bitten..." and all that.
    Posted 03-24-2016 at 06:41 AM by GazL GazL is offline
  12. Old Comment

    Opera Presto had the best GUI ever. Ever.

    As a long time user of Opera presto I strayed after support was dropped. Today I downloaded the RPM and used slackware rpm2tgz and installed it.
    I am back as a opera user. I spend many hours building the chromium CEF3 webkit and looking at opera source code it seems these developers understand the needs of a browser. I love my speed dial. TY Opera for going open source all the way.
    Google forked webkit and called it something new. It is still the open code Apple put out a long time ago. everyone just gives it a new name.
    and started using the ppapi client. that is a wrapper.
    I think I will put a slackware build together when I have time.
    Posted 03-23-2016 at 05:08 PM by Drakeo Drakeo is offline
  13. Old Comment

    Parsing script arguments in bash, without getopt(s)

    While I agree with the above, I use something similar to #1 if for some reason I want to avoid getopts. Instead of testing the number of arguments remaining, I test the value of $1.

    I don't understand why the author of the second "solution" chose to shift within every condition. using shift at the end of the loop like the first to me would be less error prone (what if you add an argument, and forget to add shift?).
    Posted 03-20-2016 at 02:00 PM by goumba goumba is offline
  14. Old Comment

    Parsing script arguments in bash, without getopt(s)

    Using '=' to separate a short-option from its argument, or using a space to separate a long-option from its argument are non-standard and best avoided. I wouldn't recommend either of the above solutions in their current form.
    Posted 03-14-2016 at 09:08 AM by GazL GazL is offline
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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

  



All times are GMT -5. The time now is 10:21 AM.

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