On Tue, 2013-12-24 at 16:42 +0400, Reco wrote: > Hi. > > On Tue, 24 Dec 2013 13:29:28 +0100 > Ralf Mardorf <ralf.mard...@alice-dsl.net> wrote: > > > This would lead to "Error: cannot open display: :0.0". > > Sure, $ xhost +; sudo -u [...] does the trick, > > No, if you do it smart way, such as (in .xsessionrc): > > xauth extract - $DISPLAY | sudo -u user1 -- sh -c \ > "cat -> /home/user1/.Xauthority" > xauth extract - $DISPLAY | sudo -u user2 -- sh -c \ > "cat -> /home/user1/.Xauthority" > > And configure sudo to keep $DISPLAY.
20 profiles = 20 users and you will do all those settings instead of running a browser profile? This isn't the KISS principle and I prefer it the KISS way. It's not smart to make something complicated, when there is an easy solution. A lot of Linux software for good reasons provides profiles. > > > but simply using a > > profile, Firefox options -P <profile> Start with <profile>, you > > don't need to add another user, you don't need to type a password. > > Sudo can be configured for passwordless access, but that's not the > point. > > Say, one runs two instances of firefox with different profiles under the > same OS user. One also runs, say, MUA such as Evolution and clicks a > link in this MUA. Now, the question is - which instance of firefox will > open the link? From my experience the result is unpredictable. The default browser could start with a profile too and take a look at my script, you even could check the link for keywords. But again, I prefer the KISS way. The default browser for some users anyway is an issue, e.g. they don't want that browser X is opened, when browser Y is running, that's why I wrote a script to help some of them, I don't need it myself: $ cat debro #!/bin/dash # Name: Debro # Description: Use default or opened web browser # Comment: Launch default web browser or use already opened web browser # Command: /usr/local/bin/debro %u # Default browser default_b=qupzilla # Alternative browsers in order of usage browser_1=firefox browser_2=opera browser_3=rekonq last_brow=google-chrome-stable # Browser for tube websites with flash content tube_brow=google-chrome-stable if [ "$(id -u)" = "0" ]; then echo "It is not allowed to run Debro with root privileges"; exit 1 fi echo "$*" | grep tube > /dev/null case $? in 0) test -f /usr/bin/$tube_brow && exec $tube_brow "$*";; esac pidof $default_b > /dev/null case $? in 0) exec $default_b "$*";; esac pidof $browser_1 > /dev/null case $? in 0) exec $browser_1 "$*";; esac pidof $browser_2 > /dev/null case $? in 0) exec $browser_2 "$*";; esac pidof $browser_3 > /dev/null case $? in 0) exec $browser_3 "$*";; esac pidof $last_brow > /dev/null case $? in 0) exec $last_brow "$*";; *) test -f /usr/bin/$default_b && exec $default_b "$*";; esac echo "No /usr/bin/$default_b available" exit 1 Regards, Ralf -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1387892134.5471.60.camel@archlinux