View the Most Wanted LQ Wiki articles.
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.
Uncategorized Entries with no category

Passing some mplayer options to smplayer from a script

Posted 12-18-2014 at 12:56 PM by the dsc (linux-related notes)
Updated 12-28-2014 at 06:22 PM by the dsc (fixing the method)

PS/edit.: renamed the title as it's really something that makes more sense from within scripts, not from the command line itself. Unless perhaps one makes a wrapper script that edits smplayer.ini with whatever parameters are set by command line and resets afterwards, while still somehow preserving smplayer's own syntax, if that's even possible.

Major edit:

Apparently the best way to go is to dinamically edit or switch/rename the smplayer.ini file, in the following...
Posted in Uncategorized
Views 599 Comments 0 the dsc is offline

There's a "compact" version of the Adwaita GTK3 theme

Posted 11-21-2014 at 05:14 PM by the dsc (linux-related notes)
Tags gtk3, rant

Just spreading the word, perhaps there are many other people who prefer things more tightly packed rather than all spaced out, as it seems to be the current mobile-UI infection/trend.

Who'd have guessed that resolutions superior to 1024x768 would end up being nullified by "advancements" in technology...
Posted in Uncategorized
Views 570 Comments 0 the dsc is offline

Not even linux can create symlinks on FAT32

Posted 11-05-2014 at 01:04 AM by the dsc (linux-related notes)

If you've only briefly dealt with NTFS on linux, you might have noticed that it's possible to create symlinks there, not like the fake "shortcuts", but actual symlinks, that linux read as such.

That may lead the naive mind to think that symlinks are a linux/OS-side feature, and that therefore linux could create symlinks on FAT32. But that's going to be proven wrong on the first attempt.

You can, however, have symlinks on non-FAT partitions pointing to a FAT...
Posted in Uncategorized
Views 346 Comments 0 the dsc is offline

Auxiliary script to rename multiple files adding a zero-padding to them

Posted 08-19-2014 at 12:37 AM by the dsc (linux-related notes)

From this blog:

num=`expr match "$1" '[^0-9]*\([0-9]\+\).*'`
paddednum=`printf "%03d" $num`
echo ${1/$num/$paddednum}
Usage example:

for i in *.png;do mv $i `./ $i`; done

Possibly there's some syntax to do just that only with the "rename" command, though.
Posted in Uncategorized
Views 453 Comments 0 the dsc is offline

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

Posted 08-08-2014 at 10:40 PM by the dsc (linux-related notes)
Updated 08-08-2014 at 10:42 PM by the dsc
Tags bash

A script that tries to run a given arbitrary command N times, or until it exits with success. The commented parts are aborted attempts to make it figure whether the first parameter is a number instead of a command, and that would be used as the maximum number of attempts. Something went wrong, sometime I'll try to figure it out.

# this program is stupid. It's declared to be in public domain by its author, who whishes to remain anonymous
Posted in Uncategorized
Views 311 Comments 3 the dsc is offline


All times are GMT -5. The time now is 05:26 PM.

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