You are not logged in.
Pages: 1
Hack #2 - Partition mounts, avoiding libsystemd0
Definitely going to save this one for later when I'm ready to part with gvfs and the convenience of mounting smb/nfs shares on a whim.
Here goes nothing. Not exactly "dirty hacks" but you got to understand where I'm coming from. I work with limited resources and me switching to GNU/Linux few years ago was a choice dictated primarily because my hardware isn't getting newer. Some useful (not crucial) software really takes a lot more resources than it should've and It irks me a lot
shoddy solution #1: replacement for pasystray and alternatives
I liked the functionality of pasystray, the fact that I could mute/unmute with a press of a button and the fact that It would tell me outright, what I didn't like was the mindboggling ~60M of memory it took for such a simple functionality. Unfortunately alternatives like volumeicon don't play right with pulseaudio.
#/bin/sh
getsinkname() {
pacmd stat | awk -F": " '/^Default sink name: /{print $2}'
}
getsinkvolume() {
pacmd list-sinks |
awk '/^\s+name: /{indefault = $2 == "<'"$(getsinkname)"'>"}
/^\s+volume: / && indefault {print $5; exit}'
}
getsinkstatus() {
pacmd list sinks |
awk '/^\s+name: /{indefault = $2 == "<'"$(getsinkname)"'>"}
/^\s+muted: / && indefault {print $2; exit}'
}
mutesymbol() {
if [ "$(getsinkstatus)" = "yes" ]
then
printf "<U+1F507>"
elif [ "$(getsinkstatus)" = "no" ]
then
printf "<U+1F50A>"
fi
}
if [ "$1" = "up" ]
then
pactl set-sink-volume 0 -- +5%
elif [ "$1" = "down" ]
then
pactl set-sink-volume 0 -- -5%
elif [ "$1" = "mute" ] && [ "$(getsinkstatus)" = "no" ]
then
pactl set-sink-mute 0 1
elif [ "$1" = "mute" ] && [ "$(getsinkstatus)" = "yes" ]
then
pactl set-sink-mute 0 0
fi
#notification
id="2083402"
summary="volume: $(mutesymbol)"
body="$(getsinkvolume)"
actions="[]"
hints="{}"
timeout="1"
exec gdbus call --session \
--dest org.freedesktop.Notifications \
--object-path /org/freedesktop/Notifications \
--method org.freedesktop.Notifications.Notify \
"${app_name}" "${id}" "${icon}" "${summary}" "${body}" \
"${actions}" "${hints}" "${timeout}"
Should be pretty self-explanatory. It's just an "extension" so I could get a visual feedback from pressing built-in XF86 keys on my keyboard. It produces a notification telling me the status (mute/unmute) and the volume of the currently used pulseaudio sink. The gdbus fuckery is included so it's only one notification that gets updated instead of spamming the whole screen with rectangular windows.
shoddy solution #2: replacement for redshift daemon
Redshift and redshift-gtk for controlling it takes absolutely horrendous amount of resources. There's this tiny bit of C code that provides the functionality of redshift software suite (or f.lux if you're on Windows).
http://www.tedunangst.com/flak/post/sct … emperature
It obviously slacks the most crucial feature - handling transitions between night and day automatically. So I crudely reimplemented it using tools I already run on my machine, notably cron and a scriptable shell. Entire thing is composed of three scripts, one for smooth transition at dusk, one for smooth transition at dawn and a 3rd, more "general purpose" one that handles enabling/disabling the functionality as well as runs Xorg startup in case I login in the middle of the night and don't want to get blinded.
I am however totally inexperienced when it comes to shell scripting so If you know a way to make it more efficient (case statements are really fucking long) I would gladly appreciate help.
sct-dusk-transition.sh
#!/bin/sh
getminute="$(/bin/date +%M)"
case $getminute in
"00") sct 6400;;
"02") sct 6300;;
"04") sct 6200;;
"06") sct 6100;;
"08") sct 6000;;
"10") sct 5900;;
"12") sct 5800;;
"14") sct 5700;;
"16") sct 5600;;
"18") sct 5500;;
"20") sct 5400;;
"22") sct 5300;;
"24") sct 5200;;
"26") sct 5100;;
"28") sct 5000;;
"30") sct 4900;;
"32") sct 4800;;
"34") sct 4700;;
"36") sct 4600;;
"38") sct 4500;;
"40") sct 4400;;
"42") sct 4300;;
"44") sct 4200;;
"46") sct 4100;;
"48") sct 4000;;
"50") sct 3900;;
"51") sct 3800;;
"52") sct 3700;;
"53") sct 3600;;
"54") sct 3500;;
"55") sct 3400;;
"56") sct 3300;;
"57") sct 3200;;
"58") sct 3100;;
"59") sct 3000;;
esac
sct-dawn-transition.sh
#!/bin/sh
getminute="$(/bin/date +%M)"
case $getminute in
"00") sct 3100 ;;
"02") sct 3200 ;;
"04") sct 3300 ;;
"06") sct 3400 ;;
"08") sct 3500 ;;
"10") sct 3600 ;;
"12") sct 3700 ;;
"14") sct 3800 ;;
"16") sct 3900 ;;
"18") sct 4000 ;;
"20") sct 4100 ;;
"22") sct 4200 ;;
"24") sct 4300 ;;
"26") sct 4400 ;;
"28") sct 4500 ;;
"30") sct 4600 ;;
"32") sct 4700 ;;
"34") sct 4800 ;;
"36") sct 4900 ;;
"38") sct 5000 ;;
"40") sct 5100 ;;
"42") sct 5200 ;;
"44") sct 5300 ;;
"46") sct 5400 ;;
"48") sct 5500 ;;
"50") sct 5600 ;;
"51") sct 5700 ;;
"52") sct 5800 ;;
"53") sct 5900 ;;
"54") sct 6000 ;;
"55") sct 6100 ;;
"56") sct 6200 ;;
"57") sct 6300 ;;
"58") sct 6400 ;;
"59") sct ;;
esac
And finally
sct-switcher.sh
#!/bin/sh
switch_tmp() {
if [ ! -f /tmp/sct-switch ]
then
touch /tmp/sct-switch
else
rm /tmp/sct-switch
fi
}
get_hour() {
date +%H
}
set_temp() {
case "$(get_hour)" in
(21) sct-dusk-transition.sh ;;
([2][2-3]) sct 3000 ;;
([0][0-3]) sct 3000 ;;
(04) sct-dawn-transition.sh ;;
([0][5-9]) sct ;;
([1][0-9]) sct ;;
(20) sct ;;
esac
}
if [ "$1" = "switch" ]
then
switch_tmp
fi
if [ -f /tmp/sct-switch ]
then
sct
else
set_temp
fi
And the crontab entries look like this
* 21 * * * [ ! -f /tmp/sct-switch ] && export DISPLAY=:0 && sct-dusk-transition.sh
* 04 * * * [ ! -f /tmp/sct-switch ] && export DISPLAY=:0 && sct-dawn-transition.sh
So far it's been working great. The transition is not as smooth as on redshift/f.lux but it's entirely tolerable.
* Which power management is the best one and well integrated with Devuan? powertop ?
I don't think you can get any better than tlp utilities, especially since you use a Thinkpad for which tlp offers additional functionality.
http://linrunner.de/en/tlp/docs/tlp-lin … ement.html
A stable version already is included in the repositories of Debian/Devuan.
Most likely all of them, though for such underpowered device I'd really recommend something along the lines of Xfce or LXDE.
In the same way as you would on debian.
I used to use Adblock Plus, & it worked - but now, advertisers have found ways around it - so now I am using Adblock Ultimate - the war goes on.
I highly recommend uBlock Origin and it's sister addon/tool uMatrix.
Debian and Devuan are entirely free distributions.
In a default installation they do not ship with proprietary components like a kernel module (ie drivers) or proprietary software.
FSF acknowledges that.
What FSF doesn't like is that Debian and Devuan ALLOW the user to use forementioned proprietary components per user's need and this is the reason why debian and devuan projects will not be in current state mentioned on the FSF's list of "free distributions". Their rules are strict and I see no reason to argue with them.
But I don't see any reason either to change the way Debian and Devuan is. If your hardware is capable of running without proprietary firmware - installing Debian/Devuan makes you run an entirely free distro, end of story.
If your hardware is not capable - you always have the option of installing requiring firmware but you have to specifically request it's installation.
This is a necessary step to ensure that Debian/Devuan can reach to as many people as possible and It's a very good compromise.
@EDIT
Let us not dwell into pointless bikeshedding. There are much more important things to be done to Devuan project to secure it's future than wonder whether you'll get a shitty stamp from FSF.
Switched to Palemoon few months ago. They maintain few useful addons I love like Tree Style Tabs.
I wished I didn't have to but Firefox became unusable. I cannot fathom what it will become in 57.
I'm still going to keep Firefox-ESR for banking applications since I'm fairly reluctant to trust a bunch of furries on security, but If anyone wishes to prove me that I'm wrong I will be eager to listen, that would make one less browser to worry about.
And Chromium for all assortments of botnet features like Google Accounts, YouTube and social media.
Thanks for the advice. I followed it despite the fact that using a display manager is less-than-optimal solution.
Unfortunately - didn't work, the result is the same.
At this point I'm 100% sure it's something wrong with my installation.
I think I'll wait it out for the release of Devuan 2.0 and just do a clean installation.
The most important problem (mounting) was already resolved 2 days ago.
But If anyone has any ideas, I will be more than happy to listen.
Thanks for your input @fsmithred
As You and I can both see, our outputs from auth.log are quite different.
I checked the list you've provided and made a list of packages which come with standard devuan-live system but aren't present on my installation. I'm attaching it because quite frankly I see nothing that could be the culprit but I would be extremely thankful for a second opinion.
alsa-base
b43-fwcutter
colord
cryptsetup
cryptsetup-bin
discover
evince-common
exfalso
exo-utils
firmware-b43-installer
firmware-b43legacy-installer
firmware-bnx2
firmware-bnx2x
firmware-brcm80211
firmware-intelwimax
firmware-libertas
firmware-myricom
firmware-netxen
firmware-qlogic
firmware-ralink
firmware-ti-connectivity
firmware-zd1211
gir1.2-gst-plugins-base-1.0
gir1.2-gstreamer-1.0
gir1.2-keybinder-3.0
gir1.2-wnck-3.0:amd64
gnome-orca
gstreamer0.10-alsa:amd64
gstreamer0.10-plugins-base:amd64
hplip
hyphen-en-us
isolinux
libbasicusageenvironment0
libbrlapi0.6:amd64
libburn4
libdiscid0:amd64
libdiscover2
libdotconf0:amd64
libdvbpsi9:amd64
libevdocument3-4
libevview3-3
libexo-1-0:amd64
libexo-common
libexo-helpers
libflite1:amd64
libfreerdp-cache1.1:amd64
libfreerdp-client1.1:amd64
libfreerdp-codec1.1:amd64
libfreerdp-common1.1.0:amd64
libfreerdp-core1.1:amd64
libfreerdp-crypto1.1:amd64
libfreerdp-gdi1.1:amd64
libfreerdp-locale1.1:amd64
libfreerdp-primitives1.1:amd64
libfreerdp-rail1.1:amd64
libfreerdp-utils1.1:amd64
libgarcon-1-0
libgles1-mesa:amd64
libgpod-common
libgpod4:amd64
libgroupsock1
libgstreamer-plugins-base0.10-0:amd64
libgstreamer0.10-0:amd64
libgusb2:amd64
libical1a
libisoburn1
libisofs6
libjack-jackd2-0:amd64
libjs-underscore
libjte1
libkeybinder-3.0-0:amd64
libkeybinder0
liblouis2:amd64
libpostproc52
libproxy-tools
libsane-hpaio
libsdl-image1.2:amd64
libsgutils2-2
libshine3:amd64
libsonic0:amd64
libthunarx-2-0
libtidy-0.99-0
libusageenvironment1
libvlc5
libvlccore8
libvncclient0:amd64
libvte-common
libvte9
libwinpr-crt0.1:amd64
libwinpr-crypto0.1:amd64
libwinpr-environment0.1:amd64
libwinpr-handle0.1:amd64
libwinpr-heap0.1:amd64
libwinpr-input0.1:amd64
libwinpr-pool0.1:amd64
libwinpr-registry0.1:amd64
libwinpr-rpc0.1:amd64
libwinpr-synch0.1:amd64
libwinpr-thread0.1:amd64
libwinpr-utils0.1:amd64
libwnck-3-0:amd64
libwnck-3-common
libxcb-composite0:amd64
libxcb-xv0:amd64
libxfce4ui-1-0
libxfce4ui-utils
libxfce4util-bin
libxfce4util-common
libxfce4util6
libxfcegui4-4
libxfconf-0-2
libxklavier16
libzvbi-common
libzvbi0:amd64
mousepad
mtools
orage
packagekit
packagekit-tools
popularity-contest
printer-driver-postscript-hp
qtchooser
quodlibet
refractainstaller-base
refractainstaller-gui
refractasnapshot-base
refractasnapshot-gui
ristretto
slim
squashfs-tools
syslinux
syslinux-common
task-desktop
task-xfce-desktop
thunar
thunar-archive-plugin
thunar-volman
va-driver-all:amd64
vdpau-va-driver:amd64
vim
vlc
vlc-nox
vlc-plugin-notify
wicd
wicd-daemon
x11-apps
x11-session-utils
xarchiver
xbrlapi
xfburn
xfce-keyboard-shortcuts
xfce4
xfce4-appfinder
xfce4-artwork
xfce4-clipman
xfce4-clipman-plugin
xfce4-cpufreq-plugin
xfce4-cpugraph-plugin
xfce4-dict
xfce4-diskperf-plugin
xfce4-fsguard-plugin
xfce4-genmon-plugin
xfce4-goodies
xfce4-mixer
xfce4-netload-plugin
xfce4-notes
xfce4-notes-plugin
xfce4-notifyd
xfce4-panel
xfce4-places-plugin
xfce4-power-manager
xfce4-power-manager-plugins
xfce4-quicklauncher-plugin
xfce4-sensors-plugin
xfce4-session
xfce4-settings
xfce4-smartbookmark-plugin
xfce4-systemload-plugin
xfce4-taskmanager
xfce4-terminal
xfce4-verve-plugin
xfce4-wavelan-plugin
xfce4-xkb-plugin
xfconf
xfdesktop4
xorriso
xsane
xsane-common
yad
I also should've mentioned that I tried numerous polkit authentication agents (I'm hoping that I won't be forced to use graphical ones, I would be glad to stick with the CLI-based one that opens in a terminal frankly) and none of them starts successfully.
They all throw an error similar to:
(polkit-mate-authentication-agent-1:4221): polkit-mate-1-WARNING **: Unable to determine the session we are in: No session for pid 4221
polkitd is of course running.
Might be some settings there that need to change, I know in Openbox I had to mod the udisks2 policy because it didn't want to let me mount other partitions.
Thank you for mentioning OpenBox, I managed to resolve one half of the problem.
My .xinitrc started openbox-session like this, I basically copypasted what gentoo wiki suggested to do
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session openbox-session
I changed it to
exec dbus-launch --sh-syntax --exit-with-session openbox-session
This operation successfully allowed me to mount, unmount, eject external storage via PCmanFM, I can even format it using gnome-disks no problem.
The policykit-related problem still persists. I am unable to perform authentication as if I wasn't in the sudo group.
I do not intend to be mean but how exactly does using gksu solve policykit problems?
Hello!
I believe I encountered a bug with the policykit-1 package and software provided by it since it was one of the packages that Devuan Team modified to work without systemd. I'm reluctant to file a bug report yet because I want to make sure that it's actually a bug and not me missing a crucial detail.
Symptoms include:
inability to mount external storage like USB flash drive - results in "Not authorized to perform operatons"
inability to run pkexec or any software relying on it like gparted, synaptic, system-config-printer etc.
Running synaptic-pkexec from the commandline gives output:
$ ~ synaptic-pkexec
==== AUTHENTICATING FOR com.ubuntu.pkexec.synaptic ===
Authentication is required to run the Synaptic Package Manager
Authenticating as: Firstname Lastname,,, (jakub)
polkit-agent-helper-1: wrong number of arguments. This incident has been logged.
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized
This incident has been reported.
I get same result when trying to run a command line "pkexec bash".
My /etc/polkit-1/localauthority.conf.d/51-debian-sudo.conf is standard (as shipped with the package) and says
[Configuration]
AdminIdentities=unix-group:sudo
And my user account (jakub) is part of the sudo group (sudo works)
When attempting to run synaptic-pkexec /var/log/auth.log gives:
Jun 4 21:19:26 pi2530 polkitd(authority=local): Registered Authentication Agent for unix-process:19530:2980417 (system bus name :1.85 [pkexec /usr/sbin/synaptic], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Jun 4 21:19:26 pi2530 polkit-agent-helper-1[19534]: inappropriate use of helper, wrong number of arguments [uid=1000]
Jun 4 21:19:26 pi2530 polkitd(authority=local): Operator of unix-process:19530:2980417 FAILED to authenticate to gain authorization for action com.ubuntu.pkexec.synaptic for unix-process:19530:2980417 [/bin/sh /usr/bin/synaptic-pkexec] (owned by unix-user:jakub)
Jun 4 21:19:26 pi2530 pkexec[19531]: jakub: Error executing command as another user: Not authorized [USER=root] [TTY=/dev/pts/5] [CWD=/home/jakub] [COMMAND=/usr/sbin/synaptic]
Jun 4 21:19:26 pi2530 polkitd(authority=local): Unregistered Authentication Agent for unix-process:19530:2980417 (system bus name :1.85, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
And finally restarting polkitd without the --no-debug flag gives
$ ~ sudo /usr/lib/policykit-1/polkitd --replace
Entering main event loop
Connected to the system bus
Registering null backend at priority -10
Using authority class PolkitBackendLocalAuthority
Acquired the name org.freedesktop.PolicyKit1
There's no further input beyond that. From what i've read online when polkitd starts it's supposed to print debug information including every "local authority storage file" it loads. On my installation, nothing like this happens as if it completely ignored the contents of /etc/polkit-1/localauthority and localauthority.conf.d directories
Tried loading graphical authentication agents to no avail - every one (gnome, lxpolkit and mate-polkit) of them fails as it's unable to find "session PID"
I'm fully aware that this can be temporarily solved by making a custom .pkla file and allowing everyone do everything but I don't think it's a good or secure solution.
Please help.
Pages: 1