Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Save backlight brightness settings across reboots, Gnome 3

  1. #1

    Default Save backlight brightness settings across reboots, Gnome 3

    The title pretty much says it all. I was wondering if anyone knows of a way to have gnome 3 to save the backlight brightness when you reboot. Once it boots back into gnome after a certain point the brightness would be restored to what you previous had it set to.

    The current options are to set it to dim when idle, but that makes no difference here because when you unidle it goes back to what I had it set to, so that works properly.

    The problem is when rebooting the brightness is set to the default 100%, and even the ati proprietary catalyst doesn't remedy this, but I'm pretty sure in Windows 7 something sets it or sends a signal to the bios or something to retain the setting, but there is no brightness setting in the bios, so I was wondering if anyone knows of a script that might save the brightness and then restore it perhaps?

    system is amd e350/radeon 6310, newly installed openSUSE 12.1 with Gnome 3, and the default radeon free driver.

  2. #2

    Default Re: Save backlight brightness settings across reboots, Gnome 3

    BUMP

    There has to be something out there, I've been looking a lot but haven't had much luck, but I'll be sure to post when I figure something out.

  3. #3

    Default Re: Save backlight brightness settings across reboots, Gnome 3

    OK I went back to google but this is all I could really find, the first link basically does it and I'll paste the code here to, but it doesn't use the exact same layout as I have so I'm not sure what to make of it but it's a good starting point:

    https://lists.launchpad.net/ac100/msg00338.html

    Hi,
    I wrote a simple init script to save and restore backlight brightness between reboots (have taken urandom as base idea).

    If some one wants to try it:
    - save the attached script in /etc/init.d and make it executable
    - create the wanted sym link in /etc/rc*.d (I suggest rcS.d/S55brightness rc0.d/S30brightness rc6.d/S30brightness)
    - create the directory /var/lib/backlight where brightenss value will be saved

    all this as root naturally.

    My two cents ...

    Marco
    Code:
    #! /bin/sh
    ### BEGIN INIT INFO
    # Provides:          brightness
    # Required-Start:    $local_fs
    # Required-Stop:     $local_fs
    # Default-Start:     S
    # Default-Stop:      0 6
    # Short-Description: Save and restore brightness between restarts.
    # Description:       This script saves the brightness between restarts.
    #                    It is called from the boot, halt and reboot scripts.
    ### END INIT INFO
    
    [ -c /dev/urandom ] || exit 0
    
    PATH=/sbin:/bin
    SAVEDFILE=/var/lib/backlight/brightness
    . /lib/init/vars.sh
    
    . /lib/lsb/init-functions
    
    do_status () {
    	if [ -f $SAVEDFILE ] ; then
    		return 0
    	else
    		return 4
    	fi
    }
    
    case "$1" in
      start|"")
    	[ "$VERBOSE" = no ] || log_action_begin_msg "Restoring backlight brightness"
    	cat "$SAVEDFILE" >/sys/class/backlight/pwm-backlight/brightness 2>&1
    	ES=$?
    	[ "$VERBOSE" = no ] || log_action_end_msg $ES
    	;;
      stop)
    	# Carry a brightness from shut-down to start-up;
    	[ "$VERBOSE" = no ] || log_action_begin_msg "Saving backlight brightness"
    	cat /sys/class/backlight/pwm-backlight/brightness > "$SAVEDFILE" 2>&1
    	ES=$?
    	[ "$VERBOSE" = no ] || log_action_end_msg $ES
    	;;
      status)
    	do_status
    	exit $?
    	;;
      restart|reload|force-reload)
    	echo "Error: argument '$1' not supported" >&2
    	exit 3
    	;;
      *)
    	echo "Usage: brightness start|stop" >&2
    	exit 3
    	;;
    esac
    
    :
    This link mentions a good example that would work well if I know how to make a script read something from another script, if that makes sense, but I'm clueless:

    Fedora 15 – HP DV6 Laptop Screen Brightness Workaround

    Having started using Fedora and Gnome 3 I’ve encoutnered a number of issues with my HP DV6 Laptop. One of the biggest issues was that the brightness controls built in to the OS didn’t actually change the brightness of the backlight, so it was stuck on the lowest setting.

    There are a lot of ideas of how to fix it on the ‘net and I tried xbrightness, xbacklight and 3-4 different ATI drivers before I found a shell script and modified it to suit. This is the result:
    Code:
    #!/bin/sh
    clear
    echo “Enter a brightness value (1-10)”
    read brightness
    echo $brightness > /sys/devices/virtual/backlight/acpi_video0/brightness
    echo “Brightness set to $brightness.”
    Simply save as a shell script (I used brightness.sh as the filename) and run it as a super user. Enter a value in between 1 and 10 (where 1 is 10% brightness and 10 is 100%) and press enter. This will set your backlight brightness. Unfortunately it doesn’t stay set between reboots, but I plan to find a way to save the current brightness to file and create another script to run at startup and set the brightness. I’m also hoping I can use a similar method to bind to the fn-f2 and fn-f3 commands to enable the keyboard controls.

    Keep an eye out for that in the next week or two.
    And this last link might just work but it still needs modified a bit, as it's designed for modifying the backlight, AND saving and restoring it:
    Script to set-up brightness of backlight in XFCE

    Hello,
    I have written script to set-up brightness of backlight in XFCE (it will probably works with any linux distribution and X). It is only editing number in /sys/class/backlight/acpi_video0/brightness. This script works good in command line, it will decrease/increase brightness by 1 degree, but I have different problem with that script.

    When I make shortcuts in XFCE (Applications-> preferences-> keyboard -> keyboard shortcuts tab) and associate commands bright -p / bright -m with keys for changing brightness on my laptop it works properly too, but bad things is, that on one press of key, it decrease or increase brightness by 2 degrees. In other words, this script is executed twice on one press of key. How to execute it only once on one press of key?

    PS: I know, in XFCE exist plugin for regulating backlight brightness, but I didn't found, how to drive it from command line (for keyboard) and it forgets last set value, so after reboot, backlight is back on maximum.

    My script looks like that (If it help):
    Code:
    #!/bin/bash
    # Script for changing backlight brightness in /sys/class/backlight/acpi_video0/brightness
    # can take values 0-15, in real (my notebook) works only values 2-15
    
    #IMPORTANT: you must have writing rights to /sys/.../brightness (I must solute it with visudo or something like that...)
    #IMPORTANT: for proper work after reboot must exist directory .bright in your home directory and file last_bright in .bright directory 
    
    #reads content of brightness and save it into variable
    BRIGHT=$(cat /sys/class/backlight/acpi_video0/brightness)
    
    while getopts "pmlh" optname
     do
      case "$optname" in
       "p")
        #Add more brightness
        #BRIGHT++
        BRIGHT=$(($BRIGHT+1))
        #protect mechanism (BRIGHT must be lower or equal to 15)
         if (($BRIGHT>15))
         then
            BRIGHT=$((15))
         fi
        ;;
       "m")
        #decrease brightness
        #BRIGHT--
        BRIGHT=$(($BRIGHT-1))
        #protect mechanism (BRIGHT must be bigger or equal to 2)
         if (($BRIGHT<2))
         then
            BRIGHT=$((2))
         fi	
        ;;
       "l")
        echo "Loading last value of brightness."
        #Load last value, saved in file last_bright
        BRIGHT=$(cat $HOME/.bright/last_bright)
        echo "Poslední hodnota bright je $BRIGHT"
        ;;
       "h")
         echo "Help: "
         echo "-p	Increase brightness"
         echo "-m	Decrease brightness"
         echo "-l	Load last brightness value"
         echo "-h	This help"
         echo "Programmed by: ElectricZero"
         ;;
        "?")
         echo "Unkonwn argument, try bright -h for help"
         ;;
        *)
        # Should not occur
        echo "Unknown error while processing options"
        ;;
      esac
    done
    echo "Brightness set on $BRIGHT"
    #Save variable BRIGHT into file brightness
    echo $BRIGHT > /sys/class/backlight/acpi_video0/brightness
    #Save variable BRIGHT into file last_bright
    echo $BRIGHT > $HOME/.bright/last_bright
    I'll try that last one out just as soon as I figure out how to properly create startup scripts, and post back here. I'm hopeful.

  4. #4

    Default Re: Save backlight brightness settings across reboots, Gnome 3

    Okay so I looked over that last one and did some reading about editing sudoers etc and it appears I need to do as suggested in that last script and add it to run as root via sudoers file, this is what I've done:

    created the directory and file mentioned in home, i.e .bright and the empty file last_bright inside.

    next I created a blank file /etc/init.d/save_brightness containing the last script which I'm putting here again for reference and chmod +x it

    Code:
    #!/bin/bash
    # Script for changing backlight brightness in /sys/class/backlight/acpi_video0/brightness
    # can take values 0-15, in real (my notebook) works only values 2-15
    
    #IMPORTANT: you must have writing rights to /sys/.../brightness (I must solute it with visudo or something like that...)
    #IMPORTANT: for proper work after reboot must exist directory .bright in your home directory and file last_bright in .bright directory 
    
    #reads content of brightness and save it into variable
    BRIGHT=$(cat /sys/class/backlight/acpi_video0/brightness)
    
    while getopts "pmlh" optname
     do
      case "$optname" in
       "p")
        #Add more brightness
        #BRIGHT++
        BRIGHT=$(($BRIGHT+1))
        #protect mechanism (BRIGHT must be lower or equal to 15)
         if (($BRIGHT>15))
         then
            BRIGHT=$((15))
         fi
        ;;
       "m")
        #decrease brightness
        #BRIGHT--
        BRIGHT=$(($BRIGHT-1))
        #protect mechanism (BRIGHT must be bigger or equal to 2)
         if (($BRIGHT<2))
         then
            BRIGHT=$((2))
         fi	
        ;;
       "l")
        echo "Loading last value of brightness."
        #Load last value, saved in file last_bright
        BRIGHT=$(cat $HOME/.bright/last_bright)
        echo "Poslední hodnota bright je $BRIGHT"
        ;;
       "h")
         echo "Help: "
         echo "-p	Increase brightness"
         echo "-m	Decrease brightness"
         echo "-l	Load last brightness value"
         echo "-h	This help"
         echo "Programmed by: ElectricZero"
         ;;
        "?")
         echo "Unkonwn argument, try bright -h for help"
         ;;
        *)
        # Should not occur
        echo "Unknown error while processing options"
        ;;
      esac
    done
    echo "Brightness set on $BRIGHT"
    #Save variable BRIGHT into file brightness
    echo $BRIGHT > /sys/class/backlight/acpi_video0/brightness
    #Save variable BRIGHT into file last_bright
    echo $BRIGHT > $HOME/.bright/last_bright
    Here I come to a hit and miss step where i believe I should be adding /sys/class/backlight/acpi_video0/brightness/sys/class/backlight/acpi_video0/brightness to my sudoers file so I've done for example:
    su
    EDITOR=gedit gnomesu visudo
    and basically have this towards the end:
    Code:
    ##
    ## Runas alias specification
    ##
    
    l300lvl ALL=(root) NOPASSWD: /sys/class/backlight/acpi_video0/brightness
    I then reboot and try to start the script via command line or yast>system services(runlevel) and in terminal i get:
    # /etc/init.d/save_brightness -p
    /etc/init.d/save_brightness: line 3: /sys/class/backlight/acpi_video0/brightness: Permission denied
    /etc/init.d/save_brightness: line 7: syntax error near unexpected token `)'
    /etc/init.d/save_brightness: line 7: `solute it with visudo or something like that...)'

    in system services i receive:
    /etc/init.d/save_brightness start returned 2 (invalid or excess arguments):

    I was getting something different in runlevel/services but regardless terminal still says denied?

    What am I missing, perhaps I need to be running as root instead of my user name, but if that's the case I'm guessing my syntax needs changed on that line

    Perhaps:

    root ALL = (ALL) NOPASSWD: /sys/class/backlight/acpi_video0/brightness

    Not sure I should just take chances in sudoers though... Any hints?

  5. #5

    Default Re: Save backlight brightness settings across reboots, Gnome 3

    BUMP!

    I've tried getting help from a couple people but haven't had much luck, mostly they don't know about suse. It seems I keep running into various permissions problems where suse handles permissions in a totally different manner than I am used to, and I'm not sure if it's more secure this way or not, but a simple media player can't even save files due to these barriers, so I was wondering if anyone had any enlightenment other than switching back to Ubuntu/Mint?

  6. #6
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Save backlight brightness settings across reboots, Gnome 3

    On 12/02/2011 04:46 AM, l300lvl wrote:
    >
    > BUMP!
    >
    > I've tried getting help from a couple people but haven't had much luck,
    > mostly they don't know about suse. It seems I keep running into various
    > permissions problems where suse handles permissions in a totally
    > different manner than I am used to,


    i have no permission problems...none at all....tell me, have you:

    - used chown or chmod to adjust permissions in order to be able to
    create, move, delete, copy or edit any file or directory?
    - logged into Gnome 3 as root?
    - in YaST > Security Center and Hardening configured secure file permissions
    - in YaST > Novell AppArmor, adjusted any settings?

    > and I'm not sure if it's more secure
    > this way or not, but a simple media player can't even save files due to
    > these barriers


    i've never seen that either, and i read that before i posted the several
    questions above..

    can you point me to the forum URL where you posted that problem...(i'd
    like to review it)


    > so I was wondering if anyone had any enlightenment other
    > than switching back to Ubuntu/Mint?


    you ask a gnome3 question and there just are not that many gnome3 users
    here! and therefore not a lot of helpers! you might be better off asking
    somewhere here: http://www.gnome.org/ [maybe you find out they know it
    is broken....is there a bugzilla on it?]

    of course, switching to any distro is always you option, and i
    personally (and many of the others here) encourage all to use what works
    for them!

    but, you seem to be having problems that the longer time openSUSE
    users/helpers are not having....so, i'm *guessing* that some of the
    problems may be due to administration practices which might work on a
    different distro, but not openSUSE..

    --
    DD http://tinyurl.com/DD-Caveat
    openSUSE®, the "German Engineered Automobiles" of operating systems!

  7. #7

    Default Re: Save backlight brightness settings across reboots, Gnome 3

    i have no permission problems...none at all....tell me, have you:

    - used chown or chmod to adjust permissions in order to be able to
    create, move, delete, copy or edit any file or directory?
    - logged into Gnome 3 as root?
    - in YaST > Security Center and Hardening configured secure file permissions
    - in YaST > Novell AppArmor, adjusted any settings?

    I have used chmod and chown a number of times, mostly only on my home partition but for instance I did chmod on the script I posted above, but I can pretty much go through and find any files I've touched and none were system files except for when I did a chown on that home directory, which didn't fix everything the way I had hoped, as ultimately Guayadeque for some reason gets denied write permissions for simple image files(album covers)

    I dont even know HOW to log in to Gnome 3 as root.

    I've touched nothing in yast>security center as I don't understand most of it, and I don't have App Armor anywhere I can find.

    What I can say is, I disabled the firewall right away, just by opening yast>firewall and clicking disable. Hopefully that is allowed without needing to change file permissions afterwards.


    i've never seen that either, and i read that before i posted the several
    questions above..

    can you point me to the forum URL where you posted that problem...(i'd
    like to review it)
    Gladly, it's Guayadeque and I've built from svn, there were no build errors and I made sure all dependencies, libs/dev libs mostly, were installed.
    saving album art doesnt work - Guayadeque Music Player


    you ask a gnome3 question and there just are not that many gnome3 users
    here! and therefore not a lot of helpers! you might be better off asking
    somewhere here: GNOME [maybe you find out they know it
    is broken....is there a bugzilla on it?]

    of course, switching to any distro is always you option, and i
    personally (and many of the others here) encourage all to use what works
    for them!

    but, you seem to be having problems that the longer time openSUSE
    users/helpers are not having....so, i'm *guessing* that some of the
    problems may be due to administration practices which might work on a
    different distro, but not openSUSE.
    I can agree that I am not the greatest linux sys admin but I don't understand, and I'm willing to accept that it just may be beyond my understanding of linux, as to why file permissions/file system permissions and/or root permissions however you would say it, would vary so much from one DE to the next? Wouldn't it be the same situation on kde?

  8. #8
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Save backlight brightness settings across reboots, Gnome 3

    On 12/02/2011 07:06 PM, l300lvl wrote:
    >
    > I have used chmod and chown a number of times, mostly only on my home
    > partition but for instance I did chmod on the script I posted above, but
    > I can pretty much go through and find any files I've touched and none
    > were system files except for when I did a chown on that home directory,
    > which didn't fix everything the way I had hoped


    that is what i'm talking about....i can't remember the last time i _had_
    to use either....why do you use them? what problem do you try to 'fix'
    by using either? and, why would there be any system files in your /home
    directory??



    >, as ultimately
    > Guayadeque for some reason gets denied write permissions for simple
    > image files(album covers)


    so, tell me about /SDAthree/l300lvl/Music/Usher-Discography/Usher-8701/

    where is it? (internal hard disk, usb disk, networked disk different
    machine [accessed how?])

    what is the file system in use?

    is 'SDAthree' a partition on a drive? how is it mounted? is it
    referenced in fstab? how?

    please show me the user terminal in/output of
    Code:
    ls -halR /SDAthree/l300lvl/Music/Usher-Discography/
    -----------
    and, by the way as i look at what you posted to guayadeque.org

    Code:
    05:38:00 PM: Error: can't open file
    '/SDAthree/l300lvl/Music/Usher-Discography/Usher-8701/cover.jpg' (error
    13: Permission denied)
    05:38:00 PM: Error: Can't load image from file
    '/SDAthree/l300lvl/Music/Usher-Discography/Usher-8701/cover.jpg': file
    does not exist.
    05:38:00 PM: Error: Invalid cover file
    '/SDAthree/l300lvl/Music/Usher-Discography/Usher-8701/cover.jpg'
    i'm not 100% sure why the permission was denied other than what it says:
    "file does not exist" and/or the file is "invalid" which, afaik has
    nothing to do with "a simple media player can't even save files due to
    these barriers".... ???


    > I dont even know HOW to log in to Gnome 3 as root.


    good.


    > I've touched nothing in yast>security center as I don't understand most
    > of it, and I don't have App Armor anywhere I can find.


    good.

    > What I can say is, I disabled the firewall right away, just by opening
    > yast>firewall and clicking disable. Hopefully that is allowed without
    > needing to change file permissions afterwards.


    why would you want to do that?



    >> i've never seen that either, and i read that before i posted the several
    >> questions above..
    >>
    >> can you point me to the forum URL where you posted that problem...(i'd
    >> like to review it)
    >>

    >
    > Gladly, it's Guayadeque and I've built from svn, there were no build
    > errors and I made sure all dependencies, libs/dev libs mostly, were
    > installed.
    > 'saving album art doesnt work - Guayadeque Music Player'
    > (http://tinyurl.com/7emfyyk)


    i can see where you wrote on guayadeque.org "I posted on their forums
    just now regarding permissions so hopefully I'll get some results" but i
    don't actually see the post you refer to...where is it? wait! are you
    referencing _this_ thread?? _this_ one with the subject "backlight
    brightness"? where is the one with the subject "permissions problems"??


    >
    > I can agree that I am not the greatest linux sys admin


    me either (there are, for SURE, a bunch of stuff i have no clue about...


    > but I don't
    > understand, and I'm willing to accept that it just may be beyond my
    > understanding of linux, as to why file permissions/file system
    > permissions and/or root permissions however you would say it, would vary
    > so much from one DE to the next?


    no, i never said they vary from one Desktop Environment to the next....

    in fact, as far as i know none of those things vary from one
    distribution to the next....what varies is thing like ... well, for
    instance Ubuntu/Mint lock the user out of root, and require them to use
    sudo....so, a user from there might come here and (i've seen it) try to
    use sudo like they did back on an earlier system and fail....and
    immediately start changing file permissions to allow them to
    copy/edit/etc instead of becoming root and doing the task correctly
    (correctly _here_)

    and, suddenly they have a tangle of file permissions that block and
    confound.....


    > Wouldn't it be the same situation on kde?


    i am not talking about the differences between KDE and Gnome, but rather
    Debian (and derivative) and openSUSE..

    file permissions are not set/enforced at the DE level but rather at the
    OS level..

    --
    DD http://tinyurl.com/DD-Caveat
    openSUSE®, the "German Engineered Automobiles" of operating systems!

  9. #9

    Default Re: Save backlight brightness settings across reboots, Gnome 3

    that is what i'm talking about....i can't remember the last time i _had_
    to use either....why do you use them? what problem do you try to 'fix'
    by using either? and, why would there be any system files in your /home
    directory??
    Well for instance I used chown as well as chmod on /SDAthree which is a mount point for sda3, so perhaps that would be considered 'system', if you get me? sda3 is basically a partition I use for backup/storage, which is ext4 fs. I don't know why I called it a home folder, as it isn't home for my user, it just has the same name. It was a left over home partition from an old install that I deleted, I just kept that partition which is why I did a chown. My home directory is located elsewhere and is not related in any way to anything on sda3

    so, tell me about /SDAthree/l300lvl/Music/Usher-Discography/Usher-8701/

    where is it? (internal hard disk, usb disk, networked disk different
    machine [accessed how?])

    what is the file system in use?

    is 'SDAthree' a partition on a drive? how is it mounted? is it
    referenced in fstab? how?

    please show me the user terminal in/output of
    Code:

    ls -halR /SDAthree/l300lvl/Music/Usher-Discography/
    it's on sda3, SDAthree is a mount point pointing to /dev/sda3. sda3 is ext4. i added it to fstab via:
    http://forums.opensuse.org/english/g...s-boot-hd.html

    Code:
    ~> ls -halR /SDAthree/l300lvl/Music/Usher-Discography/
    /SDAthree/l300lvl/Music/Usher-Discography/:
    total 28K
    drwxr-xr-x   3 root root 4.0K Dec  2 14:12 .
    drwxr-xr-x 258 root root  20K Dec  2 14:09 ..
    drwxr-xr-x   2 root root 4.0K Dec  2 14:14 Usher-8701
    
    /SDAthree/l300lvl/Music/Usher-Discography/Usher-8701:
    total 93M
    drwxr-xr-x 2 root root 4.0K Dec  2 14:14 .
    drwxr-xr-x 3 root root 4.0K Dec  2 14:12 ..
    -rw-r--r-- 1 root root 1.2M Apr 15  2011 10-usher-without_u_(interlude).mp3
    -rw-r--r-- 1 root root 7.5M Apr 15  2011 11-usher-can_u_help_me.mp3
    -rw-r--r-- 1 root root 8.5M Apr 15  2011 12-usher-how_do_i_say.mp3
    -rw-r--r-- 1 root root 5.2M Apr 15  2011 13-usher-hottest_thing.mp3
    -rw-r--r-- 1 root root 5.5M Apr 15  2011 14-usher-good_ol_ghetto.mp3
    -rw-r--r-- 1 root root 4.6M Apr 15  2011 15-usher-u-turn.mp3
    -rw-r--r-- 1 root root 5.7M Apr 15  2011 16-usher-t.t.p.mp3
    -rw-r--r-- 1 root root 5.7M Apr 15  2011 17-usher-separated.mp3
    -rw-r--r-- 1 root root 1.1M Apr 15  2011 1-usher-intro-lude_8701.mp3
    -rw-r--r-- 1 root root 6.5M Apr 15  2011 2-usher-u_remind_me.mp3
    -rw-r--r-- 1 root root 6.3M Apr 15  2011 3-usher-i_dont_know_(feat_p_diddy).mp3
    -rw-r--r-- 1 root root 7.1M Apr 15  2011 4-usher-twork_it_out.mp3
    -rw-r--r-- 1 root root 5.7M Apr 15  2011 5-usher-u_got_it_bad.mp3
    -rw-r--r-- 1 root root 5.5M Apr 15  2011 6-usher-pop_ya_collar.mp3
    -rw-r--r-- 1 root root 5.9M Apr 15  2011 7-usher-if_i_want_to.mp3
    -rw-r--r-- 1 root root 5.5M Apr 15  2011 8-usher-i_cant_let_u_go.mp3
    -rw-r--r-- 1 root root 6.0M Apr 15  2011 9-usher-u_dont_have_to_call.mp3
    -rw-r--r-- 1 root root  18K Nov 30 17:55 cover.jpg
    in the above cover.jpg exists as a result of running guayadeque as root.

    i'm not 100% sure why the permission was denied other than what it says:
    "file does not exist" and/or the file is "invalid" which, afaik has
    nothing to do with "a simple media player can't even save files due to
    these barriers".... ???
    I was frustrated. I don't really understand what is going on.

    > What I can say is, I disabled the firewall right away, just by opening
    > yast>firewall and clicking disable. Hopefully that is allowed without
    > needing to change file permissions afterwards.

    why would you want to do that?
    I saw firewall as an un-needed service. Would disabling it have any affect on me other than having less security via outside network traffic? I can live with it if I 'need' to, as it's not a huge consumer of system resources, I was just accustomed to not having one running.

    i can see where you wrote on guayadeque.org "I posted on their forums
    just now regarding permissions so hopefully I'll get some results" but i
    don't actually see the post you refer to...where is it? wait! are you
    referencing _this_ thread?? _this_ one with the subject "backlight
    brightness"? where is the one with the subject "permissions problems"??
    I did not open a new thread with this specific problem as I have so many questions I felt best not to flood the forums, so I figured I'd bring it up in this topic hoping for insight but I was in no rush to open another thread... Now that this topic is so far off-topic, I see that I made the wrong decision.

    You are right about root/running things as sudo being different on Mint/Ubuntu, as I have seen many instances in suse where running something as 'sudo command' it tells me something like this for example:

    > dmidecode
    Absolute path to 'dmidecode' is '/usr/sbin/dmidecode', so running it may require superuser privileges (eg. root).

    > sudo dmidecode
    root's password:
    sudo: dmidecode: command not found

    > su
    Password:
    /home/l300lvl # dmidecode
    # dmidecode 2.11

    and it finally works, very confusing and not what I'm used to, but I want to learn. That is one of the reasons I made the switch to suse.

  10. #10
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Save backlight brightness settings across reboots, Gnome 3

    On 12/02/2011 09:36 PM, l300lvl wrote:
    >
    > Well for instance I used chown as well as chmod on /SDAthree which is a
    > mount point for sda3, so perhaps that would be considered 'system', if
    > you get me? sda3 is basically a partition I use for backup/storage,
    > which is ext4 fs. I don't know why I called it a home folder, as it
    > isn't home for my user, it just has the same name. It was a left over
    > home partition from an old install that I deleted, I just kept that
    > partition which is why I did a chown. My home directory is located
    > elsewhere and is not related in any way to anything on sda3


    ok, now we are making progress!

    please show us the terminal input/output from

    Code:
    df -h
    cat /proc/partitions
    cat /etc/fstab
    sudo /sbin/fdisk -l
    copy/paste the in/output back to this thread using the instructions
    here: http://goo.gl/i3wnr


    >> ls -halR /SDAthree/l300lvl/Music/Usher-Discography/
    >>

    >
    > it's on sda3, SDAthree is a mount point pointing to /dev/sda3. sda3 is
    > ext4.
    > ~> ls -halR /SDAthree/l300lvl/Music/Usher-Discography/
    > /SDAthree/l300lvl/Music/Usher-Discography/:
    > total 28K
    > drwxr-xr-x 3 root root 4.0K Dec 2 14:12 .
    > drwxr-xr-x 258 root root 20K Dec 2 14:09 ..
    > drwxr-xr-x 2 root root 4.0K Dec 2 14:14 Usher-8701


    so, now we see why the application can not save a file unless it is
    running as root! do you see that "root root" on the line ending with one
    "." and ".."?

    the two dot line refers to current directory
    (/SDAthree/l300lvl/Music/Usher-Discography/) and the one dot line refers
    to the directory directly above the current directory
    (/SDAthree/l300lvl/Music/) and both of those directories are *owned* by
    root, and only useable (read/write/execute) by root user!

    which is exactly why the guayadeque can't save to it when _you_ run it
    as yourself..

    this is not a "permissions problem" it is an administrative problem...as
    soon as you get the administration of this SDAthree directory ironed out
    there will be no problem



    > I saw firewall as an un-needed service. Would disabling it have any
    > affect on me other than having less security via outside network
    > traffic? I can live with it if I 'need' to, as it's not a huge consumer
    > of system resources, I was just accustomed to not having one running.


    well, you do as you wish...i've turned off my firewall for a total of
    about 15 minutes in the last ten years of so....and, that was spread out
    among maybe a half dozen or less instances when i couldn't figure out
    what way causing my _network_ to block traffic.....i would turn off the
    firewall, immediately try again what ever was failing and if it still
    failed i immediately restarted the firewall....if it didn't fail again i
    also immediately restarted the firewall--and let it run while i tried to
    think my way though what is was in the firewall which was protecting me
    TOO good.

    this can't-save-a-file problem has _nothing_ whatsoever to do with your
    firewall...turn it back on and leave it on....please.

    > I did not open a new thread with this specific problem as I have so
    > many questions I felt best not to flood the forums,


    i understand you reasoning, but unfortunately it is exactly opposite of
    what is best for you, and the forum..

    always put only _one_ problem in each thread....that makes it easy for
    answer givers, and you, to know exactly what problem is being
    discussed...AND, it keeps the thread cleaner so that when folks google
    in looking for (in this case) "backlight brightness settings" they don't
    get confused with a big long discussion on 'permissions'...AND, the
    person who googles in looking for "why can't i save a file? it just says
    (error 13: Permission denied)" won't have to wade though brightness stuff..

    see?

    do not worry about "flooding the forums" we have lots of space and would
    rather have one million individual clean threads with one problem each,
    than have half that number with two or more problems each.


    > so I figured I'd
    > bring it up in this topic hoping for insight but I was in no rush to
    > open another thread... Now that this topic is so far off-topic, I see
    > that I made the wrong decision.
    >
    > You are right about root/running things as sudo being different on
    > Mint/Ubuntu, [snip]
    > dmidecode
    > Absolute path to 'dmidecode' is '/usr/sbin/dmidecode', so running it
    > may require superuser privileges (eg. root).


    right! sudo keeps _your_ environment, and path....and, since /user/sbin
    is not in your path, it is not in your sudo path...so, you need to be
    root to do that....


    >> su

    > Password:
    > /home/l300lvl # dmidecode
    > # dmidecode 2.11
    >
    > and it finally works


    yes but, to become root in openSUSE don't use just "su" use "su -" the
    long reason for that is somewhere in one of these:

    http://tinyurl.com/ydbwssh
    http://tinyurl.com/665h5ek

    so, we are making progress...but i need to see the output of the above
    commands to make the next move.. (we are gonna move the mount point for
    "SDAthree" to a place more in line with the "Linux Way" and give it the
    correct owner and group..

    tell me, is this a stand alone machine and you are the only user...or,
    are there several users and all of them should have the ability to both
    save, delete and listen to all the music in this /Music/ directory....

    or, should the other users have a different directory and not be allowed
    into yours....AND how about all the other space on this
    leftover-home-renamed partition...is it all for only you...or also others?

    i may not be back to this thread today.....so . . .

    --
    DD http://tinyurl.com/DD-Caveat http://tinyurl.com/DD-Hardware
    http://tinyurl.com/DD-Software
    openSUSE®, the "German Engineered Automobiles" of operating systems!

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •