Latest LQ Deal: Linux Power User Bundle
Go Back > Blogs > linux-related notes
User Name


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

    [bash] "keep trying" command, even if exits with error, for at least 10 times

    Just another not-so-different approach:

    if [[ $1 =~ $num ]] ; then
    for ((n=0;n<max;n++)) ; do
    trystr="$trycmd || $trystr" ; done
    eval $trystr
    It's basically an automation of just copying the same command several times, separated by "||", which is also a crude way to do the same thing without the "until $? -eq 0" loop thing.

    By default it will try 5 times, but the first parameter may be a desired number of attempts.

    I don't know how well it will handle commands with quotes and such things. If there's more than one word in the command it needs to be between quotes. Like

    try 5 "wget -c"
    Posted 04-03-2015 at 11:17 PM by the dsc the dsc is offline
  2. Old Comment

    Fixing the annoying firefox' associations issue once and for all

    I can't get firefox to have konqueror/kfmclient to be associated with "open folder", if pcmanfm is installed. That's quite annoying.
    Posted 03-11-2015 at 04:09 PM by the dsc the dsc is offline
  3. Old Comment

    mpd/mpc is always a headache

    I'll check it out, thanks.

    I've also considered sort of making my own "daemon" with some single command line player, but usually it happened just before figuring out some way of making MPD/MPC work.

    And speaking of audio-related things to check out, I think I've just found recently a console UI for youtube, but I haven't checked yet: "mpsyt (1) - Terminal based YouTube jukebox with playlist management". It seems really great if you're just interested in the audio, even though perhaps it will open a window or play the video in the framebuffer, I don't know, but I'm hoping there's a audio-only option.

    Mostly a note to myself now, just because I'm too lazy to edit the OP: By the way, perhaps currently it's working in one install and not in other because the working version is a pinned previous version, which I didn't remember. May or may not have something to do with the troublesome version being compiled with "libwrap" or something, according to Arch linux forums. So in the future, if I'm still using Debian, and see myself needing to update it, maybe I should compile an update version without this option-thing, if it still doesn't work.
    Posted 02-07-2015 at 10:31 PM by the dsc the dsc is offline
    Updated 02-07-2015 at 10:35 PM by the dsc
  4. Old Comment

    mpd/mpc is always a headache

    Many slackers like MOC (Music On Console), you might want to give that a look. I used to use mpd/mpc and was really happy with it, never had any issues running it at all, but it was overkill for what I needed.

    These days, I've gone completely minimal/retro and just use 'play' from the 'sox' suite of sound utils.

    Posted 02-07-2015 at 09:59 AM by GazL GazL is offline
  5. Old Comment

    Chropera seems to behave a little bit better than Chrome/ium

    The way I understood, the whole thing of creating a GUI for some of those browsers (one or two specifically that are/is sort of intended to be used that way) doesn't really require much "skill" per se, or... well, at least just the sort of "skill" required to edit openbox' menu.xml and add pipe menu scripts and such things. Not like being a programmer or anything, but it does require reference to the "syntax" of the whole thing. Or at least that's the impression that I got from descriptions I've read, but I haven't yet seem any sort of following/community-sharing of customized GUIs, like there is for openbox (and like there was for Opera, even though it was mostly made from the GUI itself).

    The browser I thought was "m3o" is actually "dwb".
    Posted 02-01-2015 at 12:35 AM by the dsc the dsc is offline
  6. Old Comment

    Chropera seems to behave a little bit better than Chrome/ium

    Kinda on and off topic at the same time. On my 64bit Linux installs, I run Opera-Developer and am quite happy doing so. I am not as old school techy as you guys. So I cannot miss what I do not know about. I posted what my opera can do in this thread.

    Now for the off topic stuff since it does not really concern browsers at all.
    I have been a Linux user for some time. A Distro team member. In other words. I can maneuver comfortably installing Gnu/Linux and running it on any hardware short of a

    I have been purchasing touchscreen atom n270 netbooks with 1 gig of ram and 60 gig zif platter hard drives. For under 50 bucks.
    I have the earlier model. Non Touchscreen. N270 atom versions with 1 gig of ram and 30 gig zif platter hard drives.
    All working and run good.

    I am selling the non touch screens in my small town to cover getting the newer touch screen netbook costs, so I get them for free with some change left over.
    I sold one with XP SP3 in 20 minutes after putting the ad out. The next day someone else called asking for the other which had Windows 7 Ultimate on it.

    The dude looking at the netbook thought Windows 7 with 1 gig of ram a little weak and decided to pass. That and everyone wants something for nothing.
    So. I know I cannot sell these in my small town with Linux on them. I could do a XP SP3 install on the other one.
    But I have another idea.

    Maybe making it a Android/ChromeOS type netbook might make a better selling point with this younger generation.
    So my next plan is to

    Sorry, if I highjacked your blog. Tell a mod to delete if it is a PITA reply.

    I run UZBL as a backup browser in my AntiX testing installs because it renders images and videos in terminal.
    It pulls in a little more ram and cpu than I thought it would.
    Netsurf is OK. But I'd rather fly with Dillo 2.2.

    Only thing I use any thing Named Chrome for is My Chromebook operating system and ISOs. I do not like the browser by itself so much when there are lots of choices.
    Too each their own though. As far as

    where theoretically one could create a GUI and other stuff through some config files and auxiliary scripts or apps
    I am somewhat skilled. But that is outside of my skill set.
    Posted 01-31-2015 at 08:22 AM by rokytnji rokytnji is offline
  7. Old Comment

    Chropera seems to behave a little bit better than Chrome/ium

    But it seems that they're slowly re-operaifying the UI, somewhat. At least it was even more of a Chrome clone a few versions ago (back with the first Linux version), now it already looks more like the default Opera 12 or some of the last Prestos, one of the versions with a minimalistic GUI, as opposed to earlier ones which tended to be cluttered.

    In the other hand they have an entirely new bookmark management thing that I didn't like at all, so it seems that their goal isn't necessarely to recreate the old GUI, but to create another one.

    There are some browsers on linux that I think that theoretically could be somewhat like "replacements" for Opera, regarding the ultra-customizable GUIs. UZBL is the one whose name I remember, but there are some others called something like m3o (I think there's a number, probably "3", amidst a two or three letters), hbro, and surf. I think they or some of them follow a openbox-like philosophy, where theoretically one could create a GUI and other stuff through some config files and auxiliary scripts or apps. But I never really got around to try to make something.
    Posted 01-28-2015 at 11:23 PM by the dsc the dsc is offline
  8. Old Comment

    Chropera seems to behave a little bit better than Chrome/ium

    I wish they managed to keep the web-browsing core of Chrome but recreated the incredible, incomparable, hyper-ultra-uber-customizable in all functional aspects GUI of the Opera-Presto (RIP).
    That was what I was expecting when they first announced the switch to webkit/blink. Oh well, guess we're just not allowed to have 'nice things'.
    Posted 01-28-2015 at 07:41 AM by GazL GazL is offline
  9. Old Comment

    Per-application bookmarks on GTK's file dialog?

    I'll try to remember to try it. I recall that on some GTK file dialogs I'd try to type for "something" (like writing the file name or searching on the current folder) but then "something else" would happen. If I recall it was a search/filter on the current folder, but I also have a faint recollection that you could click somewhere and a location field would show up where "location icons/labes" are.

    It would be really nice if all the linux/unix stuff had a way to easily alternate between a set of uniform behaviors and hotkeys/shortcuts. Like setting "global-shortcut-mode=KDE" somewhere in /etc, and then automatically GTK file dialog would "look and feel", behave, more like KDE's (or vice versa, if that's set) nano would search by control+f and save by control+s. I'm quite often switching these and other shortcuts on nano and kwrite/kate.

    But that's probably a pipe dream.

    The old Opera browser had something similar, though, you could set as an option which file dialog it would use. Perhaps that's a more likely possibility, but even then I don't see that happening. Perhaps most users are comfortable with a non-frankensteinian suit of apps, only KDE, GTK or something else, enough that it's not so much a concern.
    Posted 12-28-2014 at 12:42 PM by the dsc the dsc is offline
  10. Old Comment

    Per-application bookmarks on GTK's file dialog?

    Well, as far as typing the path, you can. The path field isn't immediately visible. When the Open dialog appears, just start typing the path, and a box will automatically pop up.
    Posted 12-24-2014 at 04:17 AM by goumba goumba is offline
  11. Old Comment

    Per-application bookmarks on GTK's file dialog?

    I really feel bad to rant about these things, after all, it's an entire OS and a suit of applications basically for free. I'm certainly more thankful than annoyed, overall, but the odds are that I'll more often manifest my annoyance.

    But some things... like "open with", on GTK/Gnome... it's unbelievable. It's 2014, for dog sake, and they make you navigate to find the actual binary to make the association (or run once), as if $PATH didn't exist. At least it was still like that not long ago. And if I recall you can't even write the full path, if you happen to know it -- it probably doesn't even have a path field. You have to navigate.
    Posted 12-24-2014 at 02:47 AM by the dsc the dsc is offline
    Updated 12-24-2014 at 02:48 AM by the dsc
  12. Old Comment

    Per-application bookmarks on GTK's file dialog?

    Why don't you drop a line to the GTK devs? Then again... we all know how they've been listening to their users.
    Posted 12-23-2014 at 05:11 AM by goumba goumba is offline
  13. Old Comment
    Posted 08-18-2014 at 03:09 PM by the dsc the dsc is offline
  14. Old Comment

    [bash] "keep trying" command, even if exits with error, for at least 10 times

    Hey I had to give this one a shot on trying to get it to work for n tries, came up with a promising result, if interested.

    Heck, I posted it, if you'd like:
    Posted 08-09-2014 at 04:08 AM by goumba goumba is offline
    Updated 08-12-2014 at 11:57 PM by goumba
  15. Old Comment

    Liquorix kernel seems more responsive than Debian's default

    I'm just happy this even boots on this P3 IBM T23 and supports everything I have plugged into it.

    $ inxi -Fxz
    System:    Host: biker Kernel: 3.14.3-dreamlinux-liquorix i686 (32 bit gcc: 4.6.2) 
               Desktop: Fluxbox 1.3.2 
               Distro: antiX-13_386-full Luddite 01 June 2013 
    Machine:   Mobo: IBM model: 26474MU
               Bios: IBM v: 1AET64WW (1.20 ) date: 10/18/2006
    CPU:       Single core Mobile Intel Pentium III - M (-UP-) cache: 512 KB
               flags: (pae sse) bmips: 2397 clocked at 1197 MHz
    Graphics:  Card: S3 SuperSavage IX/C SDR bus-ID: 01:00.0
               Display Server: X.Org 1.12.4 drivers: savage (unloaded: fbdev,vesa)
               Resolution: 1024x768@60.0hz
               GLX Renderer: Gallium 0.4 on softpipe
               GLX Version: 2.1 Mesa 8.0.5 Direct Rendering: Yes
    Audio:     Card Intel 82801CA/CAM AC'97 Audio Controller 
               driver: snd_intel8x0 ports: 1c00 18c0 bus-ID: 00:1f.5 
               Sound: ALSA v: k3.14.3-dreamlinux-liquorix
    Network:   Card-1: Intel 82801CAM (ICH3) PRO/100 VE (LOM) Ethernet Controller
               driver: e100 v: 3.5.24-k2-NAPI port: 6400 bus-ID: 02:08.0
               IF: eth0 state: down mac: <filter>
               Card-2: Ralink RT2800 802.11n PCI
               driver: rt2800pci v: 2.3.0 bus-ID: 07:00.0
               IF: wlan1 state: up mac: <filter>
    Drives:    HDD Total Size: 80.0GB (31.1% used)
               ID-1: /dev/sda model: ST980815A size: 80.0GB
    Partition: ID-1: / size: 73G used: 23G (33%) fs: ext4 dev: /dev/sda1 
               ID-2: swap-1 size: 1.12GB used: 0.00GB (0%) fs: swap dev: /dev/sda2 
    Sensors:   System Temperatures: cpu: 51.0C mobo: 50.0C 
               Fan Speeds (in rpm): cpu: 4870 
    Info:      Processes: 109 Uptime: 1:05 Memory: 423.9/1006.6MB 
               Init: SysVinit runlevel: 5 Gcc sys: 4.7.2 
               Client: Shell (bash 4.2.371) inxi: 2.1.28
    Posted 06-06-2014 at 07:25 PM by rokytnji rokytnji is offline
  16. Old Comment

    Commanding openbox through scripts or command line

    I think "xdotool" would probably be better than acpi_fakekey for this. Doesn't require su/sudo.

    I'm not sure both do exactly the same thing and I don't remember anymore what prompted this "need", and if I'm still using acpi_fakekey for something.
    Posted 03-14-2014 at 07:44 PM by the dsc the dsc is offline
  17. Old Comment

    Dealing with file names (oddly) starting with an hyphen

    Hey, thanks for the tip.

    This works for many (if not all) of the standard GNU file utils such as cp, rm, touch, etc.
    Posted 12-02-2013 at 08:35 AM by goumba goumba is offline
  18. Old Comment
    Posted 11-19-2013 at 05:54 PM by vmccord vmccord is offline
  19. Old Comment

    Solved: "mount error: could not resolve address for <hostname>. No address associated with hostname"

    To get the job work, you also need to:
    sudo apt-get install winbind
    Posted 03-10-2013 at 11:11 AM by bzhao bzhao is offline
  20. Old Comment

    Batch-fixing symlink targets

    This works like a charm; took just a second processing in a directory with a few dozen broken symlinks :-))
    Thank you the_dsc for sharing your knowledge.
    Posted 12-11-2012 at 09:25 AM by kozaki kozaki is offline


All times are GMT -5. The time now is 05:40 AM.

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