[SOLVED] Running mplayer in tty

Hello
I am trying to play a movie in tty. i tried the following command:
mplayer -vo aa:driver=curses -monitorpixelaspect 0.5 movie.mp4
But the output is blank. some characters show for a fraction of a second and then it's blank again. The results are the same if played in terminal emulator in desktop.
It works fine with X11 driver, And i tried "mplayer -vo aa:driver=curses -monitorpixelaspect 0.5 movie.mp4 > out.txt" It works like that, but ofcourse i want to play it on my screen not a text file. I get the same results with libcaca.
I have also tried using vlc player and it works fine. So i suspect there is some configuration i need to do or something to install to make mplayer work in tty?
I am using Intel HD graphics 4000 if it's any relevant.
Any help?
Last edited by Viruser (2014-01-06 15:07:02)

jasonwryan wrote:FWIW, mplayer is dead in the water, use mpv.
I love mpv as well, it's essentially the only media player I use now. But, this won't help the user achieve their goal. So far as I know, mpv dropped support for the curses driver.
All the best,
-HG
Last edited by HalosGhost (2014-01-05 19:15:33)

Similar Messages

  • Running mplayer at boot with systemctl. fails with alsa-lib error

    I am running Arch ARM on a raspberry pi and would like to use it as a headless music player.
    I am trying to run mplayer in slave mode at start up and have in read from a fifo pipe which I could write to over SSH.
    I have written this mplayer.service file:
    [Unit]
    Description='mplayer service'
    [Service]
    ExecStart=/usr/bin/tmux new-session -d -s mplayer 'mplayer -idle -input file=/systemdservice/mplayerfifo /systemdservice/1.mp3 &> /systemdservice/mplayererror.log'
    User=user
    Type=forking
    [Install]
    WantedBy=multi-user.target
    When I start this service with 'sudo systemctl start mplayer.service' I get the following output:
    MPlayer SVN-r36285-4.8.1 (C) 2000-2013 MPlayer Team
    Cannot test OS support for SSE, disabling to be safe.
    205 audio & 424 video codecs
    mplayer: could not connect to socket
    mplayer: No such file or directory
    Failed to open LIRC support. You will not be able to use your remote control.
    Playing /systemdservice/1.mp3.
    libavformat version 55.7.100 (internal)
    Audio only file format detected.
    Load subtitles in /systemdservice/
    ==========================================================================
    Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
    AUDIO: 44100 Hz, 2 ch, s16le, 32.0 kbit/2.27% (ratio: 4000->176400)
    Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
    ==========================================================================
    [AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
    [AO_ALSA] alsa-lib: confmisc.c:768:(parse_card) cannot find card '1'
    [AO_ALSA] alsa-lib: conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
    [AO_ALSA] alsa-lib: confmisc.c:392:(snd_func_concat) error evaluating strings
    [AO_ALSA] alsa-lib: conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
    [AO_ALSA] alsa-lib: confmisc.c:1251:(snd_func_refer) error evaluating name
    [AO_ALSA] alsa-lib: conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
    [AO_ALSA] alsa-lib: conf.c:4727:(snd_config_expand) Evaluate error: No such file or directory
    [AO_ALSA] alsa-lib: pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM sysdefault
    [AO_ALSA] Playback open error: No such file or directory
    AO: [pulse] Init failed: Connection refused
    [JACK] cannot open server
    [AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le
    [AO_ALSA] alsa-lib: confmisc.c:768:(parse_card) cannot find card '1'
    [AO_ALSA] alsa-lib: conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
    [AO_ALSA] alsa-lib: confmisc.c:392:(snd_func_concat) error evaluating strings
    [AO_ALSA] alsa-lib: conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
    [AO_ALSA] alsa-lib: confmisc.c:1251:(snd_func_refer) error evaluating name
    [AO_ALSA] alsa-lib: conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
    [AO_ALSA] alsa-lib: conf.c:4727:(snd_config_expand) Evaluate error: No such file or directory
    [AO_ALSA] alsa-lib: pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM sysdefault
    [AO SDL] Unable to open audio: No available audio device
    DVB card number must be between 1 and 4
    AO: [null] 44100Hz 2ch s16le (2 bytes per sample)
    Video: no video
    Starting playback...
    A: 0.1 (00.0) of 1567.0 (26:07.0) ??,?% [J
    A: 0.1 (00.0) of 1567.0 (26:07.0) ??,?% [J
    MPlayer interrupted by signal 2 in module: play_audio
    A: 4.5 (04.5) of 315.0 (05:15.0) 1.7% [J
    Exiting... (Quit)
    mplayer starts within a tmux window but I don't get any sound and have to stop mplayer from within tmux with CTRL+C which ends the process.
    interestingly  when as user I run:
    /usr/bin/tmux new-session -d -s mplayer 'mplayer -idle -input file=/systemdservice/mplayerfifo /systemdservice/1.mp3 &> /systemdservice/mplayererror.log'
    it works perfectly.
    If in mplayer.service I change the user  to root it also works perfectly.
    user is a member of audio group.
    I am confused as to what is causing this problem which appears due to a limit of users audio group privilages when a process is started via systemd.
    Any help appreciated.
    Thanks in advance.
    Last edited by epoynton (2013-10-30 21:44:43)

    Have you tried setting the audio output driver for mplayer explicitly? See:
    mplayer -ao help
    I would try
    -ao alsa
    ALSA doesn't use /dev/dsp anymore I don't think. On a Pi you will also need to make sure the mixer is set with amixer like:
    amixer cset #
    You can use
    aplay -l
    to see the available device IDs etc.
    Hope this helps.
    Last edited by Minsc (2013-11-11 17:02:08)

  • Run Process in TTY session

    I'm working on a linux machine, and have a process that I want to launch from within a java program (please, no sermons about platform dependence and choosing java as a technology. I have my reasons).
    This process typically writes a few questions out to stdout and asks for responses on stdin. My java program has already gathered all of the information necessary to answer these questions, and done so in what I believe is a more professional and efficient manner. I would like to be able to simply answer these questions by attaching readers and writers to the input and output streams of the process (think expect script, but written in Java).
    The problem is that the process I'm launching seems to know that it has attached to a process that is not part of a tty session, so instead of posing it's questions on stdout and looking for input on stdin, it puts up dialog boxes.
    Does anybody know how to start a process and associate it with a tty session, or fool it into thinking it's running with a tty session, so that it will accept input on stdin?
    - Adam

    guitar_man_F wrote:
    johndjr wrote:
    I don't know if this will work for you or not, probaby not but I guess it's worth a try.
    What happens to the program if DISPLAY is not set?
    It seems to me that it would not be able to open any X windows, but then again it might just give up.
    I assume that you can't modify the program and that it is not possible/feasible to have the author modify it so that you can provide the info in some other manner, say an answer file or something.Unfortunately, that's not an option, because after it does its information gathering, it then opens a window that I DO want displayed on screen.
    Anybody else know how to do something like this? Every work around I've tried has failed. I'm stuck.
    I suspect you can craft a script which will exhibit the same behavior that is causing you so much trouble within java.
    Thus separating the question completely from java. One advantage to that is that you can then pose the question on other non-java related sites.
    If you can find a solution using the script only then you can implement it in java, if by no other means calling the script.
    If you cannot then nothing you do will fix it in java.
    I suspect you will not be able to do it. Thus you would need to look for another solution. As suggested above telnet (even into your local box) and see if you can get it to go that way.
    Another alternative would be to use a keyboard pusher (perhaps Robot or as an example AutoIt works nicely on windows.) That would allow you to simulate the user experience and then some tricks like hiding the first window behind a splash screen might allow it to simulate what you want.

  • [Solved] Gnome-mplayer configuration?

    Hi all. i am trying to configure mplayer, specifically gnome-mplayer to play dvd's but it doesn't seem to work. If I run
    mplayer dvd://
    things run fine, however I am trying to set it up so anyone in the house can just go to gnome-mplayer and start playing a dvd from there. When I try to configure gnome-mplayer through Preferences in the menu, it doesn't stick. So I tried looking into configuring it through the file at $HOME/.mplayer/config and then trying to play the dvd through different gnome-mplayer options through the "Disc" menu, but it doesn't play. The man page is a little daunting and slightly confusing as well, for example I don't know what it's talking about when it mentions "gmplayer," also there is no "gui.conf" file anywhere by default as far as I can tell. The wiki page says nothing about gnome-mplayer which doesn't help either.
    Reading from the man page, if I had to take a guess I have to create a section
    [gnome-mplayer]
    and put the options for it under there. If I had to take futher guesses, all the options that say "Mplayer Only" on the man page won't work with a GUI such as gnome-mplayer? I need someone to point me in the right direction.
    Last edited by felixculpa (2013-07-19 00:45:25)

    So the preferences in gnome-mplayer live in RAM without being written to a file? See if there's some permission problem preventing it from making the preferences stick, because this sounds like a bug.
    Oh and gmplayer is a crappier GUI that used to come with the mplayer package. You can try it by recompiling with --enable-gui.

  • [Solved] Running mpd as user mpd with systemd without using mpd.conf

    Maybe this is tivial, but I searched about an hour without any results. I want to run mpd as user mpd. I cant use the mpd config file since mpd set the UID and GID explicitely resulting in mpd not having the necessary supplementary groups to access the locally shared music on my pc. Well I tried to run mpd with systemd by
    # systemctl start mpd
    and  the systemd contains the user mpd
    $ cat /etc/systemd/system/default.target.wants/mpd.service
    [Unit]
    Description=Music Player Daemon
    After=network.target sound.target
    [Service]
    User=mpd
    ExecStart=/usr/bin/mpd --no-daemon
    # allow MPD to use real-time priority 50
    LimitRTPRIO=50
    LimitRTTIME=-1
    # move MPD to a top-level cgroup, as real-time budget assignment fails
    # in cgroup /system/mpd.service, because /system has a zero real-time
    # budget; see
    # http://www.freedesktop.org/wiki/Software/systemd/MyServiceCantGetRealtime/
    ControlGroup=cpu:/mpd
    # assign a real-time budget
    ControlGroupAttribute=cpu.rt_runtime_us 500000
    [Install]
    WantedBy=default.target
    but it did not run as mpd.
    Well how can I run mpd as mpd? Is there a way to do it like with dropbox: dropbox@<user>.service
    Last edited by manuelschneid3r (2015-03-25 12:52:52)

    Glad you solved it. Was just typing a response and I'll still add two remarks:
    The ps|grep output showed that you run grep as root, not mpd itself (which won't have a space in the command -- the second time it only worked because the mpd group is preceded by a space).
    It sounds like it took you a while to find the drop-in configuration snippet in the mpd.service.d directory. These drop-in are shown in `systemctl status`, which is something you'd normally check in situations like these, and that might help to discover them more quickly.
    Last edited by Raynman (2015-03-25 12:58:36)

  • [SOLVED] Running OpenGL applications?

    I am writing a simple game using freeglut and it compiles fine but I can't run it - the program compiles fine AND runs under Windows but in Windows I have to stick the freeglut.dll in the same directory, do I have to do something similar in Linux?
    (the program is platform independant!)
    Last edited by privateabstract (2011-01-03 20:32:52)

    Please prefix the thread title with "[SOLVED]", and add what you did to fix it, if you did anything in particular.

  • [SOLVED] Gnome Mplayer Won't Work

    I have Gnome mplayer and gecko player installed on my maching with the mplayer-mt Aur package.  Gnome-mplayer won't play any files and just says "Stopped" on the bottom.  Can't figure it out, I've tried re-installing it and the regular mplayer package too without any luck.  Anybody know what the problem might be?
    Thx
    Last edited by leberyo (2010-09-24 19:35:43)

    anonymous_user wrote:
    Did you try deleting the config for gnome-mplayer?
    rm -r ~/.config/gnome-mplayer
    Also try running gnome-mplayer from a terminal and post its output when trying to play a file.
    Deleting the gnome-mplayer folder did the job.  It works now thanks.
    The only thing is, if I change any settings whatsoever in gnome-mplayer preferences, it stops again.  I guess I'll just stick to all the stock settings...

  • [SOLVED]Run-time error in calculator. Wrong results.

    I've tried running the program a couple of times noticing that only the division returns the correct answer.. Here's the code:
    * File: Guical.java                    *
    * Author: Richard JR Wallnerstrom     *
    * Date: 2007-05-09 -                 *
    * Copyright: GNU Public License       *
    import javax.swing.*;
    import java.lang.String;
    public class Guical {
         public static void main(String[] args) {
              double sum = 0;
              JOptionPane.showMessageDialog(null, "V??lkommen till Guical!"); // Welcome the new user
              String num1 = JOptionPane.showInputDialog("Skriv in det f??rsta talet");     // Ask user for the input
              String num2 = JOptionPane.showInputDialog("Skriv in det andra talet");
              String operator = JOptionPane.showInputDialog("Skriv in ??nskad operator");
              try {
                   switch (operator.charAt(0)) {
                        case '+': sum = Double.valueOf(num1.trim()).doubleValue() + Double.valueOf(num2.trim()).doubleValue();
                        case '-': sum = Double.valueOf(num1.trim()).doubleValue() - Double.valueOf(num2.trim()).doubleValue();
                        case '*': sum = Double.valueOf(num1.trim()).doubleValue() * Double.valueOf(num2.trim()).doubleValue();
                        case '/': sum = Double.valueOf(num1.trim()).doubleValue() / Double.valueOf(num2.trim()).doubleValue();
                   JOptionPane.showMessageDialog(null, num1 + " " + operator + " " + num2 + " = " + sum);
              } catch (NumberFormatException nfe) {
                   JOptionPane.showMessageDialog(null, "Ej giltigt tecken: " + nfe.getMessage());
    }Seems fine to me so if you find anything please let me know.
    Regards
    Richard
    [edit] SOLVED.. Forgot the "break" statements...
    Message was edited by:
    richardinho

    you forget your break keywords. without break, your execution will continue on next case, not getting out from switch block.
    switch (operato....) {
       case '+' :
          sum = 1 + 2;
          break;
       case '-' :
          sum = 1 - 2;
          break;
    }

  • [Solved] Running 0 A.D. in another XOrg server

    Hello, everyone.
    I installed 0 A.D. in my system, and I would like to run it on a separated XOrg server. So, I created this script for this purpose:
    #!/bin/bash
    DISPLAY=:1.0
    xinit /usr/bin/0ad $* -- :1
    When running this script on tty2, it works, but so much strange. The game runs, but with most of it dark: I cannot see the menu, images, map, characters, only text, the mouse pointer and a few more things.
    I tried configuring my XOrg on display 1, running this:
    [mateusfelipe@ArchLinux ~]$ sudo Xorg :1 -configure
    X.Org X Server 1.14.3
    Release Date: 2013-09-12
    X Protocol Version 11, Revision 0
    Build Operating System: Linux 3.11.1-1-ARCH x86_64
    Current Operating System: Linux ArchLinux 3.11.4-1-ARCH #1 SMP PREEMPT Sat Oct 5 21:22:51 CEST 2013 x86_64
    Kernel command line: root=/dev/sda2 rw quiet initrd=../initramfs-linux.img BOOT_IMAGE=../vmlinuz-linux
    Build Date: 08 October 2013 08:48:10PM
    Current version of pixman: 0.30.2
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
    Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    (==) Log file: "/var/log/Xorg.1.log", Time: Tue Oct 15 14:06:12 2013
    setversion 1.4 failed
    List of video drivers:
    intel
    vesa
    (++) Using config file: "/root/xorg.conf.new"
    (==) Using config directory: "/etc/X11/xorg.conf.d"
    Number of created screens does not match number of detected devices.
    Configuration failed.
    (EE) Server terminated with error (2). Closing log file.
    As you see, it does not work. What can I do to properly run 0 A.D. on another XOrg server?
    Thanks.
    Soution:
    #!/bin/bash
    xinit 0ad $* -- :1 vt2
    Last edited by Twinsen (2013-12-20 11:31:40)

    See `man Xorg`, it's the first option listed.
    EDIT: I suppose what may not be immediately clear is that xinit or startx pass everything on the command line after the double dash "--" on as command line parameters to Xorg.  These parameters can set, among other things, which tty or vt the new session should run in.
    Last edited by Trilby (2013-10-21 00:44:29)

  • [solved] Running a command in background (bash script)

    Salut,
    as netcfg2 does not work with my wireless connection, I have to set up the connection manually. For not having to type in the commands every time, I created a bash script.
    #!/bin/bash
    iwconfig wlan0 mode managed essid mynetwork channel 6
    ifconfig wlan0 up
    wpa_supplicant -D wext -i wlan0 -c /etc/wpa_supplicant.conf -dddd &
    dhcpd wlan0
    This works fine till the wpa_supplicant line. wpa_supplicant is not started in the background (as I thought, the ampersand at the end of the line would.
    So how can I get wpa_supplicant run in the background?
    Thanks in advance,
    Stefan
    Last edited by vbtricks (2008-05-11 09:13:36)

    Ramses de Norre wrote:How do you know it isn't? What exactly does happen?
    The script does not return to the user-prompt. Is an ampersand at the end of the line the correct solution, or are you unsure yourself?
    bender02 wrote:On thing is that even if it starts, it does take it a couple of seconds to connect, so it's probably not very good to run dhcpcd right after wpa_supplicant. Another thing is that you probably have a typo up there, shouldn't it be 'dhcpcd' instead of 'dhcpd'?
    Well, as the wpa_supplication command is not really run in the background the script did never execute the dhcpcd command. After having solved the above, correcting the spell-mistake will be a smaller problem. Even calling the dhcpcd command myself would be no unworkable way, the open root-shell (as I have to use another as the one calling the script is blocked) is a far greater problem...

  • [SOLVED] Running cupsd without root permission.

    Hello,
    This is a newbie question about running the CUPS daemon as a regular user.
    The Arch Wiki page on CUPS said to "start the cups ... daemon" but did not say how.
    I searched the web and found that you can start it as a root user with the following command:
    # cupsd
    At this point, I can setup a printer, and everythings prints properly. However, I have to restart cupsd each time I reboot. Being a root only command, I can't add it to my startup script.
    What do I do?
    Here are some more details:
    I installed 64 bit arch a few days ago.
    I'm not using a desktop environment, just openbox window manager. The startup script I am using is the openbox-session autostart script.
    If I run the command "cupsd" as a regular user, I get bash: /usr/bin/cupsd: Permission denied. This is how I know it will not work. This rules out a typo in the startup script.
    Here is a list of all the steps/commands used to install cups:
    Turn printer on
    $ su
    enter root password
    # pacman -S cups
    # pacman -S cups-filters
    # pacman -S ghostscript
    # pacman -S gsfonts
    # pacman -S gutenprint
    # cupsd
    # exit
    $ firefox -new-window http://localhost:631
    Adding Printers and Classes
    Add Printer
    Login as root with the root password
    Select the local printer detected
    Default Name, Description, Location
    Select the model: Canon PIXMA MP510
    Default options
    Printed a test page.
    Got excited.
    Spent 4 hours trying to run cupsd in a startup script.
    I tried to add my regular user to the lp group.
    $ su
    enter root password
    # gpasswd -a michael lp
    $ exit
    $ groups michael
    confirmed that I'm added to lp
    $ cupsd
    I tried to chmod /usr/bin/cupsd, but got a weird error message "Child exited on signal 15". I used pacman to uninstall then reinstall cups undo this attempt.
    $ su
    enter root password
    # chmod a+rwx /usr/bin/cupsd
    # exit
    $ cupsd
    Some sites said to edit /etc/cups/cupsd.conf and comment out some lines. However, none of the lines mentioned exist in my /etc/cups/cupsd.conf file. I tried to comment out a few that looked close, but no success. I ended up commenting out everything and still no success. I used pacman to uninstall then reinstall cups undo this attempt, returning /etc/cups/cupsd.conf to it's original condition. Here is the file:
    # "$Id: cupsd.conf.in 7888 2008-08-29 21:16:56Z mike $"
    # Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a
    # complete description of this file.
    # Log general information in error_log - change "warn" to "debug"
    # for troubleshooting...
    LogLevel warn
    # Only listen for connections from the local machine.
    Listen localhost:631
    Listen /run/cups/cups.sock
    # Show shared printers on the local network.
    Browsing On
    BrowseLocalProtocols dnssd
    # Default authentication type, when authentication is required...
    DefaultAuthType Basic
    # Web interface setting...
    WebInterface Yes
    # Restrict access to the server...
    <Location />
    Order allow,deny
    </Location>
    # Restrict access to the admin pages...
    <Location /admin>
    Order allow,deny
    </Location>
    # Restrict access to configuration files...
    <Location /admin/conf>
    AuthType Default
    Require user @SYSTEM
    Order allow,deny
    </Location>
    # Set the default printer/job policies...
    <Policy default>
    # Job/subscription privacy...
    JobPrivateAccess default
    JobPrivateValues default
    SubscriptionPrivateAccess default
    SubscriptionPrivateValues default
    # Job-related operations must be done by the owner or an administrator...
    <Limit Create-Job Print-Job Print-URI Validate-Job>
    Order deny,allow
    </Limit>
    <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
    </Limit>
    # All administration operations require an administrator to authenticate...
    <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
    </Limit>
    # All printer operations require a printer operator to authenticate...
    <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
    </Limit>
    # Only the owner or an administrator can cancel or authenticate a job...
    <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
    </Limit>
    <Limit All>
    Order deny,allow
    </Limit>
    </Policy>
    # Set the authenticated printer/job policies...
    <Policy authenticated>
    # Job/subscription privacy...
    JobPrivateAccess default
    JobPrivateValues default
    SubscriptionPrivateAccess default
    SubscriptionPrivateValues default
    # Job-related operations must be done by the owner or an administrator...
    <Limit Create-Job Print-Job Print-URI Validate-Job>
    AuthType Default
    Order deny,allow
    </Limit>
    <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
    </Limit>
    # All administration operations require an administrator to authenticate...
    <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
    </Limit>
    # All printer operations require a printer operator to authenticate...
    <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
    </Limit>
    # Only the owner or an administrator can cancel or authenticate a job...
    <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
    </Limit>
    <Limit All>
    Order deny,allow
    </Limit>
    </Policy>
    # End of "$Id: cupsd.conf.in 7888 2008-08-29 21:16:56Z mike $".
    Thanking those in advance that can help.
    Last edited by mrallaire (2013-10-20 05:37:52)

    Well, the problem is now resolved. After using my wife's printer for 1.5 months I finally had the time to try it again. I got it working. I entered a lot of different commands, but the following is what finally did the trick. The ideas came from ThomasR on another forum post: https://bbs.archlinux.org/viewtopic.php?id=35567
    <code>
    # killall cupsd
    # groupadd printadmin
    # usermod -aG printadmin myusername
    # nano /etc/cups/cupsd.conf
    Add the following to the bottom of the file and save:
       SystemGroup printadmin
    # cupsd
    Add the printer using the web-based administration interface (in the web browser, go to URL http://localhost:631)
    </code>
    I looks like the lp group stuff that I entered in my first post was a few commands short of being effective. The printadmin group commands worked wonderfully. After rebooting the computer the change stuck, so I never had to restart the cups daemon each time I rebooted the computer.
    I don't know what way is better to start the cups daemon, cupsd or systemctl.
    <code>
    # cupsd
    vs.
    # systemctl enable cups.service
    # systemctl start cups.service
    </code>

  • [Solved] SMplayer / MPlayer crash, exit code: 127

    Everything worked just prior to the pacman update this morning (first in two weeks), then this happened:
    /usr/bin/mplayer: error while loading shared libraries: libx264.so.118: cannot open shared object file: No such file or directory
    x264, mplayer (build date: 10/15/11) and smplayer (build date: 11/11/10) installed from extra and community repos accordingly from a pretty up-to-date mirror (mirror @ rit.edu).  VLC, unsurprisingly, appears to be fine.
    Last edited by ssri (2011-11-12 19:34:14)

    The x264 package has just been updated http://www.archlinux.org/packages/?name=x264 - mirrors may need some more time to sync (if in doubt, check the version).
    It's a similar issue to https://bbs.archlinux.org/viewtopic.php?id=130192
    You can download the package directly from the mirror by clicking the 'Download From Mirror' link on the top right http://www.archlinux.org/packages/extra/i686/x264/ (for32-bit)
    Last edited by karol (2011-11-12 19:35:32)

  • [SOLVED] Running 32bit applications on arch x64 (Steam/bumblebee)

    Hi, guys. I tried to use native steam on my laptop, and I got a usual problem  https://support.steampowered.com/kb_art … -EYZB-7457 .
    I 'm using bumblebee and I suppose I have mistakes in my lib32 packages. So it would be nice if someone explained what's wrong with it. Tried a lot of suggestions from other threads I might break it by myself=/. So what i have:
    $ optirun steam
    Running Steam on arch 64-bit
    STEAM_RUNTIME is enabled automatically
    Installing breakpad exception handler for appid(steam)/version(1383158641_client)
    [VGL] WARNING: The OpenGL rendering context obtained on X display
    [VGL] :8 is indirect, which may cause performance to suffer.
    [VGL] If :8 is a local X display, then the framebuffer device
    [VGL] permissions may be set incorrectly.
    Installing breakpad exception handler for appid(steam)/version(1383158641_client)
    unlinked 0 orphaned pipes
    Installing breakpad exception handler for appid(steam)/version(1383158641_client)
    Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
    Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
    Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
    [1117/154407:ERROR:object_proxy.cc(239)] Failed to call method: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.NetworkManager was not provided by any .service files
    [1117/154407:WARNING:proxy_service.cc(958)] PAC support disabled because there is no system implementation
    [VGL] WARNING: The OpenGL rendering context obtained on X display
    [VGL] :8 is indirect, which may cause performance to suffer.
    [VGL] If :8 is a local X display, then the framebuffer device
    [VGL] permissions may be set incorrectly.
    Error: OpenGL GLX context is not using direct rendering, which may cause performance problems.
    For more information visit https://support.steampowered.com/kb_article.php?ref=9938-EYZB-7457.
    Installing breakpad exception handler for appid(steam)/version(1383158641_client)
    Installing breakpad exception handler for appid(steam)/version(1383158641_client)
    Installing breakpad exception handler for appid(steam)/version(1383158641_client)
    $ glxinfo32
    name of display: :0.0
    libGL: OpenDriver: trying /usr/lib32/xorg/modules/dri/tls/i965_dri.so
    libGL: OpenDriver: trying /usr/lib32/xorg/modules/dri/i965_dri.so
    libGL error: dlopen /usr/lib32/xorg/modules/dri/i965_dri.so failed (/usr/lib32/xorg/modules/dri/i965_dri.so: cannot open shared object file: No such file or directory)
    libGL error: unable to load driver: i965_dri.so
    libGL error: driver pointer missing
    libGL error: failed to load driver: i965
    libGL: OpenDriver: trying /usr/lib32/xorg/modules/dri/tls/swrast_dri.so
    libGL: OpenDriver: trying /usr/lib32/xorg/modules/dri/swrast_dri.so
    libGL: Can't open configuration file /home/bubka/.drirc: No such file or directory.
    libGL: Can't open configuration file /home/bubka/.drirc: No such file or directory.
    libGL: Can't open configuration file /home/bubka/.drirc: No such file or directory.
    libGL: Can't open configuration file /home/bubka/.drirc: No such file or directory.
    libGL: Can't open configuration file /home/bubka/.drirc: No such file or directory.
    libGL: Can't open configuration file /home/bubka/.drirc: No such file or directory.
    libGL: Can't open configuration file /home/bubka/.drirc: No such file or directory.
    libGL: Can't open configuration file /home/bubka/.drirc: No such file or directory.
    libGL: Can't open configuration file /home/bubka/.drirc: No such file or directory.
    display: :0 screen: 0
    direct rendering: Yes
    server glx vendor string: SGI
    server glx version string: 1.4
    server glx extensions:
    $ optirun glxinfo32
    name of display: :0.0
    [VGL] WARNING: The OpenGL rendering context obtained on X display
    [VGL] :8 is indirect, which may cause performance to suffer.
    [VGL] If :8 is a local X display, then the framebuffer device
    [VGL] permissions may be set incorrectly.
    [VGL] WARNING: The OpenGL rendering context obtained on X display
    [VGL] :8 is indirect, which may cause performance to suffer.
    [VGL] If :8 is a local X display, then the framebuffer device
    [VGL] permissions may be set incorrectly.
    display: :0 screen: 0
    direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
    server glx vendor string: VirtualGL
    server glx version string: 1.4
    server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGI_make_current_read, GLX_SUN_get_transparent_index
    client glx vendor string: VirtualGL
    client glx version string: 1.4
    client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGI_make_current_read, GLX_SUN_get_transparent_index
    GLX version: 1.4
    GLX extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGI_make_current_read, GLX_SUN_get_transparent_index
    OpenGL vendor string: NVIDIA Corporation
    OpenGL renderer string: GeForce 310M/PCIe/SSE2
    OpenGL version string: 2.1.2 NVIDIA 325.15
    OpenGL shading language version string: 1.20 NVIDIA via Cg compiler
    # pacman -Qs lib32
    local/lib32-alsa-lib 1.0.27.2-1
    An alternative implementation of Linux sound support (32 bit)
    local/lib32-attr 2.4.47-1
    Extended attribute support library for ACL support (32-bit)
    local/lib32-bzip2 1.0.6-1
    A high-quality data compression program (32-bit)
    local/lib32-dbus 1.6.16-1
    Freedesktop.org message bus system (32-bit)
    local/lib32-elfutils 0.157-1
    Collection of libraries for working with ELF object files and DWARF
    debugging information (32-bit)
    local/lib32-expat 2.1.0-1
    An XML Parser library written in C (32 bit)
    local/lib32-flac 1.3.0-1
    Free Lossless Audio Codec (32-bit)
    local/lib32-fontconfig 2.11.0-1
    A library for configuring and customizing font access (32-bit)
    local/lib32-freetype2 2.5.0.1-1
    TrueType font rendering library (32-bit)
    local/lib32-gcc-libs 4.8.2-4
    Runtime libraries shipped by GCC (32-bit)
    local/lib32-glew 1.10.0-1
    A cross-platform C/C++ extension loading library (32 bit)
    local/lib32-glib2 2.38.1-1
    Common C routines used by GTK+ 2.4 and other libs (32-bit)
    local/lib32-glibc 2.18-10
    GNU C Library for multilib
    local/lib32-glu 9.0.0-2
    Mesa OpenGL utility library (32 bits)
    local/lib32-json-c 0.11-1
    A JSON implementation in C (32-bit)
    local/lib32-lcms2 2.5-1
    Small-footprint color management engine, version 2 (32-bit)
    local/lib32-libasyncns 0.8-6
    A C library for Linux/Unix for executing name service queries
    asynchronously (32-bit)
    local/lib32-libcap 2.22-2
    POSIX 1003.1e capabilities (32-bit)
    local/lib32-libdrm 2.4.47-1
    Userspace interface to kernel DRM services (32-bit)
    local/lib32-libffi 3.0.13-1
    A portable, high level programming interface to various calling conventions
    (32-bit)
    local/lib32-libgcrypt 1.5.3-1
    General purpose cryptographic library based on the code from GnuPG (32-bit)
    local/lib32-libgpg-error 1.12-1
    Support library for libgcrypt (32-bit)
    local/lib32-libice 1.0.8-1
    X11 Inter-Client Exchange library (32-bit)
    local/lib32-libjpeg-turbo 1.3.0-3
    libjpeg derivative with accelerated baseline JPEG compression and
    decompression (32-bit)
    local/lib32-libmng 2.0.2-1
    A collection of routines used to create and manipulate MNG format graphics
    files (32-bit)
    local/lib32-libogg 1.3.1-1
    Ogg bitstream and framing library (32-bit)
    local/lib32-libpciaccess 0.13.2-1
    X11 PCI access library (32-bit
    local/lib32-libpng 1.6.6-1
    A collection of routines used to create PNG format graphics files (32-bit)
    local/lib32-libpulse 4.0-6
    A featureful, general-purpose sound server (32-bit client libraries)
    local/lib32-libsm 1.2.2-1
    X11 Session Management library (32-bit)
    local/lib32-libsndfile 1.0.25-2
    A C library for reading and writing files containing sampled sound (32-bit)
    local/lib32-libtiff 4.0.3-2
    Library for manipulation of TIFF images (32-bit)
    local/lib32-libvorbis 1.3.3-1
    Vorbis codec library (32-bit)
    local/lib32-libx11 1.6.2-1
    X11 client-side library (32-bit)
    local/lib32-libxau 1.0.8-1
    X11 authorisation library (32-bit)
    local/lib32-libxcb 1.9.1-1
    X11 client-side library (32-bit)
    local/lib32-libxcursor 1.1.14-1
    X cursor management library (32-bit)
    local/lib32-libxdamage 1.1.4-1
    X11 damaged region extension library (32-bit)
    local/lib32-libxdmcp 1.1.1-1
    X11 Display Manager Control Protocol library (32-bit)
    local/lib32-libxext 1.3.2-1
    X11 miscellaneous extensions library (32-bit)
    local/lib32-libxfixes 5.0.1-1
    X11 miscellaneous 'fixes' extension library (32-bit)
    local/lib32-libxi 1.7.2-1
    X11 Input extension library (32-bit)
    local/lib32-libxmu 1.1.2-1
    X11 miscellaneous micro-utility library (32-bit)
    local/lib32-libxrandr 1.4.2-1
    X11 RandR extension library (32-bit)
    local/lib32-libxrender 0.9.8-1
    X Rendering Extension client library (32-bit)
    local/lib32-libxss 1.2.2-1
    X11 Screen Saver extension library (32-bit)
    local/lib32-libxt 1.1.4-1
    X11 toolkit intrinsics library (32-bit)
    local/lib32-libxtst 1.2.2-1
    X11 Testing -- Resource extension library (32-bit)
    local/lib32-libxv 1.0.10-1
    X11 Video extension library (32-bit)
    local/lib32-libxxf86vm 1.1.3-1
    X11 XFree86 video mode extension library (32-bit)
    local/lib32-llvm-libs 3.3-1
    Low Level Virtual Machine (runtime library)(32-bit)
    local/lib32-mesa 9.2.3-1
    an open-source implementation of the OpenGL specification (32-bit)
    local/lib32-mesa-demos 8.1.0-3
    Mesa demos and tools (32-bit)
    local/lib32-mesa-libgl 9.2.3-1
    Mesa 3-D graphics library (32-bit)
    local/lib32-nvidia-utils 331.20-1
    NVIDIA drivers utilities (32-bit)
    local/lib32-openal 1.15.1-1
    OpenAL audio library for use with opengl (32-bit)
    local/lib32-openssl 1.0.1.e-2
    The Open Source toolkit for Secure Sockets Layer and Transport Layer
    Security (32-bit)
    local/lib32-pcre 8.33-1
    A library that implements Perl 5-style regular expressions (32-bit)
    local/lib32-primus 20131027-1
    Faster OpenGL offloading for Bumblebee (32-bit)
    local/lib32-qt4 4.8.5-6
    A cross-platform application and UI framework (32-bit)
    local/lib32-sqlite 3.8.1-1
    A C library that implements an SQL database engine (32-bit)
    local/lib32-systemd 208-1
    system and service manager (32-bit)
    local/lib32-util-linux 2.24-1
    Miscellaneous system utilities for Linux (32-bit)
    local/lib32-v4l-utils 1.0.0-2
    Userspace tools and conversion library for Video 4 Linux (32-bit)
    local/lib32-virtualgl 2.3.2-2
    32-bit serverside components for 64-bit VirtualGL servers
    local/lib32-xz 5.0.5-1
    Library and command line tools for XZ and LZMA compressed files (32-bit)
    local/lib32-zlib 1.2.8-1
    Compression library implementing the deflate compression method found in
    gzip and PKZIP (32-bit)
    Thanks
    Last edited by bubka (2013-11-17 14:38:38)

    Direct rendering is working for me. Here's a list of all lib32 packages installed on my system:
    lib32-acl
    lib32-alsa-lib
    lib32-alsa-plugins
    lib32-atk
    lib32-attr
    lib32-bzip2
    lib32-cairo
    lib32-curl
    lib32-dbus
    lib32-e2fsprogs
    lib32-elfutils
    lib32-expat
    lib32-flac
    lib32-flashplugin
    lib32-fontconfig
    lib32-freetype2
    lib32-gcc-libs
    lib32-gdk-pixbuf2
    lib32-gettext
    lib32-glew
    lib32-glib
    lib32-glib2
    lib32-glibc
    lib32-glu
    lib32-gmp
    lib32-gnutls
    lib32-gtk2
    lib32-harfbuzz
    lib32-icu
    lib32-intel-dri
    lib32-json-c
    lib32-keyutils
    lib32-krb5
    lib32-lcms2
    lib32-libasyncns
    lib32-libcanberra
    lib32-libcap
    lib32-libcups
    lib32-libdrm
    lib32-libffi
    lib32-libgcrypt
    lib32-libgnome-keyring
    lib32-libgpg-error
    lib32-libice
    lib32-libjpeg-turbo
    lib32-libjpeg6-turbo
    lib32-libldap
    lib32-libltdl
    lib32-libmng
    lib32-libogg
    lib32-libpciaccess
    lib32-libpng
    lib32-libpng12
    lib32-libpng15
    lib32-libpulse
    lib32-libsm
    lib32-libsndfile
    lib32-libssh2
    lib32-libtasn1
    lib32-libtiff
    lib32-libtxc_dxtn
    lib32-libvorbis
    lib32-libx11
    lib32-libxau
    lib32-libxcb
    lib32-libxcomposite
    lib32-libxcursor
    lib32-libxdamage
    lib32-libxdmcp
    lib32-libxext
    lib32-libxfixes
    lib32-libxft
    lib32-libxi
    lib32-libxinerama
    lib32-libxmu
    lib32-libxrandr
    lib32-libxrender
    lib32-libxss
    lib32-libxt
    lib32-libxtst
    lib32-libxv
    lib32-libxxf86vm
    lib32-llvm-libs
    lib32-mesa
    lib32-mesa-libgl
    lib32-mpg123
    lib32-ncurses
    lib32-nettle
    lib32-nspr
    lib32-nss
    lib32-nvidia-utils
    lib32-openal
    lib32-openssl
    lib32-p11-kit
    lib32-pango
    lib32-pcre
    lib32-pixman
    lib32-primus
    lib32-qt4
    lib32-sdl
    lib32-sdl_image
    lib32-sdl_ttf
    lib32-sqlite
    lib32-systemd
    lib32-tdb
    lib32-util-linux
    lib32-v4l-utils
    lib32-virtualgl
    lib32-xz
    lib32-zlib

  • [SOLVED] Run hook on external monitor connect/disconnect

    I want to run a script whenever I connect or disconnect an external monitor from my laptop.
    Is there a hook I can create somewhere to achieve this?
    Last edited by Bruce Connor (2013-07-16 16:03:03)

    Unfortunately that doesn't seem to be working for me. =/
    I've inserted
    echo "Action was $SRANDRD_ACTION" >> $HOME/srandrd.out
    into the script to attempt some debugging but I get no output. My guess is that the script isn't being run at all.
    Last edited by Bruce Connor (2013-07-05 22:14:49)

  • [SOLVED] Run xscreensaver when I close the laptop lid

    I have xscreensaver running in my archlinux, and with a systemd service, I can start it after waking up my laptop.
    The problem is that I like to keep my laptop running when I close the lid (for example, to go to bed while I'm downloading a file, I like to simply close my lid), but I want to lock my computer.
    In the /etc/systemd/logind.conf, there is a nice option called HandleLidSwitch, which specifies which action is invoked when the lid is closed, and there is a lock option, but It doesn't work for me.
    The option suspend works fine.
    Here is my /etc/systemd/logind.conf:
    # This file is part of systemd.
    # systemd is free software; you can redistribute it and/or modify it
    # under the terms of the GNU Lesser General Public License as published by
    # the Free Software Foundation; either version 2.1 of the License, or
    # (at your option) any later version.
    # See logind.conf(5) for details
    [Login]
    #NAutoVTs=6
    #ReserveVT=6
    #KillUserProcesses=no
    #KillOnlyUsers=
    #KillExcludeUsers=root
    #Controllers=
    #ResetControllers=cpu
    #InhibitDelayMaxSec=5
    HandlePowerKey=suspend
    #HandleSuspendKey=suspend
    #HandleHibernateKey=hibernate
    HandleLidSwitch=ignore
    #PowerKeyIgnoreInhibited=no
    #SuspendKeyIgnoreInhibited=no
    #HibernateKeyIgnoreInhibited=no
    #LidSwitchIgnoreInhibited=yes
    #IdleAction=ignore
    #IdleActionSec=30min
    Any help?
    Last edited by alomsimoy (2013-09-10 18:08:33)

    I would say that you should just have logind ignore the LidSwitch altogether.  So if it is set to ignore the lid switch, then it obviously isn't going to be entering the suspend.target (or is it the sleep.target, I can't remember).  Therefore, you are going to have to have some other way of triggering actions in response to these events.
    The lid switch sends an event to udev, so you have the option of having a udev rule that responds to this, or using acpid to start this for you.  I would recommend using acpid, as it is much more flexible in what it can allow you to do.
    Edit: acpid is not necessarily more flexible than a udev rule, as it relies on the udev events.  But it is a much easier method of setup since it simply relies of basic scripting in order to make it work.  It can allow for one central script (or collection of scripts) to handle all the different events that udev sends.  To see what kinds of things trigger a udev event, you can use udevadm monitor or if you install acpid, there is the acpi_listen option.
    Edit2:  BTW, what is it you mean by not working?  Does it still suspend on lid close, or is your xscreensaver not started?  You need to be more explicit there.  If it is still suspending, have you rebooted or restarted logind after making those changes to logind.conf?  You can't just edit the file and have the changes implemented right away, as the configuration is parsed and the settign implemented on the service start.
    Last edited by WonderWoofy (2013-09-10 17:28:05)

Maybe you are looking for