[Fucktard aka Resolved] scrot - using options require sudo

Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

[Fucktard aka Resolved] scrot - using options require sudo

Unread post by dkeg » Sat Mar 08, 2014 3:24 pm

Just curious if you guys have any idea why when running scrot and use any options, it requires sudo, however if just run plain scrot, no sudo required.

What I've tried ... both chown and chmod. It currently has 755 and is root:root. Changing to dkeg:dkeg didn't work. But since scrot itself works without elevated permissions, I didn't think that would work. Something that is required from scrot when using the options is requiring the elevated permissions, but not sure what. Maybe something with libimlib2? That library seems to come/work with w3m-mg,scrot, and a couple others I forgot.

Not a big deal in the big picture, just seems silly to have to run sudo scrot -cd5

Work hard; Complain less

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: scrot - using options require sudo

Unread post by pidsley » Sat Mar 08, 2014 3:29 pm

What spin? Does it happen in all your installs? It works for me with options everywhere. If you have a spin where it does work, is there anything different about the version or permissions or lib versions? Did it work before an upgrade? (I know these are obvious questions, but I'm just throwing them out there anyway). Give me a minute to check permissions and see what I have.

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: scrot - using options require sudo

Unread post by dkeg » Sat Mar 08, 2014 3:36 pm

its in gruffalo which uses the Spring rev release. feh and hsetroot also use the libimlib2 library and those seem to work okay. Let me check other partitions.

Work hard; Complain less

User avatar
ivanovnegro
Minister of Truth
Posts: 5449
Joined: Wed Oct 17, 2012 11:12 pm

Re: scrot - using options require sudo

Unread post by ivanovnegro » Sat Mar 08, 2014 3:41 pm

That does not make sense. I never used sudo with scrot and it should not be that way.

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5878
Joined: Tue Sep 03, 2013 7:05 am

Re: scrot - using options require sudo

Unread post by GekkoP » Sat Mar 08, 2014 3:46 pm

It's working fine without sudo on my Elektra, dist-upgraded last evening.

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: scrot - using options require sudo

Unread post by dkeg » Sat Mar 08, 2014 3:59 pm

same for me in Buffalo and Colin. i guess I never noticed b/c used bbqscrot. even scrot test.png needs sudo. wtf man. I always seem to get the quirky anomalies.

I'll just alias it with sudo, and update visudo to not require password

Work hard; Complain less

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: scrot - using options require sudo

Unread post by pidsley » Sat Mar 08, 2014 4:09 pm

You're not trying to scrot in a directory you don't own, are you? (I've done this when I forget I had cd'd to a directory owned by root, and scrot failed). That is very strange. What error message do you get when you use options?

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: scrot - using options require sudo

Unread post by dkeg » Sat Mar 08, 2014 4:26 pm

no, just taking from home directory

Code: Select all

bash: -cd5: command not found
or whatever option used

Edit-I definitely appreciate the help. For now I just aliased it with sudo and updated visudo.

Work hard; Complain less

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: scrot - using options require sudo

Unread post by pidsley » Sat Mar 08, 2014 5:39 pm

Before you give up, I have a couple more questions. Did you have scrot aliased in any way (before you aliased it to "sudo scrot")? That error looks like scrot is not getting the arguments. Can you try this to see if it works?

Code: Select all

command scrot -cd5
I ran gruffalo live and "scrot -cd5" worked fine. Are you using a different .bashrc or .bash_aliases with your installed version? Do you use the same .bashrc and .bash_aliases with the other spins you tested?

This really bugs me and I would like to fix it without sudo (or at least understand why it's not working for you).

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: scrot - using options require sudo

Unread post by machinebacon » Sat Mar 08, 2014 5:49 pm

Right, can you do the following:
- go to /etc/skel and make sure you have no aliases files there
- sudo adduser dkeg2
- change to this user
- scrot with options

This will shed a light on something that might be messed up with permissions. The only thing that needs sudo is fbcat or fbgrab, IIRC. Apart from that, mind to post your /etc/sudoers?

Edit: and of course

Code: Select all

grep scrot .bash*
and also check if you _accidentally_ source some other file (like a zshrc/zsh_alias) in .bashrc
..gnutella..

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: scrot - using options require sudo

Unread post by dkeg » Sat Mar 08, 2014 6:01 pm

And pids is the winner!

What a fuckface I am. Yep, I always travel with my alias and bashrc file. That was it. I had another scrot alias in there that was obviously wrong and been sitting there for god knows how long.

So know it is working as expected. thanks for hanging in there for me.

Work hard; Complain less

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: [Fucktard aka Resolved] scrot - using options require su

Unread post by pidsley » Sat Mar 08, 2014 6:05 pm

Excellent news! Now my OCD can rest for the next problem. And you're welcome ;)

Post Reply