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

    Apparently Opera no longer wants you to have system-style title-bar and borders, but "devil's pie" allows you to

    It was by far my favorite browser for a long while. The interface could be customized in virtually any way wanted (functional ways, not just skins -- from the "core" UI to context menus), you could create "add ons" of many sorts (there was a fan/user-site that had dozens of bookmarklet-like things you could just drag-and-drop into your GUI, also an official community with bloggers sharing their own custom stuff), and then there were those "default-custom" CSSs that you could easily apply to any site (maybe not that useful today as CSS implementations will more often differ more from basic standards, but nowadays it's at least like a built-in "stylus" extension). It was kind of the "openbox"/"fluxbox" version of a web-browser, and it was also the fastest, or almost.

    May have been the first browser to have tabs!

    I initially hoped "Chropera" would have the same kind of GUI "philosophy" with only Chrome's web-engine, but unfortunately it's almost the opposite direction.

    I think there are some minimalist, GUI-less browsers that perhaps can be configured similarly, maybe even added GUIs like Opera, but I haven't really checked or seen anything like that being done. And from the little I've checked they seem unfortunately slow.
    Posted 07-31-2020 at 01:03 PM by the dsc the dsc is offline
    Updated 07-31-2020 at 01:09 PM by the dsc
  2. Old Comment
    Posted 06-15-2020 at 01:10 PM by GazL GazL is offline
  3. Old Comment

    PCManFM-qt has become pretty much a complete replacement for Dolphin/Konqueror

    I actually prefer a single "view" mode to be default for all folders and only change temporarily.

    I wish many programs would have a "wizard" on first run asking for some basic options that users are likely to find annoying if they're different from what they're used to.

    As much as I like most KDE stuff, I hate the single click to run or open things, which is the default.
    Posted 01-12-2020 at 04:15 PM by the dsc the dsc is offline
  4. Old Comment

    PCManFM-qt has become pretty much a complete replacement for Dolphin/Konqueror

    I've been using PCManFM as my main file manager for a long time now. The "preserve this folder's settings" option did it for me. Great piece of software.
    Posted 12-31-2019 at 11:13 AM by Lysander666 Lysander666 is offline
  5. Old Comment
    Posted 12-06-2018 at 11:33 PM by ThinkerLinux ThinkerLinux is offline
  6. Old Comment
    Posted 05-29-2017 at 06:08 AM by Kefijoo Kefijoo is offline
  7. Old Comment
    Posted 04-27-2017 at 07:07 PM by astrogeek astrogeek is offline
  8. Old Comment

    Apparently [[ *"$a"* == $b ]] is DIFFERENT from [[ $b == *"$a"* ]]

    Quote:
    Originally Posted by astrogeek View Comment
    [...]

    By associativity, $b is evaluated first, it is "foo/bar/gee". Then the thing on the right *"foo/bar"* is evaluated and tested for equality with the thing on the left. "foo/bar" inside something else (i.e. with optional leading or trailing characters) is indeed equal to "foo/bar/gee".

    Hope this helps!

    It definitely does! It's a shame I can't upvote blog comments, apparently.
    Posted 04-27-2017 at 05:57 PM by the dsc the dsc is offline
  9. Old Comment

    Apparently [[ *"$a"* == $b ]] is DIFFERENT from [[ $b == *"$a"* ]]

    Actually, that is not odd at all, and yes they are two totally different tests.

    The result is due to ordinary associativity and precedence rules. (About fifth grade concepts ). The equality test is left associative - it evaluates the left side first, then compares the right side to what was on the left (it has to start somewhere!).

    The first test is actually "a equals b", not "b contains a" as your printed string says.

    This is because the equal test is left associative - the thing on the left is evaluated first, then the thing on the right is tested for equality to it.

    The thing on the left is *"$a"*, or $a within something else... but the something else here is null, so it is just "$a", or "foo/bar". Then the thing on the right $b is evaluated for equality with exactly that, "foo/bar", and "foo/bar/gee" is indeed not equal to that!

    The second test is different, "b equals (a with optional leading and trailing characters)".

    By associativity, $b is evaluated first, it is "foo/bar/gee". Then the thing on the right *"foo/bar"* is evaluated and tested for equality with the thing on the left. "foo/bar" inside something else (i.e. with optional leading or trailing characters) is indeed equal to "foo/bar/gee".

    Hope this helps!
    Posted 04-27-2017 at 05:54 PM by astrogeek astrogeek is offline
  10. Old Comment

    Apparently [[ *"$a"* == $b ]] is DIFFERENT from [[ $b == *"$a"* ]]

    Yikes. I feel your pain. I use bash every day but I just don't trust it to be consistent in its syntax. I think I understand something in bash and then ... it does something squirrely and unexpected.
    Posted 04-26-2017 at 05:32 PM by jr_bob_dobbs jr_bob_dobbs is offline
  11. 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 06:13 AM by Keith Hedger Keith Hedger is offline
  12. 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 03:54 AM by goumba goumba is offline
  13. 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 03:55 PM by the dsc the dsc is offline
  14. 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 09:09 AM by Keith Hedger Keith Hedger is offline
  15. 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 07:33 PM by the dsc the dsc is offline
    Updated 09-27-2016 at 08:16 PM by the dsc
  16. 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 09:30 AM by goumba goumba is offline
    Updated 09-27-2016 at 09:44 AM by goumba
  17. 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 08:01 AM by the dsc the dsc is offline
  18. 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 08:27 PM by Habitual Habitual is offline
  19. 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 04:07 PM by the dsc the dsc is offline
    Updated 04-21-2016 at 04:59 PM by the dsc
  20. Old Comment
    Posted 04-21-2016 at 06:09 AM by Habitual Habitual is offline

  



All times are GMT -5. The time now is 02:59 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
Open Source Consulting | Domain Registration