You are not logged in.

#1 2012-02-12 16:44:25

oldtimeyjunk
Member
From: /world/europe/uk/england
Registered: 2011-04-30
Posts: 202
Website

Run VLC as Root

Hello all.

Installed VLC a couple of days ago only to get errors. Running VLC in the Console tells me that you cannot run it as Root.

Why do I want to run it as Root? I use Root as my main account. Please don't bother posting comments that I shouldn't be using Root as my main account. It's my Computer and I'll do what I want with it. Just for the record, I used Root for three years on my old Ubuntu box and never broke a single thing.

So, my question is, how can I get VLC to run as a Superuser/Root?

Last edited by oldtimeyjunk (2012-02-12 16:45:42)


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed." - Unix for Dummies, 2nd Edition

Offline

#2 2012-02-12 16:46:15

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Run VLC as Root

Not sure what the "Console" is, but have you read https://wiki.archlinux.org/index.php/Ru … ps_as_root ?

Offline

#3 2012-02-12 16:51:03

oldtimeyjunk
Member
From: /world/europe/uk/england
Registered: 2011-04-30
Posts: 202
Website

Re: Run VLC as Root

karol wrote:

Not sure what the "Console" is, but have you read https://wiki.archlinux.org/index.php/Ru … ps_as_root ?

When I say "Console", I mean "Terminal".
Sorry, but I accidentally clicked "Report" instead of "Quote" the first time >:(


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed." - Unix for Dummies, 2nd Edition

Offline

#4 2012-02-12 16:52:14

oldtimeyjunk
Member
From: /world/europe/uk/england
Registered: 2011-04-30
Posts: 202
Website

Re: Run VLC as Root

I've tried "gksu vlc" and it still gives me an error.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed." - Unix for Dummies, 2nd Edition

Offline

#5 2012-02-12 16:52:30

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Run VLC as Root

oldtimeyjunk wrote:

Sorry, but I accidentally clicked "Report" instead of "Quote" the first time >:(

No problem. smile


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#6 2012-02-12 16:53:40

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Run VLC as Root

If you mean http://www.archlinux.org/packages/extra/i686/terminal/ , the link I provided should help.

Offline

#7 2012-02-12 16:54:52

desm0tes
Member
From: 127.0.0.1
Registered: 2012-02-04
Posts: 233
Website

Re: Run VLC as Root

oldtimeyjunk wrote:

I've tried "gksu vlc" and it still gives me an error.

Did u install gksu? wink

Offline

#8 2012-02-12 16:56:08

oldtimeyjunk
Member
From: /world/europe/uk/england
Registered: 2011-04-30
Posts: 202
Website

Re: Run VLC as Root

desm0tes wrote:
oldtimeyjunk wrote:

I've tried "gksu vlc" and it still gives me an error.

Did u install gksu? wink

Yes. I understand it's a very silly mistake to make though XD.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed." - Unix for Dummies, 2nd Edition

Offline

#9 2012-02-12 16:56:54

oldtimeyjunk
Member
From: /world/europe/uk/england
Registered: 2011-04-30
Posts: 202
Website

Re: Run VLC as Root

karol wrote:

If you mean http://www.archlinux.org/packages/extra/i686/terminal/ , the link I provided should help.

When I said Terminal, I meant any Terminal in general - XFCE Terminal, GNOME Terminal, XTerm etc.
How has this anything to do with what I've posted?


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed." - Unix for Dummies, 2nd Edition

Offline

#10 2012-02-12 16:57:43

desm0tes
Member
From: 127.0.0.1
Registered: 2012-02-04
Posts: 233
Website

Re: Run VLC as Root

What error do u get using gksu then?

Offline

#11 2012-02-12 17:00:11

oldtimeyjunk
Member
From: /world/europe/uk/england
Registered: 2011-04-30
Posts: 202
Website

Re: Run VLC as Root

desm0tes wrote:

What error do u get using gksu then?

When I run "vlc" as Root I get...

VLC is not supposed to be run as root. Sorry.
If you need to use real-time priorities and/or privileged TCP ports
you can use vlc-wrapper (make sure it s Set-UID root and
cannot be run by non-trusted users first).

When I run "gsku vlc" I get the same error.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed." - Unix for Dummies, 2nd Edition

Offline

#12 2012-02-12 17:00:29

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Run VLC as Root

Hmm, I can run mplayer as root, but vlc gives me

[root@black media]# vlc ut4_Deception_v1.flv 
VLC is not supposed to be run as root. Sorry.
If you need to use real-time priorities and/or privileged TCP ports
you can use vlc-wrapper (make sure it is Set-UID root and
cannot be run by non-trusted users first).

I get the same error with gksu.


oldtimeyjunk wrote:
karol wrote:

If you mean http://www.archlinux.org/packages/extra/i686/terminal/ , the link I provided should help.

When I said Terminal, I meant any Terminal in general - XFCE Terminal, GNOME Terminal, XTerm etc.
How has this anything to do with what I've posted?

'terminal' and 'console' are sometimes used to call the non-X environment. I simply wanted to make sure are you running vlc from the console (framebuffer) or from X.

Last edited by karol (2012-02-12 17:05:06)

Offline

#13 2012-02-12 17:03:18

oldtimeyjunk
Member
From: /world/europe/uk/england
Registered: 2011-04-30
Posts: 202
Website

Re: Run VLC as Root

Hold up.
I also have SMPlayer. After looking through the menus, it does just about what I wanted to do with VLC (steam stuff from my Tower PC and play DVD's).
Also, after a quick search on the internet I found this thread: http://forums.fedoraforum.org/showthread.php?t=269491. Seems you have to compile it which I've never been that good at, so I think I'll pass.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed." - Unix for Dummies, 2nd Edition

Offline

#14 2012-02-12 17:38:54

SS4
Member
From: !Rochford, Essex
Registered: 2010-12-05
Posts: 699

Re: Run VLC as Root

VLC is compiled not to run as root from upstream. You can change a flag in the PKGBUILD though, put the following in the pkgbuild

--enable-run-as-root

Rauchen verboten

Offline

#15 2012-02-12 19:36:15

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Run VLC as Root

Perhaps you can use my method of creating vlc run-as-root.

Use ABS to obtain the vlc PKGBUILD from the abs repos  extra.

Cp the vlc package given in /var/abs/ extra to /var/local(x)

Edit the PKGBUILD to add the following:

 ..enable-run-as-root \

Then run in the same directory:

 makepkg --asroot PKGBUILD

This will generate the appropriate pacman compatible tar.

Then install with:

 pacman -U /var/local(x)/vlc...etc .pkg.tar.xz.

This generates a root-enabled vlc.

I have used this procedure with VLC for years to enable run as root.

I run my system as root as do you.

To prevent over-riding vlc in next pacman -Syu, use --ignore vlc or prepare a new PKGBUILD from ABS download.

Works every time, takes a good half hour to prep.!!!

Last edited by lilsirecho (2012-02-12 19:38:34)


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#16 2012-02-12 20:14:39

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: Run VLC as Root

You might also create a non-root user for the express purpose of running vlc.  From the root account, you could drop root privileges and run vlc as the other user.  This is a workaround, but it might solve your problem if you don't want to rebuild vlc.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#17 2012-08-18 11:18:13

duster
Member
From: Western MASS USA
Registered: 2012-08-16
Posts: 48

Re: Run VLC as Root

hi and sorry if this ressurects an old thread upfront...

but im very interested in rebuilding vlc to run as root downloaded abs from the repository but not sure how to rebuild it.  anyone care to explain in a little more detail for me? thanks.


amd phenom II quad core notebook
ati radeon hd mobility radeon 4200

Offline

#18 2012-08-18 15:40:25

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Run VLC as Root

Perhaps I can elucidate the procedure with an actual PKGBUILD.

As root, use abs to download the extra repo.

Cd /var/local
cp /var/abs/extra/vlc/* /var/local
nano PKGBUILD
 # $Id: PKGBUILD 164719 2012-08-04 05:32:21Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
# Contributor: Martin Sandsmark <martin.sandsmark@kde.org>

pkgname=vlc
pkgver=2.0.3
pkgrel=2
pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player"
arch=('i686' 'x86_64')
url="http://www.videolan.org/vlc/"
license=('LGPL2.1' 'GPL2')
depends=('a52dec' 'libdvbpsi' 'libxpm' 'libdca' 'qt' 'libproxy' 
         'sdl_image' 'libdvdnav' 'libtiger' 'lua' 'libmatroska' 
         'zvbi' 'taglib' 'libmpcdec' 'ffmpeg' 'faad2' 'libupnp' 
         'libshout' 'libmad' 'libmpeg2' 'libmodplug' 'libass' 
         'xcb-util-keysyms' 'ttf-freefont')
makedepends=('live-media' 'libnotify' 'libbluray' 'flac' 'kdelibs'
             'fluidsynth' 'libdc1394' 'libavc1394' 'lirc-utils'
             'libcaca' 'librsvg' 'portaudio' 'oss' 'libgme' 'xosd'
             'projectm' 'twolame' 'aalib' 'libmtp' 'libdvdcss'
             'gnome-vfs' 'libgoom2' 'libtar' 'vcdimager')
optdepends=('avahi: for service discovery using bonjour protocol'
            'libnotify: for notification plugin'
            'ncurses: for ncurses interface support'
            'libdvdcss: for decoding encrypted DVDs'
            'lirc-utils: for lirc plugin'
            'libavc1394: for devices using the 1394ta AV/C'
            'libdc1394: for IEEE 1394 plugin'
            'kdelibs: KDE Solid hardware integration'
            'vdpau-video: vdpau back-end for nvidia'
            'libva-driver-intel: back-end for intel cards'
            'libbluray: for Blu-Ray support'
            'flac: for Free Lossless Audio Codec plugin'
            'oss: for OSS audio support'
            'portaudio: for portaudio support'
            'twolame: for TwoLAME mpeg2 encoder plugin'
            'projectm: for ProjectM visualisation plugin'
            'libcaca: for colored ASCII art video output'
            'libgme: for libgme plugin'
            'librsvg: for SVG plugin'
            'gnome-vfs: for GNOME Virtual File System support'
            'libgoom2: for libgoom plugin'
            'vcdimager: navigate VCD with libvcdinfo'
            'xosd: for xosd support'
            'aalib: for ASCII art plugin'
            'libmtp: for MTP devices support'
            'fluidsynth: for synthesizer MIDI FluidSynth'
            'smbclient: for SMB access plugin'
            'libcdio: for audio CD playback support')
conflicts=('vlc-plugin')
replaces=('vlc-plugin')
backup=('usr/share/vlc/lua/http/.hosts'
        'usr/share/vlc/lua/http/dialogs/.hosts')
options=('!libtool' '!emptydirs')
install=vlc.install
source=("http://download.videolan.org/pub/videolan/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.xz")
md5sums=('a7e79565e3df07dcf9abc6cad3ac26bb')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  sed -i -e 's:truetype/freefont:TTF:g' modules/text_renderer/freetype.c

  ./configure --prefix=/usr \
              --sysconfdir=/etc \
              --disable-rpath \
              --enable-oss \
              --enable-faad \
              --enable-nls \
              --enable-lirc \
              --enable-pvr \
              --enable-ncurses \
              --enable-realrtsp \
              --enable-xosd \
              --enable-aa \
              --enable-vcdx \
              --enable-upnp
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make DESTDIR="${pkgdir}" install

  for res in 16 32 48 128; do
    install -D -m644 "${srcdir}/vlc-${pkgver}/share/icons/${res}x${res}/vlc.png" \
        "${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/vlc.png"
  done
}

At the ./configure step...--prefix=/usr\ Press enter to enable new entry

enter....enable-run-as-root \  ...Dont' forget the backslash
Then....exit and save.

 makepkg --asroot PKGBUILD 

This will start the build process.  You will probably fail to complete due to dependencies.(many)

Use pacman to download and install all of the listed depends.

Return to the makepkg step and reenter it.

The process takes about half hour or more.

At completion...run:

pacman -U /var/local/vlc-(ID for package) .pkg.tar.xz

This will establish the VLC version downloaded and you can run as root.

You have to do this every upgrade to VLC or ignore the upgrade as you wish.

I may have missed a step but have used this procedure for three years now.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#19 2012-08-18 15:41:10

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: Run VLC as Root

Look at this wiki article

Having linked that, really, don't run big complex GUI apps as root.  But, it is your computer hmm

Edit: snaked by lilsirecho

Last edited by ewaller (2012-08-18 15:42:42)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#20 2012-08-18 15:42:52

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Run VLC as Root

ewaller:

Give me a ring for lunch!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#21 2012-08-18 15:44:19

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: Run VLC as Root

lilsirecho wrote:

ewaller:

Give me a ring for lunch!

Roger that.  I got your email.  I work about 5 miles from you, I look forward to it smile


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#22 2012-08-18 17:01:39

duster
Member
From: Western MASS USA
Registered: 2012-08-16
Posts: 48

Re: Run VLC as Root

Thank you so much for taking the time to explain how to do this... and ewaller not to ignore you... i do understand the issues with running as root... but for what i do with this machine i do as much homework as i can on a subject to make sure i dont fumble and break it but i do hear ya on the risks


amd phenom II quad core notebook
ati radeon hd mobility radeon 4200

Offline

#23 2013-03-30 01:04:19

AGT
Member
From: Null Void
Registered: 2012-10-27
Posts: 59
Website

Re: Run VLC as Root

Hello.

I also found this on YouTube:

Edit the executable file /usr/bin/vlc.
Search for and change the following in a hex editor: geteuid
Replace it with: getppid

Save the file.
Run VLC.

It seems to be working.

I guess you would have to do this after each update to VLC.

Offline

#24 2014-04-13 15:49:25

oh1oh9
Member
Registered: 2014-04-11
Posts: 1

Re: Run VLC as Root

thank you agt i was having this same issue and i used bless hex editor in text mode and it worked.

Offline

#25 2014-04-13 16:11:16

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Run VLC as Root

oh1oh9, welcome to the forums. this thread is very old. please do not necrobump old threads.

Closing...


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB