Reputation
3,552
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
5 19
Newest
 Excavator
Impact
~327k people reached

Jun
14
comment How to execute Windows commands remotely from Linux machine using rdesktop command?
@Augustin: What does "should" mean? Did you read that somewhere, or have you tried it and it doesn't work if the username is any other than administrator? Have you actually tried it yet?
May
26
comment How to find out the current (active) XServer DISPLAY number?
you are not looking at Xservers, only at environmental variables. We always need to be very careful about what we assume about environmental variables.
May
25
comment How to execute an arbitrary simple command over ssh without knowing the login shell of the remote user?
If the cmd argument was /bin/sh -c we would end up with a posix shell in 99% of all cases, wouldn't we? Of course escaping special characters is a bit more painful this way, but would it solve the initial problem?
May
25
comment How to find out the current (active) XServer DISPLAY number?
@intelfx: very nice approach. In 1-2 major releases I may come to like this *d stuff. Just to throw in another idea: I once had to match XDisplays to usernames. I build a little something that looks at all incoming TCP connections to the various Xservers and does a majority vote on the users the connecting processes belong to. Works fairly well with modern DEs.
May
25
comment How to find out the current (active) XServer DISPLAY number?
This is a very greedy approach and needn't return the correct DISPLAY. You should evaluate all environments and assume the value of DISPLAY which you read most frequently.
May
20
comment How to find out the current (active) XServer DISPLAY number?
Why are you trying to find out the so called "current" XDISPLAY? What do you mean by "current"? Apparently you have at least two XServer running. Which is current and why?
Mar
12
comment Xen domU sort of ignores /etc/network/interfaces
I can't I don't have access to the setup anymore. I needed a solution 2 months ago. What would you expect to see in and read from that tshark dump? Notice that this must be a Xen domU specific issue.
Mar
6
comment Xen domU sort of ignores /etc/network/interfaces
It says already up.
Mar
5
comment Xen domU sort of ignores /etc/network/interfaces
I am sorry, I do not understand your answer. When I log into the machine ip link show reports the interfaces as up.
Feb
25
comment how to give read, write and execute permission to other user to access mounted shared directory
Have you ever tried chmod 777 /home/nfs_local? Why didn't it work? What export/mount options did you use?
Feb
23
comment sed command and formatting one line help
@jasonwryan: The question is tagged with sed though :D
Feb
23
comment sed command and formatting one line help
Well, in this particular case I'd try s/^\(.\).*|\([^ ]*\).*$/\1\2/ but I don't know if that is what you are looking for.
Feb
12
comment Use bash's read builtin without a while loop
@Scott: ad edit of my question. are you sure removing the pipe symbol does not make the the last paragraph false ...?
Dec
26
comment How does ps get the executable of processes of other users?
How do you make ps show the running executable? The "usual" output I get is /proc/<pid>/cmdline, which is a world readable file ...
Nov
8
comment Convert all non-JPG images to JPGs
@user8547: yes, that should work. I don't think convert will modify in place, but you can add a line right after the convert line rm ${FILENAME}, which will delete the original file.
Nov
7
comment Convert all non-JPG images to JPGs
@don_crissti: but the man page shipped with Debian does. So this feature still needs to spread it seems ... or the man page is broken. Documentation is not valued as much as it used to be.
Nov
7
comment Convert all non-JPG images to JPGs
@user8547: no, you forgot the * before the . and a ; after FILENAME and another ; after jpg. The newlines matter. Maybe your shell's manual can help you with these details ...
Nov
7
comment Convert all non-JPG images to JPGs
@user8547: if you are specifically looking to convert just all bmp and png images, you can use the while loop provided above, but replace ls | grep -v jpg$ with echo *.{bmp,png}. Within that echo statement, you can even complement the ,-separated list of extentions to include other formats as well.
Nov
7
comment Convert all non-JPG images to JPGs
@user8547: no, it won't. You need to iterate over all filenames, you cant just supply them all to mogrify.
Oct
29
comment Is it possible to run vlc as root?
If you actually did install vlc that way ... have you just tried running vlc as root? Why doesn't it work? What does happen when you try? What did you expect to go differently?