LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-18-2010, 02:11 PM   #16
JohnBrock
LQ Newbie
 
Registered: Jan 2010
Posts: 1

Rep: Reputation: 0
Post more on running vlc as root


Hi All

Well this works but no sound...
"If you are running KDE, the simple thing to do would be to...

1) Click your KDE Start Menu.
2) Applications/Multimedia/Video folder (If running PClinux, Kick off menu)
3) Right click VLC and "edit item" (KDE Menu Editor)
4) Second last option on right side (check box "Run as different user")
5) Enter a profile user name on your computer other then root.
6) Exit and save changes."

So the permissions of the lowly user are not good enough to have access to the sound system.

So:
[as root - open terminal window]
cd /dev
chmod 666 dsp

vlc now has sound when run as a 'user'.
 
Old 12-11-2012, 11:13 AM   #17
Zermelo
LQ Newbie
 
Registered: Dec 2012
Posts: 3

Rep: Reputation: Disabled
I know this thread is over 2 years old, but I am posting because it is the first thread that comes up on a google search for "run vlc player as root".

I just wanted to post a simpler way to run vlc as root without recompiling the source. You can open up the binary for ubunt it is found in /usr/bin/vlc, then find the string that matches "geteuid" and replace it with "getppid".

It's simple, quick, fast and works on the original binary, so there should be no issues.

It also works with various other programs.

Last edited by Zermelo; 12-11-2012 at 09:04 PM.
 
1 members found this post helpful.
Old 12-11-2012, 12:13 PM   #18
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,987
Blog Entries: 54

Rep: Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742
Saying
Quote:
Originally Posted by Zermelo View Post
so there should be no issues.
completely ignores the fact the developers added that warning and restriction for good reason.

As said before: root is for system maintenance.
 
Old 12-11-2012, 01:31 PM   #19
descendant_command
Member
 
Registered: Mar 2012
Posts: 754

Rep: Reputation: 158Reputation: 158
Quote:
Originally Posted by unSpawn View Post
Saying

completely ignores the fact the developers added that warning and restriction for good reason.

As said before: root is for system maintenance.
Yes, there are plenty of tools running session as root.

 
Old 12-11-2012, 06:45 PM   #20
Zermelo
LQ Newbie
 
Registered: Dec 2012
Posts: 3

Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Saying

completely ignores the fact the developers added that warning and restriction for good reason.

As said before: root is for system maintenance.
God forbid if someone wants to listen to music during system maintenance, but anyway, as has been said, why are people concerned when adults who understand the potential risks want to do it? There is no law against it. There are people who still want to accept unverified certificates in their browser regardless of the risk, should it be up to the browser to stop them??

There is no danger of liability on the developers as the issues are well known, why must people keep warning a person who already knows the warning. Just think of those people as being unwise or downright stupid and keep it moving. You can say things a million times but not everyone is going to choose to run their distro as you do.
 
Old 12-11-2012, 07:40 PM   #21
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
I think using vlc-wrapper would do.

Last edited by konsolebox; 12-11-2012 at 07:42 PM. Reason: -
 
1 members found this post helpful.
Old 12-11-2012, 08:12 PM   #22
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,411
Blog Entries: 2

Rep: Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995
Quote:
Originally Posted by Zermelo View Post
God forbid if someone wants to listen to music during system maintenance
If you are running your GUI as root for system maintenance you are doing something wrong. There is absolutely no reason to run the GUI as root ever. If you need to run a GUI program as root there are several ways to do that without elevating the whole GUI to root. For example programs like gksu(do), kdesu(do) or sux.

Quote:
why are people concerned when adults who understand the potential risks want to do it?
Because most of the time those adults do not understand the potential risks. Where do you draw the line? If you are doing system maintenance with your GUI running as root, do you start your browser, may be to search for documentation or a specific error message? If the answer to that is yes than your system is already potentially compromised.

I couldn't care less about your system, but what I care about are my systems, those systems that are brute-force attacked, DDOSed or simply receive spam mails from compromised systems. With your behavior you are potentially harming our machines, that is why we have to repeat this over and over again. Did you consider that as part of the risks you claim to have understood?

I couldn't care less about your system, but you should, because your system may not only harm our machines, it may harm you directly, in person. Explain to the police that the copyrighted material hosted on your machines does not come from you. Or the snuff videos, childporn or whatever illegal content you may think of. Did you consider that as part of the risks you claim to have understood?

Quote:
There is no danger of liability on the developers as the issues are well known, why must people keep warning a person who already knows the warning.
The answer is the same, because most of the time that person only thinks to be aware of the issues, without seeing the whole context.

Quote:
Just think of those people as being unwise or downright stupid and keep it moving.
No, I don't think of those people as being unwise or stupid. Because in almost any case they aren't. In almost any case they are either uninformed (which can be easily corrected) or downright lazy. But laziness is no excuse at all.

Quote:
You can say things a million times but not everyone is going to choose to run their distro as you do.
Of course not, why should they. But it is the same as in sports: No athlete has the exact same style as the next. But nonetheless will all athletes behave in the widely accepted way when it comes to their own and others security in that sport.

Last edited by TobiSGD; 12-11-2012 at 08:14 PM.
 
Old 12-11-2012, 08:32 PM   #23
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Sorry TobiSGD but one with experience running the whole GUI as root would disagree and I'm aware of all that you mean. The only difference is probably just the machine in concern. For normal user desktops running your GUI as root or just a normal user is not really different when it comes to security risks. For capable users, things like 'su' and 'sudo' are just things that slows them down. It's not about being lazy or not. It's just about being practical.
 
Old 12-11-2012, 08:46 PM   #24
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,411
Blog Entries: 2

Rep: Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995
May I just ask what exactly it is that you do that you have to do that needs the whole GUI running as root?
 
Old 12-11-2012, 08:58 PM   #25
Zermelo
LQ Newbie
 
Registered: Dec 2012
Posts: 3

Rep: Reputation: Disabled
Quote:
Because most of the time those adults do not understand the potential risks.
This threads almost immediately had 3 or 4 people screaming about the dangers and risks IN DETAIL of running as root. How many more posts on the same thread is going to inform that person any more?? That person has accepted those risks. People accept the risks of eating trans-fat and accept the risks of smoking, none of those people at this point in our society can be said not to understand those risks. At what point do you want to become a nanny state for computer users?

People should know to have data-backups, make restore points, not use the same passwords over and over again. Basic security and data protection issues. At what point do we say they take the responsibility? Whether people choose to do things out of laziness or lack of will-power, there comes a point that you give them the responsibility.

These programs themselves tell the users about the dangers and try to prevent them from running as root, just like packs of cigarettes tell you the dangers of cancer, but it seems like there are some people who want to take their outrage at the lack of good sense and make some type of prohibition and become the Mayor Bloomberg of linux use. I get it, some people are offended that such people would take such risks, but once you know they have been informed, then the rest is on them. It is their computers, their data, their computing life, let them live it.
 
Old 12-11-2012, 09:16 PM   #26
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,411
Blog Entries: 2

Rep: Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995
Quote:
Originally Posted by Zermelo View Post
It is their computers, their data, their computing life, let them live it.
Seems that you didn't get the point. As stated before, I don't care about their computers, their data, their computing live. I care about my computers, my data and my computing life. And compromised machines will evidently have an impact on that. As long as the specific user does not grasp that he is still uninformed and needs to be educated for their own and our good.

We don't allow drunk drivers, not because they may damage their own health or their own cars, but because they may harm others with that behavior. So why should we allow people to pose a risk on us in other areas? That doesn't really make sense.
 
Old 12-11-2012, 10:00 PM   #27
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by TobiSGD View Post
May I just ask what exactly it is that you do that you have to do that needs the whole GUI running as root?
Just this year when I had a new installation of Gentoo I found myself making a decision to no longer run as a superuser in GUI, although I still have the account ready to run as GUI when it's needed. The last time I ran as root GUI was when I used gparted. I'd probably do that again if I need to do multiple tasks which would require superuser access. Packages like vlc restricting themselves to run as root was probably the biggest reason why I no longer run in GUI as superuser by default.

There actually wasn't really a reason or specific sets of tasks that I chose to run as root by default. I got used to running systems with full control and I am in control of my system so why would I have to be careful then. The first GUI system I had - Slackware with GUI 9.1 (KDE), I always ran as root and never had a problem with it.

Knowing myself I do often encounter tasks which needs superuser accesses. Well I don't really want to be specific in saying what they are. One thing is when I'm still building my system at least after a lightweight desktop like XFCE4 is already running. Running as root in GUI is also better if you're doing low-level development/debugging tasks. I also choose my favorite editor sometimes when editing root-owned files.

In general I just didn't want to bother myself with unnecessary efforts of elevating tasks with su or sudo every time you needed them.

P.S. I'm not sure how a GUI app could run with sudo. I don't like the idea. I believe it would cause to allocate more memory for the sake of the app's runtime enironment. I haven't explored much that yet but so far I see it as a hack.
 
Old 12-11-2012, 10:14 PM   #28
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,411
Blog Entries: 2

Rep: Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995
Quote:
Originally Posted by konsolebox View Post
In general I just didn't want to bother myself with unnecessary efforts of elevating tasks with su or sudo every time you needed them.
This actually looks like laziness. As I stated before:
Quote:
There is absolutely no reason to run the GUI as root ever.
Quote:
But laziness is no excuse at all.
Quote:
Originally Posted by konsolebox
I'm not sure how a GUI app could run with sudo.
Use kdesu(do), gksu(do) or sux for that.
Quote:
I don't like the idea. I believe it would cause to allocate more memory for the sake of the app's runtime enironment. I haven't explored much that yet but so far I see it as a hack.
What you are saying here comes basically down to: I base the decisions regarding the security of my system(s) on a personal opinion that is based on believes. I haven't researched how the facts are, but nonetheless have an opinion on it.

Sorry I have to say that, but if you were working for me as a system admin with this attitude you wouldn't work for me anymore.
 
Old 12-11-2012, 10:23 PM   #29
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by TobiSGD View Post
This actually looks like laziness. As I stated before:
Ok it's up to you how you would look at it.
Quote:
Use kdesu(do), gksu(do) or sux for that.
What you are saying here comes basically down to: I base the decisions regarding the security of my system(s) on a personal opinion that is based on believes. I haven't researched how the facts are, but nonetheless have an opinion on it.
Sorry I believe my knowledge about the matter is enough already. As a concept for security the GUI kernel would have to set another environment to serve the other app which is running as a new user. Other method than that and would be a hack.
Quote:
Sorry I have to say that, but if you were working for me as a system admin with this attitude you wouldn't work for me anymore.
I wouldn't work for a conservative employer like you either.

Anyhow this just boils down as a matter of personal philosophy but you saying that:
Quote:
There is absolutely no reason to run the GUI as root ever.
Is absolutely wrong for me.
 
Old 12-11-2012, 11:10 PM   #30
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,411
Blog Entries: 2

Rep: Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995
Quote:
Originally Posted by konsolebox View Post
I wouldn't work for a conservative employer like you either.
You are the first person ever that called me conservative. But if insisting on basic security principles is nowadays called conservative then may be I should be called conservative.

Quote:
Sorry I believe my knowledge about the matter is enough already.
May I quote yourself?
Quote:
I'm not sure how a GUI app could run with sudo. I don't like the idea. I believe it would cause to allocate more memory for the sake of the app's runtime enironment. I haven't explored much that yet but so far I see it as a hack.
You yourself state that you have not explored that topic, but now you believe that you have enough knowledge about it.

Quote:
Anyhow this just boils down as a matter of personal philosophy
Actually no, basic security principles are not a matter of philosophy, they are a matter of fact.

Quote:
but you saying that:

Quote:
There is absolutely no reason to run the GUI as root ever.
Is absolutely wrong for me.
Luckily you are a very small percentage with this habits. Otherwise the Linux world would be as simple to target for malware developers as the Windows world was with XP.

Just for educational purpose, for anyone who is interested in what I am speaking about in my conservativeness : http://en.wikipedia.org/wiki/Princip...east_privilege

Last edited by TobiSGD; 12-11-2012 at 11:11 PM.
 
  


Reply

Tags
fedora


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
root account or user account arodlinux Suse/Novell 3 12-23-2008 08:59 PM
fedora 10 vlc cannot run as root me_logan Linux - Software 1 12-07-2008 04:45 PM
Why is my common account can't open Terminal in XFCE4 but root account? notsay Slackware 4 08-18-2007 11:29 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM
Firefox cannot run (start and exit within 2 secs) with root account davidas Linux - Software 5 04-08-2004 01:36 AM


All times are GMT -5. The time now is 09:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration