Skip to main content
labyrinth's user avatar
labyrinth's user avatar
labyrinth's user avatar
labyrinth
  • Member for 12 years
  • Last seen more than 1 year ago
awarded
awarded
revised
Loading…
Loading…
Loading…
comment
screenshot only the active monitor on ubuntu/debian
I needed this to work on the command line since I use the print screen key as a hotkey to take screenshots. Looks like the -a combined with -f does what I want. Here's my command for an example: shutter -a -f -o screenshot_%Y-%m-%d_%T.png
awarded
comment
How can I run a program as another user in every way?
Excellent answer! I tried to use this to run spotify as a non-privileged system user. Your answers, especially for running a GUI app, worked for me. However, I did neet to pass in my DISPLAY var through sudo using the -E flag. Also, I was ignorant and didn't realize localuser is that literal string. Finally, a gui app may fail to various other issues with expecting a normal user's profile. HTH
awarded
awarded
awarded
awarded
comment
How to remove empty lines from beginning and end of file?
It's better to do something like ^[[:space:]]$ instead of just a newline since there are DOS, Linux, and Mac kinds of newlines that will mess you up if you just try to strip out one kind of them.
awarded
awarded
awarded
awarded
awarded
awarded
answered
Loading…
1
2 3 4 5