Reputation
729
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
6 13
Impact
~31k people reached

  • 0 posts edited
  • 0 helpful flags
  • 670 votes cast
Apr
24
comment How do I create a blank PDF from the command line?
I just read through the link above in detail. I didn't realize this was such a controversial issue. TL;DR - if you know what you're doing, then you just want the answer to the question you asked. If you're not so well versed, you may have asked the wrong question and clarification of what the real issue is could help.
Apr
24
comment How do I create a blank PDF from the command line?
@IainHolder - I'm not trying to pry into the OP's business! I just wanted to suggest that if it's something like what I was doing, then there's another way to do it. Often things like this are xy problems (meta.stackexchange.com/questions/66377/what-is-the-xy-problem), so asking what the goal is can be quite appropriate.
Apr
22
comment How do I create a blank PDF from the command line?
Why do you need it? I have a printing package for emulating two-sided (duplex) printing on non-duplex printers. Doing this requires putting out an extra blank page when printing the even numbered pages for a job that has an odd page count. To do this, I just send a formfeed to lp. That does the trick without creating a blank page file, etc..
Mar
18
comment What is the token identifier of `]`?
Nice for spelling out why the white space is necessary.
Feb
10
awarded  Popular Question
Jan
30
awarded  Revival
Jan
23
comment Write output of `time` in a file, why are parentheses needed?
+1 nice explanations
Jan
13
awarded  Notable Question
Dec
18
comment Why do my xmodmap binds involving AltGr only work one some keys?
No idea exactly what's going on, but if you haven't done so already, you might want to run xev and press the various key combinations to see if the hardware and up to the Xwindows level is getting distinguishable keypresses to start with.
Nov
13
comment Is there any manual page for colored shell output?
See wynnnetherland.com/journal/… for a bunch of useful info including the grc package which can do all sorts of colorizing things with command output.
Nov
13
comment How to untar safely, without polluting the current directory in case of a tarbomb?
FYI: Found it at sourceforge.net/projects/patool . It's an rpm and I used alien to convert it to a deb for Ubuntu.
Oct
23
comment Programmatically change the attributes of desktop icons
Don't know Cinnamon, but does it have any option to lock the icons on your desktop (like KDE does)? That would probably fix it, if it exists. I get really annoyed when something scrambles my icons which I have carefully placed just where I want them! Is there a way to put new device icons in a folder (or somewhere else) instead of directly on the desktop? That would fix it too.
Oct
23
comment What causes a copy/paste in terminal to sometimes execute the command?
Sort of related: I have ended up with some file names with newlines in them caused by copy and pasting text from a web page into a file rename dialog. A file name like that can break lots of things. You really have to be careful when you copy and paste anything.
Oct
19
comment When would you use an additional file descriptor?
I know this isn't a new answer, but I had to stare at this quite awhile to see what it does and thought it would be helpful if someone added an example of this function being used.This one echos and captures the whole output of a command - df, in this case. dl.dropboxusercontent.com/u/54584985/mytest_redirect
Oct
17
comment The Linux kernel: breaking user space
@FaheemMitha "obvious" is in the eye of the beholder. If you have worked on a system (any system) for a long time, many things are obvious to you that would not necessarily be obvious to someone else. And almost everyone has their own ideas on how to do things and what makes sense. It's more of a human nature (and, sometimes, ego) thing than something specific to any particular endeavour.
Oct
3
comment Confine the directories in which a script will act
Like @JJoao says, a script like this is dangerous at best. It needs a lot of error testing and more complete paths to be remotely safe. And, I don't even want to think about what could happen if some of your directory/subdirectory names have spaces in them since the variables aren't quoted! I've never used it, but there is a chroot command that would help, but rewriting the script would be much better.
Sep
26
comment sudo script - best practice?
If you later use your script in a pipe or run it from a gui, then stdin/stdout probably won't be connected to your terminal/screen. That's why I often use kdesudo (gksudo) instead. Putting sudo outside the script doesn't fix this, but you find out if it's a problem sooner.
Sep
26
comment How can X11 shortkeys be captured by a Python program?
You might want to take a look at AutoKey. It's essentially a large Python program which does things like this and more. github.com/autokey/autokey
Sep
26
comment How does Linux know which USB hard drive is which?
UUIDs are great and work as noted in the answers. But, they are not human friendly. Whenever I create partitions (anywhere), I give them unique human readable labels that make sense to me. This is especially helpful when writing backup scripts dealing with several drives. You don't want to get a source and destination reversed by accident! Also, whenever you reformat a partition, it gets a new UUID and you have to edit anything that used that UUID, whereas you can still use the same label as before and not have to change anything.
Aug
31
answered Manual Duplex printing