The officially official Devuan Forum!

You are not logged in.

#526 Re: Desktop and Multimedia » MATE Desktop - Suspend and Hibernate buttons missing » 2017-05-17 21:22:03

greenjeans wrote:

starting to see options for configuration and such go bye-bye

I've also noticed that trend, with things being more dumbed-down and less configurable in MATE as time passes. I also took a peek at the latest MATE versions, which have migrated to gtk3, and was upset that text previews in caja's icons no longer seem to work, for instance.

MATE is still my go-to DE for the time being, however, as I find it to be the most usable out of the box. XFCE is a close second but, after getting used to MATE, XFCE feels a bit rough (e.g., several custom patches required in xfdesktop and thunar in order to get basic features that caja provides by default).

Change for change's sake is bad enough. Change for change's sake plus lost functionality is even worse. But I'll stop my rambling before we get too off-topic.

#527 Re: Desktop and Multimedia » MATE Desktop - Suspend and Hibernate buttons missing » 2017-05-17 20:20:54

@afuerst: Haha, I know what you mean. My wife is still on Debian Jessie MATE and has the same expectation (lid closed = "off").

Since I prefer nothing to happen when my lid is closed, I didn't even realize that this option is currently missing from Devuan+MATE. Indeed, in mate-power-preferences I cannot find the option to suspend when lid is closed.

Your cronjob idea would work. This would be the job to run every few seconds:

grep closed /proc/acpi/button/lid/LID/state && pm-suspend

#528 Re: Desktop and Multimedia » MATE Desktop - Suspend and Hibernate buttons missing » 2017-05-17 19:46:39

@afuerst: I also use MATE and was missing the Suspend option in the shutdown dialog. I don't use Hibernate.

Also, if I press Alt + F4 and there are no windows left to close, I like the shutdown dialog to show up (I guess this is a leftover expectation from my Windows days). I was able to solve all problems by installing yad, xdotool, and wmctrl and "rolling my own" with these two scripts:

#!/bin/bash
# Put this script somewhere in your path. Name it altF4
activename_id="`xdotool getactivewindow getwindowname`_`xdotool getactivewindow`"
if [[ "$activename_id" = x-caja-desktop* || "$activename_id" = "_" ]]; then
	my-power-dialog
	while true; do # waiting for dialog to exist before activating it
		shutdowndialogid=$(wmctrl -lx | fgrep 'Power options' | awk '{print $1}')
		[ -n "$shutdowndialogid" ] && break
	done
	xdotool windowactivate $shutdowndialogid
else
	wmctrl -c :ACTIVE:
fi
#!/bin/bash
# Put this script somewhere in your PATH. Name it my-shutdown-dialog
yad --width 100 --height 50 --title "Power options" --on-top --center \
    --button=Shutdown:1 \
    --button=Restart:2 \
    --button=Suspend:3 \
    --button=Cancel:0 

case $? in
    1)	sudo shutdown -h now ;;
    2) 	sudo shutdown -r now ;;
    3) 	sudo pm-suspend ;;
    0)	exit 0 ;;
esac

Once the scripts are in one's PATH and executable, just map the Alt + F4 keyboard shortcut to the altF4 script. BTW, the yad package is not in Devuan stable's repo, but I use the one from Debian testing without any issues (https://packages.debian.org/search?keyw … ection=all).

Hope some of this is useful.

P.S. Instead of having the stock shutdown button on my MATE panel, I have a "Custom Application Launcher" that runs my-shutdown-dialog.

#529 Re: Other Issues » [SOLVED] Where are the refracta scripts? » 2017-05-17 17:08:01

@golinux: Got it. I'm a refugee from Debian, so that workflow sounds familiar. Thank you.

#530 Re: Other Issues » [SOLVED] Where are the refracta scripts? » 2017-05-17 16:52:43

Yes, I found the "refractasnapshot" and "refractainstaller" packages in the experimental repo. Would not have guessed it. Thank you very much, greenjeans.

#531 Other Issues » [SOLVED] Where are the refracta scripts? » 2017-05-17 13:10:13

GNUser
Replies: 22

Hello, dear Veteran Unix Admins! I'm running Devuan Jessie on my x86_64 laptop, but can't seem to find the refracta scripts that are now part of Devuan (see https://devuan.org/os/debian-fork/stabl … ce-042017). I installed Devuan several months ago while it was still in beta, but I've kept it fully updated.

Does anybody know where the refracta scripts can be found on my system (or which package needs to be installed to get them)? I've searched my system files and all packages available for installation but nothing contains the string 'refracta'.

#532 Other Issues » [SOLVED] anacron hangs on battery power » 2017-03-24 23:51:48

GNUser
Replies: 0

I'm creating this post in the hope that it helps others with this problem, as it took me a long time to solve.

I installed anacron on my Devuan Jessie laptop. I want anacron to run regardless of whether my laptop is plugged in to AC power or running on battery. I dutifully edited /etc/default/anacron with my favorite text editor and changed "ANACRON_RUN_ON_BATTERY_POWER=no" to "ANACRON_RUN_ON_BATTERY_POWER=yes".

If I'm on battery and boot my laptop or resume from suspend, anacron starts as expected and fools you into thinking that all is well:

bruno@devuan:~$ sudo grep anacron /var/log/syslog
Mar 24 13:32:12 bruno anacron[1596]: Will run job `cron.daily' in 5 min.
Mar 24 13:32:12 bruno anacron[1596]: Will run job `cron.weekly' in 10 min.
Mar 24 13:32:12 bruno anacron[1596]: Will run job `cron.monthly' in 15 min.
Mar 24 13:32:12 bruno anacron[1596]: Jobs will be executed sequentially

THE PROBLEM
The problem is that if I'm on battery power, anacron never actually runs any jobs--it says that it will (as you can see in syslog), but it just hangs indefinitely and never actually does anything. Here's another look at the syslog, hours later:

bruno@devuan:~$ sudo grep anacron /var/log/syslog
Mar 24 13:32:12 bruno anacron[1596]: Will run job `cron.daily' in 5 min.
Mar 24 13:32:12 bruno anacron[1596]: Will run job `cron.weekly' in 10 min.
Mar 24 13:32:12 bruno anacron[1596]: Will run job `cron.monthly' in 15 min.
Mar 24 13:32:12 bruno anacron[1596]: Jobs will be executed sequentially

Looking at the timestamps in /var/spool/anacron confirms that no jobs were run.

THE SOLUTION
Such "silent errors" are so tough to solve! I tried everything under the sun and eventually got this idea from somewhere:

$ sudo chmod a-x /usr/lib/pm-utils/power.d/anacron

BINGO! Once that wicked script is no longer executable, anacron runs its jobs when it says it will--even on battery power. Here's what syslog shows 16 minutes after a reboot while running on battery:

bruno@devuan:~$ sudo grep anacron /var/log/syslog
Mar 24 18:32:12 bruno anacron[1596]: Will run job `cron.daily' in 5 min.
Mar 24 18:32:12 bruno anacron[1596]: Will run job `cron.weekly' in 10 min.
Mar 24 18:32:12 bruno anacron[1596]: Will run job `cron.monthly' in 15 min.
Mar 24 18:32:12 bruno anacron[1596]: Jobs will be executed sequentially
Mar 24 18:37:12 bruno anacron[1596]: Job `cron.daily' started
Mar 24 18:37:12 bruno anacron[2716]: Updated timestamp for job `cron.daily' to 2017-03-24
Mar 24 18:37:15 bruno anacron[1596]: Job `cron.daily' terminated
Mar 24 18:42:12 bruno anacron[1596]: Job `cron.weekly' started
Mar 24 18:42:12 bruno anacron[2895]: Updated timestamp for job `cron.weekly' to 2017-03-24
Mar 24 18:42:12 bruno anacron[1596]: Job `cron.weekly' terminated
Mar 24 18:47:12 bruno anacron[1596]: Job `cron.monthly' started
Mar 24 18:47:12 bruno anacron[2980]: Updated timestamp for job `cron.monthly' to 2017-03-24
Mar 24 18:47:12 bruno anacron[1596]: Job `cron.monthly' terminated
Mar 24 18:47:12 bruno anacron[1596]: Normal exit (3 jobs run)

#533 Re: Other Issues » [SOLVED] apt-file search not working » 2017-03-23 13:23:06

Hats off, fsmithred. Your modification is much more elegant. Very nice.

#534 Re: Other Issues » [SOLVED] apt-file search not working » 2017-03-22 14:30:54

Here's a robust workaround for the time being:

1. On a Debian Jessie system:

$ sudo apt-file update

2. Copy /var/cache/apt/apt-file directory from Debian to Devuan
3. Copy /etc/apt/sources.list from Debian to Devuan, renaming it /etc/apt/debian-sources.list in Devuan so it doesn't conflict with Devuan's "real" sources.list
4. Put this in your ~/.bashrc:

alias apt-file='apt-file --sources-list /etc/apt/debian-sources.list'

Now apt-file searches work as expected, regardless of whether the package containing the file is already installed on your system or not. We're obviously searching through Debian's packages, but 99% of the time it'll be close enough. Just make sure to run apt-file as regular user, since regular user is the one who has the alias:

$ apt-file search foo

#535 Re: Other Issues » [SOLVED] apt-file search not working » 2017-03-18 20:22:37

Very nice, but has one drawback: "dpkg -S" can only search the contents of packages that are already installed on the system. If the purpose of the search is to determine which package to install, "dpkg -S" isn't going to help.

#536 Re: Other Issues » [SOLVED] apt-file search not working » 2017-03-18 15:17:26

Thank you. I'm very happy to be part of this new community--it's truly an island of sanity. I have no interest in making my system orders of magnitude more complex so that I can (maybe) shave a few seconds off my boot time. When it comes to my OS, I'll take something I can more easily understand and control over something new and (supposedly) faster *anyday* smile Long live Devuan!

#538 Other Issues » [SOLVED] apt-file search not working » 2017-03-16 16:09:01

GNUser
Replies: 16

I use apt-file to find which package contains a given file. This is extremely handy and sometimes is the only way I know to get such information.

While apt-file works flawlessly in Debian Jessie, in Devuan Jessie apt-file cannot find what it needs to build its cache:

bruno@devuan:~$ sudo apt-file update
Ignoring source without Contents File:
  http://us.mirror.devuan.org/merged/dists/jessie/main/Contents-amd64.gz
Ignoring source without Contents File:
  http://us.mirror.devuan.org/merged/dists/jessie-security/main/Contents-amd64.gz
Ignoring source without Contents File:
  http://us.mirror.devuan.org/merged/dists/jessie-updates/main/Contents-amd64.gz

bruno@devuan:~$ apt-file search foo
E: The cache is empty. You need to run 'apt-file update' first.

Is this a problem on my end or is something missing from Devuan's repositories? It seems more likely to be the latter. If it's a repository problem as I suspect, does anyone know whether there are plans to add the missing "Contents Files" to Devuan's repositories? Thanks!

Board footer

Forum Software