The officially official Devuan Forum!

You are not logged in.

#1 Re: Desktop and Multimedia » [SOLVED] shell script to restart Xorg » 2022-11-21 17:14:35

Rant: Did you actually read this?

Option "DontZap" "boolean"
This disallows the use of the Terminate_Server XKB action (usually on Ctrl+Alt+Backspace, depending on XKB options). This action is normally used to terminate the Xorg server. When this option is enabled, the action has no effect. Default: off.

This illustrates exactly what I dislike about Xorg. Everything is overly complicated. This is not a human-friendly description. The header says the DontZap option is boolean, so expected default values would be "true" or "false", not "off" (what exactly is off?).

But all's well that ends well. Thanks to lightdm and sxhkd I don't have to deal with this smile

#2 Re: Desktop and Multimedia » [SOLVED] shell script to restart Xorg » 2022-11-21 17:09:55

I am familiar with the XY Problem, thank you. Not the case here, as the goal was to reimplement the old behavior with a shell script (or a simple shell command, as it turned out), not by tweaking Xorg config files. I love shell scripts and actually quite dislike Xorg, which I tolerate only out of necessity.

I use sxhkd for keyboard hotkeys. Binding sudo pkill Xorg to control + alt + BackSpace does exactly what I was looking for. Thanks again for the help.

#3 Re: Desktop and Multimedia » [SOLVED] shell script to restart Xorg » 2022-11-21 16:19:45

I figured it out. I just needed to add a line to /etc/lightdm/lightdm.conf. Now instead of just this in the relevant section:

[SeatDefaults]
autologin-user=bruno
autologin-user-timeout=0

I have this:

[SeatDefaults]
autologin-user=bruno
autologin-user-timeout=0
session-cleanup-script=service lightdm restart

With that added line, now all I need to restart Xorg is sudo pkill Xorg. Thanks for pointing me in the right direction, HoaS!

#4 Re: Desktop and Multimedia » [SOLVED] shell script to restart Xorg » 2022-11-21 16:06:55

Head_on_a_Stick wrote:

If you set up autologin for your user ... then killing X should do what you want.

If I run sudo pkill Xorg, then lightdm presents me with a login screen. This is unexpected, since lightdm is configured for autologin and does, in fact, automatically log me at every boot.

Can you help me configure lightdm so that it also automatically logs me in when Xorg is killed?

#5 Re: Desktop and Multimedia » [SOLVED] shell script to restart Xorg » 2022-11-21 15:56:49

I do have autologin enabled for my user, with this in /etc/lightdm/lightdm.conf:

[SeatDefaults]
autologin-user=bruno
autologin-user-timeout=0

I'd rather not ditch lightdm, since I would have to reconfigure multiple machines.

There's no actual problem. A few years ago, Xorg disabled Control+Alt+Backspace as the keyboard shortcut for restarting X (supposedly for security reasons). I liked having that shortcut because it was useful for the rare instances when X would freeze. If X acts up, I'd rather simply restart it than doing a full reboot. So the goal is to bring back that functionality by creating a script that works as intended, then binding it to Control+Alt+Backspace.

Wanting to get this script to work is mostly an exercise in getting my computer to do what I want it to do.

#6 Desktop and Multimedia » [SOLVED] shell script to restart Xorg » 2022-11-21 15:18:25

GNUser
Replies: 9

Hello, Devuan friends. I'm on Devuan Chimaera x86_64 with SysVinit, lightdm, Xorg 7.7, and MATE. I'm trying to write a shell script that restarts Xorg. Let's call it RestartX.sh

I already tried several variations of this:

#!/bin/sh
sudo service lightdm stop
sleep 1
sudo service lightdm start

I also tried:

#/bin/sh
sudo chvt 1
sudo pkill -f lightdm
sleep 1
sudo service lightdm start

And I also tried:

#!/bin/sh
sudo pkill Xorg
sleep 1
startx

I run the script in a terminal emulator like so: $ ./RestartX.sh & exit
X seems easy to stop but difficult to start from a shell script. Any ideas on how to make it work?

#7 Re: Other Issues » bind mounts show up on MATE desktop » 2021-11-13 04:50:17

Thank you, HoaS. Yes, that's helpful. I'll give patching caja a shot sometime.

Meanwhile, I'll let the MATE developers know about the issue and patch so that they can consider adopting it. It would be nice to have this without having to recompile anything.

#8 Other Issues » bind mounts show up on MATE desktop » 2021-11-12 00:09:10

GNUser
Replies: 2

I'm on Chimaera with MATE 1.24.1 and caja 1.24.0. When I used older Devuan ASCII + MATE, caja would not show bind mounts on the deskop. This is the desired, expected behavior (I used bind mounts extensively and having every one of them show up on the desktop creates clutter).

Does anyone know how to hide bind mounts from the MATE desktop? I found the org.mate.caja.desktop volumes-visible setting in dconf but I do not want to hide mounted devices from the desktop, I just want to hide bind mounts.

#9 Re: Hardware & System Configuration » Startech firewire card » 2020-08-27 14:31:25

Hi, viverna. Anything sold on thinkpenguin.com (their prices are high but the customer service is excellent) will have universal GNU/Linux compatibility because they only sell free software-friendly devices. Here's something they sell:
https://www.thinkpenguin.com/gnu-linux/ … 1394bapcie

Also, the FSF maintains the helpful h-node.org database. To see the firewire adapters in their database, go to duckduckgo.com and enter this search query: firewire site:h-node.org. If the "does it work with free software?" line says "yes" then the device will have universal GNU/Linux compatibility.

#10 Re: Hardware & System Configuration » Startech firewire card » 2020-08-26 15:05:37

Hi, viverna.

All available external/loadable kernel modules are listed in the file /lib/modules/<kernel_version>/modules.order. Another way to see which ones are available on your system is to list the .ko files. Something like this would work: find /lib/modules -name '*.ko'.

Built-in kernel modules (which are statically linked into the kernel image and are therefore always "loaded") are listed in the file /lib/modules/<kernel_version>/modules.builtin. These built-in modules are invisible to tools such as lsmod and modprobe.

Whether external or built-in, every kernel module that's currently in active use will have a corresponding directory under /sys/module/.

I'm on Devuan ASCII with a custom kernel and I didn't pay any attention to firewire during compilation. I have several firewire-related external modules available:

$ find /lib/modules -name '*.ko' | grep firewire
/lib/modules/4.16.2-gnu/kernel/drivers/firewire/firewire-ohci.ko
/lib/modules/4.16.2-gnu/kernel/drivers/firewire/nosy.ko
/lib/modules/4.16.2-gnu/kernel/drivers/firewire/firewire-net.ko
/lib/modules/4.16.2-gnu/kernel/drivers/firewire/firewire-core.ko
/lib/modules/4.16.2-gnu/kernel/drivers/firewire/firewire-sbp2.ko
/lib/modules/4.16.2-gnu/kernel/drivers/staging/fwserial/firewire-serial.ko
/lib/modules/4.16.2-gnu/kernel/drivers/media/firewire/firedtv.ko
/lib/modules/4.16.2-gnu/kernel/sound/firewire/digi00x/snd-firewire-digi00x.ko
/lib/modules/4.16.2-gnu/kernel/sound/firewire/motu/snd-firewire-motu.ko
/lib/modules/4.16.2-gnu/kernel/sound/firewire/fireface/snd-fireface.ko
/lib/modules/4.16.2-gnu/kernel/sound/firewire/bebob/snd-bebob.ko
/lib/modules/4.16.2-gnu/kernel/sound/firewire/snd-firewire-lib.ko
/lib/modules/4.16.2-gnu/kernel/sound/firewire/tascam/snd-firewire-tascam.ko
/lib/modules/4.16.2-gnu/kernel/sound/firewire/dice/snd-dice.ko
/lib/modules/4.16.2-gnu/kernel/sound/firewire/fireworks/snd-fireworks.ko
/lib/modules/4.16.2-gnu/kernel/sound/firewire/oxfw/snd-oxfw.ko
/lib/modules/4.16.2-gnu/kernel/sound/firewire/snd-isight.ko

I hope that helps troubleshoot your issue.

#11 Re: Other Issues » Port forwarding issue » 2020-08-10 13:58:40

Hi, Devuman. Sorry for leading you on a wild goose chase trying to ssh into R2. It seems ralph.ronnquist was right and your router does not offer ssh access into it.

I'm glad you were able to achieve what you needed by setting up a "virtual server" on R2.

P.S. In the future, if you ever have to choose between ralph.ronnquist's advice and someone else's, save yourself some trouble and just go with ralph.ronnquist's wink

#12 Re: Other Issues » Port forwarding issue » 2020-08-09 18:48:38

Hi, Devuman. Two quick things that may or may not be obvious:

1. For my double-ssh exercise to work, make sure R2 is not forwarding port 22.

2. The < and > symbols in my posts (and everything between them) are just placeholders. This will never work:

$ ssh -t <bob>@<192.168.18.8> "ssh <bob>@<192.168.1.101>"

The proper syntax would be something like this:

$ ssh -t bob@192.168.18.8 "ssh bob@192.168.1.101"

P.S. Actually, before trying do do fancy stuff (two-hop ssh), it's best to establish that your setup is allowing the easy stuff. Can you ssh from LT2 to R2? How about from LT1 to PC1? Those should be trivial. If not, fix this first.

#13 Re: DIY » Kill openvpn in one line in Terminal » 2020-08-07 19:01:45

Here's how to kill openvpn in one line in terminal:

sudo pkill -f openvpn

Depending on how you run openvpn, you may not need the -f.

#14 Re: Other Issues » Port forwarding issue » 2020-08-07 15:26:20

If the above "double ssh" command works, then we've established that our assumptions about ports (that the default port 22 is being used everywhere) and firewalls (that R2 and PC1 are allowing incoming on port 22) are correct.

To achieve SFTP via port forwarding, you have to tell R1 to take incoming traffic on port 22 and forward it to R2. Then you have to tell R2 to take incoming traffic on port 22 and forward it to PC1. I think that should do it.

#15 Re: Other Issues » Port forwarding issue » 2020-08-07 15:08:51

Devuman wrote:

I can SFTP from LT1 into PC1.

That's not surprising because they're both on the same network (LAN2).

Devuman wrote:

Not from LT2 into PC1.

That's because LT2 and PC1 are on different networks, so it's not trivial to establish a connection. We have to go through R2. Let's see if we can SSH from LT2 to PC1 (if you can do SSH, then you can do SFTP).

At the risk of stating the obvious, remember that a router by definition stands between two networks, so it should have at least two IP addresses. R2 in your example has an IP address on LAN1 and a different IP address on LAN2.

Try this:

1. Make sure R2 and PC1 are both running SSHD (I'm assuming those two devices are not running a firewall, or at least have the SSH port open)

2. Run this command on LT2:

ssh -t <R2user>@<R2address-on-LAN1> "ssh <PC1user>@<PC1address-on-LAN2>"

Here is an example with made-up passwords and ip addresses:

ssh -t devuman@192.168.1.150 "ssh devuman@192.168.2.135"

You will be prompted for a password twice (first your password on R2, then your password on PC1).

P.S. Nice diagram!

EDIT: If you can establish an SSH connection from LT2 to PC1 using this long method, then we can be optimistic that with the right port forwarding rules we can achieve an SFTP connection without too much fuss. See my subsequent post below.

#16 Re: Devuan » As an extensive user, GIMP 2.10.x is unusable. 2.8.x is great though! » 2020-07-17 13:59:20

@contrast - The best place to share this AppImage with a larger community would be at https://www.appimagehub.com but unfortunately the requirements for submitting an AppImage there are too strict (the application needs to be compiled on a machine with very ancient glibc, for instance). It's just too much of a hassle.

Hopefully people who want an AppImage of gimp 2.8 will find this thread. I'll leave my tweaked, final version of the AppImage at this link indefinitely:
http://files.dantas.airpost.net/public/ … 4.AppImage

Cheers!

#17 Re: Off-topic » What other distro are you using (besides devuan)? » 2020-07-17 13:53:18

3 x Tiny Core Linux (my daily driver laptop plus my two wireless routers)
2 x Devuan ASCII (wife's laptops)
1 x Arch Linux ("media player" laptop connected to television--has not been updated since 2015)

#18 Re: Devuan » As an extensive user, GIMP 2.10.x is unusable. 2.8.x is great though! » 2020-07-06 14:35:41

I figured it out. Gimp cannot find the plugins inside the AppImage. I came up with a quick fix, which involves two changes:

1. At root of AppDir there is gimp.desktop. Change its Exec line from this:

Exec=gimp-2.8 %U

To this:

Exec=gimp-2.8-wrapper %U

2. Create (and mark as executable) AppDir/usr/bin/gimp-2.8-wrapper with this in it:

#!/bin/sh

dir=/tmp/gimp2.8-plugins

if [ ! -d "$dir" ]; then
	mkdir -p "$dir"
	HERE="$(dirname "$(readlink -f "${0}")")"
	cp -r "$HERE"/../lib/gimp/2.0/plug-ins "$dir"
fi

export GIMP2_PLUGINDIR="$dir" 
exec gimp-2.8 "$@"

Create AppImage from the tweaked AppDir. Now the AppImage works perfectly. Thanks again, Tatwi! smile

EDIT: I cleaned up the wrapper script a bit.

#19 Re: Devuan » As an extensive user, GIMP 2.10.x is unusable. 2.8.x is great though! » 2020-07-06 12:31:25

Hi, Tatwi. Thanks for sharing! The AppImage loads quickly and everything looks good. However, I can't open any files.

When I select File -> Open, no files show up in the file selection window unless I choose "All files". Then, whatever image file I select (even a common format such as jpeg) I get an error window saying "Unknown file type".

Alas, I don't know enough about how GIMP/GTK file selection works to fix this.

#20 Re: Devuan » As an extensive user, GIMP 2.10.x is unusable. 2.8.x is great though! » 2020-07-02 15:21:36

Hi, Tatwi. I use an AppImage of GIMP 2.10.8 but, like you, I'm unhappy with the recent changes.
Can you please share your AppImage of GIMP 2.8.x for 64-bit?

#21 Re: Desktop and Multimedia » Musescore » 2020-06-24 16:30:30

AppImage is also available. Sometimes issues in .deb version do not affect AppImage version:
https://musescore.org/en/download

#22 Re: Off-topic » Learning Linux » 2020-06-08 19:49:49

If proficient UNIX/Linux usage is a craft, then the shell is the craftsman's workbench. I think having a solid grasp of bash--and knowing how it's different from other shells--is key. You can't go wrong by starting with the shell because it's essential no matter what your specific needs are. Where you go from there depends on your specific needs and interests.

- best bash tutorial anywhere: http://tldp.org/LDP/abs/html/
- compilation of bash pitfalls: https://mywiki.wooledge.org/BashPitfalls
- learn to recognize bashisms: https://mywiki.wooledge.org/Bashism

Write as many shell scripts as you can. After a script is working, make it correct. After it's correct, make it beautiful. Here is a tool to help you improve your existing shell scripts: https://github.com/koalaman/shellcheck

I hope that helps smile

#23 Re: DIY » Making your own packages - Toxic build deps. » 2020-05-11 14:14:25

Until I discovered fpm, creating my own packages was always a hassle. With fpm it becomes quite trivial.
In case you'd like to check it out: https://github.com/jordansissel/fpm

#24 Re: DIY » KISS: a new systemd-free distribution that aims to "keep it simple" » 2020-04-01 17:40:44

The official Tiny Core Linux wiki is down. Developers are aware and working on it. In the meantime, wiki can be accessed via this mirror:
https://www.linuxsecrets.com/tinycoreli … start.html

Their forum is alive and well:
http://forum.tinycorelinux.net

Main reason to strip binaries is to make them smaller (I've sometimes seen them shrink to 50-75% of original size). TCL packages contain stripped binaries in the interest of keeping everything as tiny as possible.

#25 Re: Off-topic » Folding@home - You can help find a cure to COVID-19! » 2020-03-31 18:04:23

Lopsided, like I said. They expect blind trust but are themselves unwilling to trust.
Trust should go both ways, especially in times of crisis.

We can disagree on this, but I don't think it's ever acceptable to ask someone to run closed source software. Principles don't just fly out the window when times are tough. I think it should be the opposite--good principles provide guidance, should be like light beams to help us find our way when the path is dark.

These folks need to come up with an algorithm that disallows data manipulation/cheating, then open up the code. Keeping the code closed for the highlighted reason is just a copout for bad software design.

Board footer

Forum Software