Newest questions tagged linux - Super User © superuser.commost recent 30 from superuser.com2018-01-16T21:12:23Zhttp://superuser.com.xemphimonlines.com/feeds/tag?tagnames=linux&sort=newesthttp://www.creativecommons.org/licenses/by-sa/3.0/rdf http://superuser.com.xemphimonlines.com/q/12861760Raspberry Pi Zero armv6l Python, Numpy, Scipy Tests Give Illegal Instruction © superuser.comuser986122http://superuser.com.xemphimonlines.com/users/4456112018-01-16T20:10:57Z2018-01-16T20:10:57Z<p>So the simple version of this question is that I've been trying for several days to get a python 3.4 environment with the following packages installed on a Raspberry Pi Zero Jessie image: opencv, numpy, scipy, matplotlib, tqdm, pywavelets, pyqtgraph, pyside, peakutils. In principle, I might be able to get my code to work in python 2.7 if that's the only option, but all my testing so far has been in 3.</p><p>After an enormous effort, I finally got all of the packages installed and imported without error (via a combination of pip, <a href="https://www.pyimagesearch.com/2015/10/26/how-to-install-opencv-3-on-raspbian-jessie/" rel="nofollow noreferrer">this</a> tutorial, and for scipy, using apt-get and copying the packages over to the virtual environment (because installing via pip causes the pi to lock up and require hard reboot). Everything imports properly, but for numpy and scipy, I'm getting "Illegal Instruction" errors at some point in the code. I don't know where in the code the issue is because the error gives no information at all, but I'm fairly sure it's numpy or scipy because when I run:</p><pre><code>import numpynumpy.test('full')</code></pre><p>or the same for scipy, I get the same "Illegal Instruction" error. I got all of this working on my Pi3 (armv7l), but I understand that I'm working on armv6l with the Pi Zero. Moreover, when I try the same test outside of my virtual environment (just in the default python 2 or 3 environments on the machine), I still get the same "Illegal Instruction" error. Does anyone have any tips to either:</p><ol><li>Fix the "Illegal Instruction" errors in numpy and scipy so I can use them on the Pi Zero?</li><li>Successfully install the packages mentioned above in a python 3.4 environment on the Pi Zero?</li></ol><p>Thank you in advance for any help you can give!</p>http://superuser.com.xemphimonlines.com/q/12861740How can I properly shutdown a Linux machine from terminal? © superuser.comuser24346http://superuser.com.xemphimonlines.com/users/7874932018-01-16T19:59:18Z2018-01-16T19:59:18Z<p>What should I type to safely shutdown a Linux computer from terminal? <br> <hr>My circumstance is: <br>I'm using "Raspberry Pi Zero W" over VNC (and SSH). I was able to shutdown it by GUI, but now I press the "Shutdown" button and nothing happens. <br>The "Raspberry Pi Configuration" app doesn't work neither, but it is not a big problem for me since "sudo raspi-config" works fine. I love the terminal :) <br>(The OS is "Raspbian Stretch", but I'd prefer a universal way if possible, since I also use other Linux-based OSes. That's why I'm posting this question here instead of Raspberry Pi Stack Exchange.)</p>http://superuser.com.xemphimonlines.com/q/12861670Suddenly lost sudo rights © superuser.comWysaardhttp://superuser.com.xemphimonlines.com/users/4070862018-01-16T19:28:24Z2018-01-16T19:32:19Z<p>I have been using this installation (of Arch Linux) for a few years now, and have used <code>sudo</code> quite a lot. But suddenly it stopped working and I get the standard error message that the user is not in the <code>sudoers</code> file and this incident will be reported. So by using <code>su</code> and entering the root password I used <code>visudo</code> as root. There is a line <code>%sudo ALL=(ALL) ALL</code>, and I confirmed that my user was in the <code>sudo</code> group. </p><p>I ended up fixing it by adding a line specifically for my user: <code>myname ALL=(ALL) ALL</code>, so I got it working that way, but it still seems to me that something is not quite right for this line to be even needed. Especially because it stopped working all of a sudden and I can't remember having changed this file since the initial installation over a year ago.</p><p>How could it be that it suddenly stopped working? Bad update? Hacked?</p><p>How do I get it working again that just being in the <code>sudo</code> group is enough? I have a line <code>%sudo ALL=(ALL) ALL</code>, visudo reports no errors, my user is in group <code>sudo</code> but I still get <code>myname is not in the sudoers file. This incident will be reported.</code> unless I add <code>myname ALL=(ALL) ALL</code>.</p><p>This was on a personal computer that should have no other users than me.</p>http://superuser.com.xemphimonlines.com/q/12861231How do I get the MBR Partition table with newest fdisk? © superuser.comwullxzhttp://superuser.com.xemphimonlines.com/users/768722018-01-16T16:27:10Z2018-01-16T16:27:10Z<p>I need to examine the MBR part of a hybrid MBR/GPT USB Stick.<br>My version of fdisk (<code>fdisk from util-linux 2.29</code>) lists the GPT partition table, which older versions of fdisk does not. </p><p>Tried solutions:<br>I can't find any switch to force it to read the MBR table in the manpage and <code>-c=dos</code> to enable dos compatibility mode doesn't change anything.Copying the first 512 bytes into a file and using fdisk on that works to show the MBR partition table but is not very comfortable.</p><p>How do I get the MBR partition table?</p><p>Outputs:</p><pre><code>$ sudo dd if=/dev/sdb of=first512.img bs=512 count=11+0 records in1+0 records out512 bytes copied, 0,0010523 s, 487 kB/s$ fdisk -l http://superuser.com/first512.imgDisk http://superuser.com/first512.img: 512 B, 512 bytes, 1 sectorsUnits: sectors of 1 * 512=512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0x55e7aea2Device Boot Start End Sectors Size Id Typehttp://superuser.com/first512.img1 * 22528 153599 131072 64M 7 HPFS/NTFS/exFAThttp://superuser.com/first512.img2 1 22527 22527 11M ee GPThttp://superuser.com/first512.img4 153600 15417343 15263744 7,3G ee GPTPartition table entries are not in disk order.$ sudo fdisk -l /dev/sdbDisk /dev/sdb: 7,4 GiB, 7893680128 bytes, 15417344 sectorsUnits: sectors of 1 * 512=512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: gptDisk identifier: 510488E2-D768-4675-A53D-16E041F51641Device Start End Sectors Size Type/dev/sdb1 2048 22527 20480 10M EFI System/dev/sdb2 22528 153599 131072 64M Microsoft basic data/dev/sdb3 153600 163839 10240 5M BIOS boot/dev/sdb4 163840 15417278 15253439 7,3G Linux filesystem</code></pre>http://superuser.com.xemphimonlines.com/q/1286122-1Netflix behavior varies between windows and linux [on hold] © superuser.comkpiehttp://superuser.com.xemphimonlines.com/users/4814032018-01-16T16:26:12Z2018-01-16T16:26:12Z<p>Not a big deal but I'm wondering why Netflix throws an error when I plug my headphones in on windows and now linux. </p><p>Thanks!</p>http://superuser.com.xemphimonlines.com/q/12861050UUID fstab configuration in virtual machine ( VMware ) © superuser.comenodmilvadohttp://superuser.com.xemphimonlines.com/users/8576802018-01-16T15:48:18Z2018-01-16T15:56:39Z<p>we have physical machines as HP or IBM blade machine and we set UUID in fstab on these physical machines</p><p>but in case we use VM ( virtual machine , )</p><p>is it necessary to defines UUID in fstab on virtual machine ?</p><p>or we can set the ordinary fstab configuration as disk devise against mount point folder ?</p>http://superuser.com.xemphimonlines.com/q/12861010sending argument to vim using grep © superuser.comCIsForCookieshttp://superuser.com.xemphimonlines.com/users/6787192018-01-16T15:42:11Z2018-01-16T17:29:56Z<p>I saw <a href="http://superuser.com.xemphimonlines.com/questions/451863/how-to-run-vim-command-from-the-shell">this question</a> but I couldn't implement what I'm looking for.</p><p>Here is what I want:</p><ul><li>I have a file with a few lines ending with <code>4.1.01.97</code> (same number for all lines - but number can change from time to time)</li><li>I want to open vim and change the number into another</li></ul><p>I tried <code>vim [file_name] +:%s/97/98/g +:wq</code> which works fine but it wouldn't help if the file will change.</p><p>I next tried getting desired number with <code>grep</code>: <code>cat [file_name] | tail -1 | grep -E '.[0-9][0-9]$'</code></p><p>I want to use the result of this in my vim command... Something like using <code>vim [file_name] +:%s/97/98/g +:wq</code> with the grep command inside ``, instead the <code>97</code>.</p><p>How can I do that?</p><p><em>If this it possible without vim, that would also be helpful :)</em></p><p><em>Also, can my regular expression for the grep be improved?</em></p><hr><p><strong>This is how the file looks like:</strong> </p><pre><code>A_,4.1.01.97B_,4.1.01.97C_,4.1.01.97D_,4.1.01.97E_,4.1.01.97F_,4.1.01.97G_,4.1.01.97H_,4.1.01.97</code></pre><hr><p><strong>This is how I want the file to look like:</strong> </p><pre><code>A_,4.1.01.98B_,4.1.01.98C_,4.1.01.98D_,4.1.01.98E_,4.1.01.98F_,4.1.01.98G_,4.1.01.98H_,4.1.01.98</code></pre>http://superuser.com.xemphimonlines.com/q/12860940how to echo text into a file from the CLI to ammend a variable in the file? © superuser.comdavetheravehttp://superuser.com.xemphimonlines.com/users/8628902018-01-16T15:23:02Z2018-01-16T15:27:12Z<p>using Centos7</p><p>e.g</p><pre><code>vi test.txt </code></pre><p>test.txt contains the following information</p><pre><code>x=100y=200z=300</code></pre><p>I want to put a command into the CLI such as <code>echo x=250 &gt;&gt; test.txt</code> but instead of <code>x=250</code> being added to the bottom of the file, I want it to replace <code>x=100</code> with <code>x=250</code></p><p>any help on hwo to tackle this is much appreciated!</p><p>Thanks. </p>http://superuser.com.xemphimonlines.com/q/12860910Sticky Keys in Arch Linux? © superuser.comNishanthttp://superuser.com.xemphimonlines.com/users/524502018-01-16T15:13:00Z2018-01-16T15:31:53Z<p>I followed <a href="https://wiki.archlinux.org/index.php/Accessibility#Sticky_keys_with_systemd" rel="nofollow noreferrer">this</a> tutorial but it didn't work.</p><pre><code>keymaps 0-2,4-5,8,12keycode 37=SCtrlkeycode 50=SShiftkeycode 64=SAltkeycode 105=SCtrlkeycode 62=SShiftkeycode 108=SAlt</code></pre><p>and then did a <code>loadkeys</code> but it didn't work.</p><p>I just use a window manager called <code>jwm</code> with <code>tint2</code>. Any good solutions in pure Linux?</p>http://superuser.com.xemphimonlines.com/q/12860830VNCServer error on arch linux: The HOME environment variable is not set © superuser.comBaiJiFeiLonghttp://superuser.com.xemphimonlines.com/users/6770422018-01-16T14:52:48Z2018-01-16T14:52:48Z<p>I am using arch linux.</p><p>I could not connect VNC server created by gnome.</p><p>Then I installed tigervnc, then run <code>tigervnc</code> once to initialize</p><p>But <code>systemctl start vncserver</code> failed:</p><pre><code>● vncserver.service - Remote desktop service (VNC)Loaded: loaded (/usr/lib/systemd/system/vncserver.service; enabled; vendor preset: disabled)Active: failed (Result: exit-code) since Tue 2018-01-16 22:39:59 CST; 4s agoProcess: 17611 ExecStart=/usr/bin/vncserver -fg (code=exited, status=2)Process: 17609 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill &gt;/dev/null 2&gt;&amp;1 || true (code=exitMain PID: 17611 (code=exited, status=2)1月 16 22:39:59 bjpc systemd[1]: Starting Remote desktop service (VNC)...1月 16 22:39:59 bjpc systemd[1]: Started Remote desktop service (VNC).1月 16 22:39:59 bjpc vncserver[17611]: vncserver: The HOME environment variable is not set.1月 16 22:39:59 bjpc systemd[1]: vncserver.service: Main process exited, code=exited, status=2/INVALI1月 16 22:39:59 bjpc systemd[1]: vncserver.service: Failed with result 'exit-code'.</code></pre><p>Then I installed <code>x11vnc</code>, and the same error occured.</p>http://superuser.com.xemphimonlines.com/q/12860760How to browse cleverly an archive of image files indexed by several parameters? [on hold] © superuser.comJocehttp://superuser.com.xemphimonlines.com/users/2392472018-01-16T14:34:01Z2018-01-16T16:36:53Z<p>I have a large archive of 100s of image files which are organised according to several classification parameters: let's say, each image filename is something like <code>&lt;length&gt;_&lt;weight&gt;_&lt;colour&gt;_&lt;serialnumber&gt;.png</code>. </p><p>With this naming convention, it's easy to compare the images labelled with the same length, weight and colour, because image browsing tools [such as <code>feh</code>] allow you to look at a sequence of images sorted by alphabetical order.</p><p>But I'd like to be able to visualize these files in a way that would allow me to browse between "neighbouring" files, e.g. if I'm looking at image <code>10_20_red_131212312.png</code>, I'd like to "scroll" to images <code>10_21_red_*</code> or <code>9_20_red_*</code>. So alphabetical order is not sufficient.</p><p>Are there specialist tools existing to do this?</p>http://superuser.com.xemphimonlines.com/q/12860480Monit for System.d Services © superuser.comJulian http://superuser.com.xemphimonlines.com/users/7499462018-01-16T12:34:48Z2018-01-16T14:25:41Z<p>I am trying to use monit to monitor my squid server. I installed squid server on raspbian stretch using apt-get. The squid service was installed under /etc/init.d/squid and I checked if the PID file under /var/run/squid.pid exists.</p><p>Still when i run sudo monit start all I get:</p><pre><code>There is no service named "squid"</code></pre><p>I installed monit by compiling it as root and adding it to systemd like this:<a href="https://mmonit.com/wiki/Monit/Systemd" rel="nofollow noreferrer">https://mmonit.com/wiki/Monit/Systemd</a></p><p>Heres my monit file created in /etc/monitrc</p><pre><code>set daemon 60set logfile syslog facility log_daemonset idfile /tmp/monit.idset statefile /tmp/monit.stateset mailserver localhostset alert systems@abcd.netset httpd port 2812 and#use address localhost # only accept connection from localhostallow localhost # allow localhost to connect to the server andallow admin:monit # require user 'admin' with password 'monit'check process squid with pidfile /var/run/squid.pidgroup proxystart program="/etc/init.d/squid start"stop program="/etc/init.d/squid stop"if failed host localhost port 3128send "GET /monit-check HTTP/1.0\r\n\r\n"expect "HTTP/[0-9\.]{3} 400 .*\r\n"for 5 cycles then restart</code></pre><p>Output from <code>service squid status</code>:</p><pre><code>● squid.service - LSB: Squid HTTP Proxy version 3.xLoaded: loaded (/etc/init.d/squid; generated; vendor preset: enabled)Active: active (running) since Tue 2018-01-16 12:23:25 UTC; 2h 1min agoDocs: man:systemd-sysv-generator(8)Process: 24781 ExecStop=/etc/init.d/squid stop (code=exited, status=0/SUCCESS)Process: 24928 ExecStart=/etc/init.d/squid start (code=exited, status=0/SUCCESS)Main PID: 24970 (squid)CPU: 3.718sCGroup: /system.slice/squid.service├─24968 /usr/sbin/squid -YC -f /etc/squid/squid.conf├─24970 (squid-1) -YC -f /etc/squid/squid.conf├─24971 (logfile-daemon) /var/log/squid/access.log├─24984 (pinger)└─25378 (basic_ncsa_auth) /etc/squid/squid_passwdJan 16 12:23:24 raspberrypi systemd[1]: Starting LSB: Squid HTTP Proxy version 3.x...Jan 16 12:23:25 raspberrypi squid[24968]: Squid Parent: will start 1 kidsJan 16 12:23:25 raspberrypi squid[24968]: Squid Parent: (squid-1) process 24970 startedJan 16 12:23:25 raspberrypi squid[24928]: Starting Squid HTTP Proxy: squid.Jan 16 12:23:25 raspberrypi systemd[1]: squid.service: PID file /var/run/squid.pid not readable (yet?) after start: No sJan 16 12:23:25 raspberrypi systemd[1]: squid.service: Supervising process 24970 which is not our child. We'll most likeJan 16 12:23:25 raspberrypi systemd[1]: Started LSB: Squid HTTP Proxy version 3.x.</code></pre>http://superuser.com.xemphimonlines.com/q/12860231bash + how to avoid specific messages in the log file © superuser.comenodmilvadohttp://superuser.com.xemphimonlines.com/users/8576802018-01-16T10:37:00Z2018-01-16T14:39:58Z<p>when I run the bash script on my Linux machine we get the following errors in my log , </p><p>note - we set in the script:</p><pre><code>exec &gt; $log 2&gt;&amp;1 , ( in order to send all standard error/output to $log ) </code></pre><p>the errors messages:</p><pre><code>tput: No value for $TERM and no -T specified</code></pre><p>in order to filter this errors messages we try to set in the bash script that:</p><pre><code>export TERM=xterm</code></pre><p><strong>but without help</strong></p><p>after digging we found that happened in some case for example when we perform ssh to remote machine and runs commands on remote machine VIA ssh</p><p>in order to avoid that we set TERM=xterm in the bash script as the following:</p><pre><code>ssh user@$remote_machine "TERM=xterm /tmp/script.sh"</code></pre><p>but it’s very not elegant solution and because my script use a lot of ssh and curl command then it’s not practical solution to set this on each SSH or curl etc</p><p><strong>so my big question is</strong></p><p>how to filter the message – <strong>tput: No value for $TERM and no -T specified</strong> ?</p><p>so we not get these ugly message in my <strong>$log</strong> file</p>http://superuser.com.xemphimonlines.com/q/1286004-4Which file system supports longer filenames than 256 characters? [on hold] © superuser.comTechLordhttp://superuser.com.xemphimonlines.com/users/8623012018-01-16T09:33:33Z2018-01-16T10:15:28Z<p>Even the considerably <em>ultimate super-file system</em> BtrFS has preserved an ancient limitation: Only up to 255 characters per filename! That's also the case for UDF 2.50 and UDF 2.60, ext4, also Microsoft's ReFS.</p><p>The total path length is often much longer, often 1023 Bytes.But I spotted no file system so far to bypass the 256-character-barrier for single filenames.</p><p>Is there any file system which breaks the barrier of 256 characters?</p>http://superuser.com.xemphimonlines.com/q/12859640How to fix and prevent VirtualBox Kernel driver not installed © superuser.comOnnohttp://superuser.com.xemphimonlines.com/users/5286892018-01-16T06:09:12Z2018-01-16T15:46:39Z<p>Today I noticed that my VirtualBox VMs no longer start. With messages</p><pre><code>The virtual machine 'CGI' has terminated unexpectedly during startup with exit code 1 (0x1).Result Code:NS_ERROR_FAILURE (0x80004005)Component:MachineWrapInterface:IMachineUnknown macro: {b2547866-a0a1-4391-8b86-6952d82efaa0} </code></pre><p>And </p><pre><code>Kernel driver not installed (rc=-1908)The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing'/sbin/vboxconfig'as root.where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT. </code></pre><p>It seems this is caused by a kernel update. I actually wasn't aware that Ubuntu is doing automatic kernel updates. The log <code>/var/log/dpkg.log</code> shows that kernel update was going on right before problems started. </p><p><code>sudo dpkg --list | grep linux-image</code> shows images lines with many 4.8, 4.10 and 4.13 versions. </p><pre><code>[user:~] $ uname -aLinux io 4.13.0-26-generic #29~16.04.2-Ubuntu SMP Tue Jan 9 22:00:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux</code></pre><p>The suggested solution for this problem unfortunately does not work. </p><pre><code>[root:~] # /sbin/vboxconfigvboxdrv.sh: Stopping VirtualBox services.depmod: ERROR: could not open directory /lib/modules/4.10.0-27-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.10.0-28-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.10.0-30-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.10.0-32-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.10.0-33-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.10.0-35-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.10.0-37-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.10.0-38-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.10.0-40-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.8.0-41-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.8.0-45-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.8.0-46-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.8.0-49-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.8.0-52-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.8.0-54-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.8.0-56-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorydepmod: ERROR: could not open directory /lib/modules/4.8.0-58-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directoryvboxdrv.sh: Building VirtualBox kernel modules.vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.There were problems setting up VirtualBox. To re-start the set-up process, run/sbin/vboxconfigas root.[root:~] # </code></pre><p>The install log <code>/var/log/vbox-install.log</code> is too large to post here but it starts with following message</p><pre><code>make[1]: warning: -jN forced in submake: disabling jobserver mode.test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \echo &gt;&amp;2; \echo &gt;&amp;2 " ERROR: Kernel configuration is invalid."; \echo &gt;&amp;2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\echo &gt;&amp;2 " Run 'make oldconfig &amp;&amp; make prepare' on kernel src to fix it."; \echo &gt;&amp;2 ; </code></pre><p>There are actually three questions now I think* How do I fix kernel configuration?* How do I fix VirtualBox? Should I remove and reinstall?* How do I prevent these types of issues? Should I disable auto-updates of kernel?</p><p><a href="https://i.stack.imgur.com/vEHkM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vEHkM.png" alt="enter image description here"></a><a href="https://i.stack.imgur.com/r0X3H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r0X3H.png" alt="enter image description here"></a></p>http://superuser.com.xemphimonlines.com/q/12859102Hardware encryption on usb drive / stick © superuser.comlinux_loverhttp://superuser.com.xemphimonlines.com/users/8626612018-01-16T00:46:33Z2018-01-16T12:39:29Z<p>I am wondering whether there is a possibility to encrypt and decrypt an usb drive or stick with some microcontroller or single-board computer (e.g. Raspberry Pi) on the fly.</p><p>For instance I want to encrypt my usb drive, connect it to my tv and watch movies. My tv does not support decryption so I need a device between my drive and tv.</p><p>Would be handy if I can use a Raspberry Pi for this purpose. Any suggestions?</p>http://superuser.com.xemphimonlines.com/q/12858790How to install package from a .tar.lz file © superuser.comHashimhttp://superuser.com.xemphimonlines.com/users/3230792018-01-15T22:20:27Z2018-01-15T22:37:50Z<p>I'm using bash (Cygwin, specifically). I'm trying to install <a href="https://www.gnu.org/software/ddrescue/ddrescue.html" rel="nofollow noreferrer">GNU dd_rescue</a>, which comes in a <code>.tar.lz</code> archive file.</p><p>When I use:</p><pre><code>tar -xzf ddrescue-1.22.tar.lz</code></pre><p>...it returns with the following error:</p><blockquote><p>gzip: stdin: not in gzip format<br>tar: Child returned status 1 tar:<br>Error is not recoverable: exiting now</p></blockquote><p>When I use:</p><pre><code>tar --lzip -xf ddrescue-1.22.tar.lz</code></pre><p>...it returns with:</p><blockquote><p>tar (child): lzip: Cannot exec: No such file or directory<br>tar (child): Error is not recoverable: exiting now<br>tar: Child returned status 2<br>tar: Error is not recoverable: exiting now</p></blockquote><p>How can I extract and install a package from an <code>lzip</code> archive file?</p>http://superuser.com.xemphimonlines.com/q/12858500Export nfs to devices in the local ip range without specifying local ip © superuser.comSteevieDhttp://superuser.com.xemphimonlines.com/users/8626122018-01-15T20:33:03Z2018-01-16T12:58:56Z<p>I have a system which contains a number of raspberry pi's, one of which is a 'master' which must export an nfs to a number of 'slave' devices in the system. </p><p>The system will be connected to the end users network; the end user will be able to specify an ip subnet range on which the pi's must communicate.</p><p>To cut down on setup complexity for the end user, is it possible to specify in /etc/exports to share with only the local ip address of the pi?</p><p>Something like:</p><pre><code>/home local-ip/255.255.255.0(ro)</code></pre><p>To be clear: If the end user sets the ip of the pi's to be in the 10.0.1.x range or the 192.168.5.x range, is it possible for exports to automatically use this range without modifying /etc/exports? I don't want to export to all ip's.</p><p>Other info: The user has no communication with the system while in use. The SD card for the pi has a small FAT partition which the end user can mount in a windows computer and modify an interfaces file which is sourced by /etc/network/interfaces to allow them to change the ip. The /etc/exports does not appear to support sourcing from another file.</p>http://superuser.com.xemphimonlines.com/q/12858260Meaning of "You do not own that mountpoint" when switching to and from root? © superuser.comhunter2http://superuser.com.xemphimonlines.com/users/8626182018-01-15T19:43:57Z2018-01-15T19:59:50Z<p>I recently installed a new debian OS (replacing my old ubuntu) and kept the same home directory. Whenever I switch into and out of root (via the su command) I get a message that says "You do not own that mountpoint." What is the meaning of this message and how do I get rid of it?</p>http://superuser.com.xemphimonlines.com/q/12857700VeraCrypt "Failed to obtain administrator privileges" on Fedora with correct password © superuser.comLiam Pierihttp://superuser.com.xemphimonlines.com/users/3995042018-01-15T16:51:06Z2018-01-15T16:51:06Z<p>I'm trying to mount a drive with Veracrypt, but after entering the correct password for admin rights I get "Failed to obtain admin privileges". I can't <code>sudo veracrypt</code> because it is gui. I'm guessing my only work around will be using the cli tool. But I'd like to use the GUI.</p>http://superuser.com.xemphimonlines.com/q/12857510Reliably tail/stream a log file to another machine (Keyword: Reliably). Strangely impossible? © superuser.comdeclanwhttp://superuser.com.xemphimonlines.com/users/8618782018-01-15T15:22:33Z2018-01-15T15:22:33Z<p>I have a growing logfile on a unix box. I just want something that collects that data on another box within a few seconds of it being written.</p><p>Sounds simple. But I need it to not introduce screw ups if :</p><ol><li>either box reboots </li><li>the network glitches</li><li>the logfile is rotated (no need to lose data with a filehandle open on both)</li><li>handling the above causes undetectable data duplication (since the filename/inode/seekpoint/trunccount are available, duplication is detectable)</li><li>(Optional) the file is truncated (return to start, mention to peer - small window of potential unavoidable data loss).</li></ol><p>I can't seem to find anything that does this right. <em>syslog-ng</em> and <em>nxlog</em> want money to avoid problem 2. <em>rsyslog</em> gives itself problem 1 when it faces problem 2, and ate my CPU in testing.</p><p>There seems to be no tool that doesn't create more problems than it solves.</p>http://superuser.com.xemphimonlines.com/q/12857500MTP device detected under Linux but not under Windows © superuser.comArkaikhttp://superuser.com.xemphimonlines.com/users/7625932018-01-15T15:19:01Z2018-01-16T15:56:40Z<p>I designed a board embedding a custom Linux built through buildroot. This board has a peripheral usb connector to appear like a device when connected to another OS.</p><p>A <a href="https://github.com/ali1234/pymtpd" rel="nofollow noreferrer">MTP-responder python program</a> is binded to the associated Usb Device Controller (Atmel USBA).</p><p>I'm able to detect the board as a MTP device under Linux with both libmtp v1.1.13 and nautilus. <br/>I'm also able to transfert files and share mountpoints through nautilus as if it was a MTP device like an Android phone for example.</p><hr><p>However I'm not able to do the same under Windows 7 Professional, I installed <a href="https://www.microsoft.com/en-us/download/details.aspx?id=19153" rel="nofollow noreferrer">Microsoft MTP Porting Kit</a> but my board is not recognized as a MTP device but as "Unknown Device".</p><p>I also tried to update driver through device manager following <a href="https://www.howtogeek.com/195607/how-to-get-your-android-device-to-show-up-in-file-explorer-if-it-isnt/" rel="nofollow noreferrer">this link</a> and selecting : <br/>"Update Driver Software"==> "Browse my computer for driver software"==> "Let me pick from a list of device drivers on my computer"=> "Android Device"</p><p>However at this point the only options I have are the following ones : </p><ul><li>Android ADB Interface</li><li>Android Bootloader Interface</li><li>Android Composite ADB Interface</li></ul><p>I don't have any MTP device like in the link I gave.</p><hr><p>I tried with my Android phone which was detected as a Mobile Device after I authorized connection on my phone.</p><hr><p>This is really torturing me as I'm not used to Windows OS and it's working well under Linux. I can't make it work under Windows even if I installed MTP driver given by Microsoft.</p><p>Does anybody have a clue about detecting MTP devices which are not Android phones ? <br/>Or maybe there is a command line utility which could allow me to initiate communication with my board ?</p><hr><p><strong><em>EDIT :</em></strong> After further research I've realized that Windows 7 should have MTP drivers built-in. So installing drivers was useless. <br/>However I'm still not able to communicate with my board.</p>http://superuser.com.xemphimonlines.com/q/12857450How do I change fix this white-on-white KDE Konsole Scrollbar? © superuser.comPhilluminatihttp://superuser.com.xemphimonlines.com/users/628212018-01-15T15:03:26Z2018-01-16T08:26:17Z<p>If I'm running dwm as my tiling window manager, what is drawing the window decorations of my system and how can I customise them please?</p><p>Steps to reproduce:</p><ol><li>Install Debian Stable (choose the graphical KDE environment)</li><li>Install DWM</li><li>Observe this unusable (white-on-white) scrollbar when using Konsole:</li></ol><p><a href="https://i.stack.imgur.com/GMjUb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GMjUb.png" alt="what konsole looks like"></a></p><p>I've tried using "systemsettings5" which (supposedly) allows me to alter my KDE theme but for some reason the options don't seem to stick, probably because I'm using DWM. It appears to influence how firefox looks but not how Konsole looks. Any help is appreciated.</p>http://superuser.com.xemphimonlines.com/q/12857380linux full system backup with tar © superuser.comuser5356132http://superuser.com.xemphimonlines.com/users/8599552018-01-15T14:39:33Z2018-01-15T14:39:33Z<p>my question is related to <a href="https://wiki.archlinux.org/index.php/Full_system_backup_with_tar" rel="nofollow noreferrer">this tutorial</a> </p><p>the script says <code>echo -n "First chroot from a LiveCD. Are you ready to backup? (y/n): "</code></p><p>but is it really necessary to chroot into the system from a LiveCD?</p><p>i can also run the script directly from within the system and can create a valid full-system-archive according to <a href="https://help.ubuntu.com/community/BackupYourSystem/TAR" rel="nofollow noreferrer">this other tutorial</a></p><p>so why is this article saying it is needed to chroot from a livecd. </p><p>i dont get it.</p>http://superuser.com.xemphimonlines.com/q/12857310backupninja rsync su: unrecognized option "--delete" © superuser.comC Taquehttp://superuser.com.xemphimonlines.com/users/8625242018-01-15T14:10:27Z2018-01-15T14:10:27Z<p>I'm trying to make a backup of my data with backupninja and it fails like this :</p><pre><code>➜ /etc sudo backupninja -d -t -nDebug: check_perms /etc/backup.dDebug: perms: drwxrwx---Debug: gperm: rwxDebug: wperm: ---Debug: check_perms /etc/backup.d/10-home_WD-Cyprien.rsyncDebug: perms: -rw-------Debug: gperm: ---Debug: wperm: ---Info: &gt;&gt;&gt;&gt; starting action /etc/backup.d/10-home_WD-Cyprien.rsync (because of --now)Debug: yesDebug: executing handler in locked section controlled by /var/lock/backupninja/_etc_backup.d_10-home_WD-Cyprien.rsyncInfo: Syncing /etc on /mnt/WD-Cyprien//Backup-Data-Yoga//etc//...Debug: nice -n 0 /usr/bin/rsync "-av --delete --recursive" //etc/ /mnt/WD-Cyprien//Backup-Data-Yoga//etc//su : option non reconnue « --delete »Syntaxe : su [options] [IDENTIFIANT]Options :-c, --command COMMANDE passer la commande COMMANDE àl'interpréteur de commande appelé ;-h, --help afficher ce message d'aide et quitter ;-, -l, --login utiliser un interpréteur de commandesinitial (« login shell ») ;-m, -p,--preserve-environment ne pas réinitialiser les variablesd'environnement et conserver le mêmeinterpréteur de commandes ;-s, --shell SHELL utiliser SHELL comme interpréteur decommandes à la place de celui définipar défaut dans le fichier passwd.Fatal: Rsync error 2 when trying to transfer /etcFatal: &lt;&lt;&lt;&lt; finished action /etc/backup.d/10-home_WD-Cyprien.rsync: FAILEDDebug: send report to rootsend-mail: fatal: open /etc/postfix/main.cf: No such file or directoryCan't send mail: sendmail process failed with error code 75Info: FINISHED: 1 actions run. 1 fatal. 0 error. 0 warning.</code></pre><p>config files:</p><p><a href="https://hastebin.com/babikesoyi.ini" rel="nofollow noreferrer">backupninja.conf</a><a href="https://hastebin.com/zegagoxohi.ini" rel="nofollow noreferrer">backup config file</a></p><p>backupninja : Version: 1.0.1-2</p><p>rsync: Version: 3.1.2-1ubuntu0.1</p>http://superuser.com.xemphimonlines.com/q/12857060mv within shell script does not move files © superuser.comFrederick Löbighttp://superuser.com.xemphimonlines.com/users/8624882018-01-15T12:33:01Z2018-01-15T18:04:32Z<p>Often discussed, yet the answers did not get me to a solution unfortunately, and I am a bit ashamed that I need to ask this question again. But, here we are.</p><p>I have a shell script <code>dosomething.sh</code> with the shebang <code>#!/bin/bash</code>.</p><p>Within this script I have the following line to copy files of a certain type from one directory to another:</p><pre><code>find "/var/www/analysis_xyz/" -name '*log.gz' -exec mv -f {} "/media/pi/MOBIDICDATA" \;</code></pre><p>When I execute this line directly in the CLI, everything works like a charm. Unfortunately, when the script is executed, nothing is copied. </p><p>I am positive that this is only a minor thing I am missing :/ The question is: what?</p>http://superuser.com.xemphimonlines.com/q/12856821Network : Linux can't connect to specific site © superuser.commaxbchttp://superuser.com.xemphimonlines.com/users/5156262018-01-15T11:28:21Z2018-01-15T11:28:21Z<p>I have a local network connected to internet, and several computers. The Windows machines are working just fine, but all the Linux machines (VMs or hard) can't connect to one specific site (on any port/service, including 80/443/22 etc.). They are based on Ubuntu 16.04 (kubuntu for the most part). </p><p>The rest of the sites are working fine. DNS requests are working fine and yield the right address.</p><p>Just <strong>this specific IP</strong> address doesn't work, and <strong>only on Linux</strong>. For all the services tested, the result is always the same : they can't connect to the server. The problem happened sporadically but is now more extreme. It's also probably not a firewall rule (since it used to work without changes in any firewall).</p><p>How can I diagnose such a problem?</p>http://superuser.com.xemphimonlines.com/q/12856761extend gnome-shell PATH for access to ruby binary with RVM © superuser.comcedlemohttp://superuser.com.xemphimonlines.com/users/3970962018-01-15T11:13:49Z2018-01-15T11:13:49Z<p>I have a terminal written in ruby that I install with a gem. I want to be able to launch this terminal when I hit <code>Alt+F2</code> in gnome-shell. When I used the ruby version of my system, I just have to modify my <em>.profile</em> like this:</p><pre><code>PATH=$PATH:$(ruby -e "print Gem.user_dir")/bin</code></pre><p>But with RVM, it does not work because the ruby used is the system ruby binary.How can I get the current rvm gem path from this <em>.profile</em> file ?</p>http://superuser.com.xemphimonlines.com/q/1285669-2Abnormal font in kali Linux programs like opera browser, skype, qtwebkit © superuser.comjan yougahttp://superuser.com.xemphimonlines.com/users/8624542018-01-15T10:55:18Z2018-01-15T17:03:54Z<p>I have problem with my OS. The fonts in Kali Linux programs are showing abnormal. What is the problem?</p><p><a href="https://i.stack.imgur.com/CX6uu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CX6uu.png" alt="Pyqt webkit"></a></p><p><a href="https://i.stack.imgur.com/PStZG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PStZG.png" alt="skype"></a></p><p><a href="https://i.stack.imgur.com/eK0kM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eK0kM.png" alt="opera"></a></p><p>Hint: I think the source of this problem is from PyQt4. I installed PyQt4 with Python 2.7 on my Kali Linux. Because all other my program runs good and have not had any problems.</p>http://superuser.com.xemphimonlines.com/q/12856530What is the recommended FDQN for a local laptop on a DHCP home network? © superuser.comIvanhttp://superuser.com.xemphimonlines.com/users/1526832018-01-15T10:13:20Z2018-01-16T08:02:04Z<p>I have a pretty common home network and a laptop that connects to it either by Ethernet or wifi and gets an IP using DHCP. What is the recommended configuration for FDQN, including hostname and /etc/hosts? I currently have</p><p>/etc/hosts:</p><pre><code>127.0.0.1 localhost127.0.1.1 euclides.localdomain euclides::1 localhost ip6-localhost ip6-loopback</code></pre><p>and on /etc/hostname:</p><pre><code>euclides.localdomain</code></pre><p>I would like to configure it to keep everything in the local network working the way it is now and try to prevent errors like this one from Spark:</p><pre><code>18/01/15 08:12:25 WARN Utils: Your hostname, euclides.localdomain resolves to a loopback address: 127.0.1.1; using 192.168.0.22 instead (on interface enp3s0)</code></pre>