Saturday, June 25, 2022

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


No video playback or no sound when launching a game

Posted: 25 Jun 2022 05:08 AM PDT

Situation

I played a little around with Minecraft mods and wanted to do some modding myself. And since Linux runs Minecraft a lot faster on my machine (with the proprietary nVidia driver), why not program on Linux. Also i like the developer tools on Linux much better.

So i installed the driver on my Machine:
Machine:

  • Ryzen 3800X
  • GTX 1060 3GB OC (Driver: 5.15.48.07)

Linux:

  • Arch Linux
  • gnome-shell (42.2-1)
  • Minecraft Launcher (1.0.1221)
  • Pulseaudio (16.1.1)

Problem

I watch some videos on the topic of modding and after Minecraft launches and gets to the title screen, a few things start to break.

What I discovered:

  • Firefox/Librewolf refuses to playback youtube videos
    • it starts a few milliseconds of the videos and then stops
    • it's not a network problem
    • it buffers the video like it normally would
  • VLC media player behaves weirdly
    • no sound
    • the actual video is played in a second window, the main VLC window is empty but contains the playback bar
  • Spotify cannot playback music
    • one time it playes music but there is no sound output (in general)
    • sometimes it errors: Something went wrong

There are a view differences with each try:

  • a few times it kept the audio output to line-out, as I configured it, but still didn't output any audio
  • most recently starting Minecraft changed the audio output to my HDMI monitor
    • setting the output back to line-out manually kept me from hearing anything
    • I was able to hear Minecraft audio after that

What I tried

A logout/login resets everything: Sound works until I run Minecraft. I suspect the pulseaudio-daemon gets restarted. I have no idea how to start, what logs to view or if I need to install any additional software for audio to work.

Unable to connect to rainloop

Posted: 25 Jun 2022 03:49 AM PDT

I am installing Rain Loop but when I want to connect to an account I have this message that appears "Authentication failed" have you ever seen this problem

Regards [1]: https://i.stack.imgur.com/HisYP.png

why /home/$user/.local/bin//script and not /home/$user/.local/bin/script [duplicate]

Posted: 25 Jun 2022 05:08 AM PDT

I have $HOME/.local/bin in PATH and that's where i keep my scripts as well as local installs.

❯ find $HOME/.local/bin/p*    /home/charlie/.local/bin/pip  /home/charlie/.local/bin/pip3  /home/charlie/.local/bin/pip3.10  /home/charlie/.local/bin/pipx  /home/charlie/.local/bin/prompt  /home/charlie/.local/bin/pylint  /home/charlie/.local/bin/pyreverse  /home/charlie/.local/bin/python-argcomplete-check-easy-install-script    ❯ which pip  /home/charlie/.local/bin//pip  ❯ which pylint  /home/charlie/.local/bin//pylint    

As you can see find shows the proper path, but which gives that // as if there's some invisible directory in between

Why is that so??

edit: showing relevant contents from the $PATH variable:

❯ echo $PATH | tr : '\n'  /home/charlie/.local/bin/cron  /home/charlie/.local/bin/i3cmds  /home/charlie/.local/bin/statusbar  /home/charlie/.local/bin/links  /home/charlie/.local/bin/rivercmd  /home/charlie/.local/bin/    

This is how the paths within ~/.local/bin are added to PATH :

❯ du "$HOME/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//'    

scp with file ignore

Posted: 25 Jun 2022 04:01 AM PDT

Hi does anyone know how to ignore certain files when using the scp command? I have the following file structure on the server :

Everything >

  • NeedThis
  • NeedThisTo
  • DontNeedThis

I want to get "NeedThis" and "NeedThisTo" and ignore "DontNeedThis". I can't just use two separate scps as in reality there are a few hundred files. Neither can I move nor copy anything (part of this problem, can be seen as a set condition). Does anyone now a solution to my problem? Thanks in advance.

How to remove usb live boot?

Posted: 25 Jun 2022 04:08 AM PDT

I tried the delete partition, delete volume, and formatting the usb but it didn't work. Every time I turn on the PC it makes me choose if I want to use Ubuntu or Windows.

here's an image of it

How can I delete Ubuntu and make the PC automatically use Windows?

Process the same stdin two time and append the outputs

Posted: 25 Jun 2022 05:01 AM PDT

I have a json file that looks like:

[      {          "key": "alt+down",          "command": "-editor.action.moveLinesDownAction",          "when": "editorTextFocus && !editorReadonly"      },      {          "key": "alt+f12",          "command": "editor.action.peekDefinition",          "when": "editorHasDefinitionProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor"      }  ]  //  {  //      "key": "ctrl+shift+d",  //      "command": "workbench.action.toggleMaximizedPanel"  //  },  //  {  //      "key": "ctrl+shift+d",  //      "command": "-workbench.view.debug",  //      "when": "viewContainer.workbench.view.debug.enabled"  //  }  

I want to sort this file.

jq give error if there is // at the beginning of line as this is not a valid json.

So to sort this file, the command I came up with is:

grep -v '^[ ]*//' keybindings.json | jq 'sort_by(.key)'  

But I do not want to discard the commented lines. So, to get the commented lines, the command I came up with is:

grep '^[ ]*//' keybindings.json  

Now to solve my problem, what I can simply do is:

#!/bin/bash    SORTED_JSON=$(grep -v '^[ ]*//' keybindings.json | jq 'sort_by(.key)')  COMMENTED_JSON=$(grep '^[ ]*//' keybindings.json)    echo "$SORTED_JSON" >keybindings.json  echo "$COMMENTED_JSON" >>keybindings.json  

But there is a catch.

I have to do this in one command. This is because, I am doing this via a vscode settings.

"filterText.commandList": [      {          "name": "Sort VSCode Keybindings",          "description": "Sorts keybindings.json by keys. Select everything except the comment in fist line. Then run this command",          "command": "jq 'sort_by(.key)'"      }  ]  

The command take the selected text as stdin, process it, then output the processed text.

So, as far i understand, i have to read the stdin two times (once with grep -v '^[ ]*//' | jq 'sort_by(.key)' and the second time with grep '^[ ]*//'). And append the two command output in stdout.

How can I solve this problem?

Update 1:

I have tried both

cat keybindings.json| {grep -v '^[ ]*//' | jq 'sort_by(.key)' ; grep '^[ ]*//'}  

and

cat keybindings.json| (grep -v '^[ ]*//' | jq 'sort_by(.key)' ; grep '^[ ]*//')  

These does not show the commented lines.

Update 2:

The following seems to be close to what I was expecting. But here commented lines come before the uncommented lines.

$ cat keybindings.json| tee >(grep -v '^[ ]*//' | jq 'sort_by(.key)') >(grep '^[ ]*//') > /dev/null 2>&1      //  {      //      "key": "ctrl+shift+d",      //      "command": "workbench.action.toggleMaximizedPanel"      //  },      //  {      //      "key": "ctrl+shift+d",      //      "command": "-workbench.view.debug",      //      "when": "viewContainer.workbench.view.debug.enabled"      //  }  [    {      "key": "alt+down",      "command": "-editor.action.moveLinesDownAction",      "when": "editorTextFocus && !editorReadonly"    },    {      "key": "alt+f12",      "command": "editor.action.peekDefinition",      "when": "editorHasDefinitionProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor"    }  ]  

Update 3:

cat keybindings.json| (tee >(grep '^[ ]*//'); tee >(grep -v '^[ ]*//' | jq 'sort_by(.key)'))  

or,

cat keybindings.json| {tee >(grep '^[ ]*//'); tee >(grep -v '^[ ]*//' | jq 'sort_by(.key)')}   

also seems to give the same output as Update 3 (commented lines come before the uncommented lines).

Error With gtk-launch: Unable to find terminal required for application

Posted: 25 Jun 2022 12:48 AM PDT

I tried to use the following command:

gtk-launch nvim file.txt  

But it gave me this error:

gtk-launch: error launching application: Unable to find terminal required for application  

How am I supposed to set the terminal required for application? I already set my $TERM and $TERMINAL environmental variables:

export TERM="kitty"  export TERMINAL="kitty"  

ed does not join lines with ASCII text, with CRLF, LF line terminators

Posted: 25 Jun 2022 03:54 AM PDT

I am currently running Gnu ed version 1.18 in the Debian WSL on Windows. If I edit a file with the following encoding:

ASCII text, with CRLF, LF line terminators  

or

ASCII text, with CRLF,  

then ed does not properly join lines with the j command. Rather, it deletes the first line meant to be joined.

This problem does not occur if the file is created in ed, but it does affect files that were created in other programs and are then edited in ed. The same problem is found in GNU ed 1.17.

Is this a bug? How would one circumvent this problem?

How to delete all partitions without using an operating system

Posted: 25 Jun 2022 04:57 AM PDT

How to delete all partitions from my system using only the GNU Grub Terminal and BIOS

Using excess video memory for disk caching?

Posted: 25 Jun 2022 01:32 AM PDT

On newer Ryzen 5000-based laptops, the integrated graphics controller always gets at least 1GB of shared video memory. In the BIOS settings, 1GB is the minimum. For people who don't need 1GB for video stuff because they use 2D graphics mainly, is there a way to grab some of that shared video memory and let the Linux or BSD kernel use it for disk file caching?

What are the main differences between the ed and ex editors?

Posted: 25 Jun 2022 04:33 AM PDT

The ex editor is often touted as an enhancement and simplification of ed. I would like to know what specific enhancements and simplifications it offers. GNU ed, for example, offers extended regular expressions. So, besides these, what advantages come with ex?

automount disks but with dev name, not some random numbers

Posted: 25 Jun 2022 12:34 AM PDT

On Linux, all connected disks have ambiguous mountpoint names to user.

For example, if I connect a USB then Linux (udev?) mounts it to a directory like this:

/media/username/78128SDGHJ23G

But I want to mount block devices to a directory which is named with their /dev/ names.

For /dev/sdb1 it should be like this:

/media/username/sdb1

So users can access the mounted blocks easily without looking for which random numbers points which devices.

How can I do that, should I need to write an udev rule? If so, is there any example how to do this?

Thanks!

Error running `recode` inside a container

Posted: 25 Jun 2022 01:43 AM PDT

I am running a Fedora container with:

podman run -it registry.fedoraproject.org/fedora:36  

Inside this container, I first install recode:

[root@388e917ba8ce /]# sudo dnf install recode  

Then, when trying to execute recode, I get this error:

[root@388e917ba8ce /]# touch deleteme.txt  [root@388e917ba8ce /]# recode windows1251..utf8 deleteme.txt  recode: /deleteme.txt failed: System detected problem in step `CP1251..UTF-8'  

What could be causing this error?

Note that, when I run recode in my Fedora 36 system (without containers), I don't get any errors. Also, if I use an Ubuntu image, I don't get the error either.

Possible to match multiple conditions in one case statement and pass them as variables?

Posted: 25 Jun 2022 05:04 AM PDT

I have a bash script where I want to set a case variable. For file1 there are two different NUMBER variables that I then I want to pass to a text file.

I have tried the following:

case $FILE in     "file1")      NUMBER="12";;&      NUMBER="34";;&     "file2")      NUMBER="56";;  esac    mv textfile.txt $NUMBER.txt  

where I want the output for file1 to be the following:

12.txt  24.txt   

I am getting the following error:

syntax error near unexpected token `;;&'  

Do you have any suggestions? thanks so much.

LARGE zypper dup → Root partition full → (Heaven knows) I'm miserable now

Posted: 25 Jun 2022 02:34 AM PDT

Suse Tumbleweed attempted a mega update of the system (~6000 packages at once) and filled the root filesystem, that, according to the installer recommendations, was 35 Gb.

I attempted ① to delete the cache of RPM files, but zypper/rpm notified me that it needed to create some temporary files on the root partition and failed, ② uninstall a largish package that has no reverse dependencies (Zoom) but rpm notified me that it needed to create some temporary files on the root partition and failed, ③ I used btrfs file system resize +5G / but I was told ERROR: unable to resize '/': no enough free space ④ so I shrinked the /home partition by 20Gb and tried again, same problem.

This is from df

localhost:~ # df /  Filesystem               1K-blocks     Used Available Use% Mounted on  /dev/mapper/system-root   36700160 32168820         0 100% /  

… from the above it looks like there are 4531340 1K blocks free (≈ 4.5Gb) and while I understand that a filesystem needs some elbow space …

I am really tempted to copy my user files to an USB key and install Debian, because apt duly informed me of problems with disk space every single time I tried to shoot myself in the foot, but I'd rather wait for an informed suggestion on my next course of action.


E.g., that bunch of /.snapshots/xyz directories, looks a promising target for a rm -fr … but — I don't know, I really need some guidance!

PS I have learnt something about snapper in the last hour, at least as much as I need to leave /.snapshots alone until an expert unveils to me a different perspective.


This is the output of a more appropriate command,

localhost:/ # btrfs filesystem df /  Data, single: total=33.21GiB, used=28.92GiB  System, single: total=32.00MiB, used=16.00KiB  Metadata, single: total=1.76GiB, used=1.69GiB  GlobalReserve, single: total=73.45MiB, used=0.00B  

again, there are more than 4 Gb of not used (available?) space and everything fails due to full disk.


I'd like to mention that I can boot Windows, if some Windows' tool supports manipulating BTR file systems that could help, couldn't it?

Jenkins sh : wait for wget download to finish

Posted: 25 Jun 2022 01:33 AM PDT

I have a hard time to force wget command to wait until download finish's, problem occurs inside Jenkins sh '''script place '''. I have wrote the script in .sh file, where it runs without any issues, but after moving it into Jenkins other command in Jenkins executes before the download completes.

script I'm using looks like this

sh '''                     ssh -i "${keyfile}" -v -o StrictHostKeyChecking=no myuser@myVM << ENDSSH                     cd /toFolder                     ls -l                     echo                     if [ -f *.zip ]                        then                        echo "zip file already exists. Aborting"                        exit 1                     fi                                          wget ${URL}                      sleep 1                     export ZIP_FILENAME=`ls *.zip`                     echo run: deployment.sh -j $ZIP_FILENAME                     echo                     deployment.sh -j $ZIP_FILENAME                     ENDSSH                  '''  

for the sake of pasting this code here I have moved ENDSSH on the last line under deployment script to keep it inside the code block. (I know it should be far left of the script)

so my problem is that finding the file name which has to be deployed with deployment.sh is executed before download is completed.

Tried to use wait command, as well as sleep, which I do not think is a best way to do it, but wait command does not wait at all and sleep command works from time to time. curl behavior is exactly the same. any advices will be much appreciated, as long as I'm not with enough knowledge in Linux scripting.

Mutt Login Failed

Posted: 25 Jun 2022 12:25 AM PDT

I was using mutt for few months uptill it started giving an error: "Login failed".

When I do "mutt -d 5"

[2022-06-08 14:27:17] imap_authenticate: Using any available method.  

[2022-06-08 14:27:17] SASL local ip: 2401:4900:170d:264a:c146:ad26:5e83:fe0e;45008, remote ip:2404:6800:4003:c11::6d;993 [2022-06-08 14:27:17] External SSF: 256 [2022-06-08 14:27:17] mutt_sasl_cb_authname: getting authname for imap.gmail.com:993 [2022-06-08 14:27:17] mutt_sasl_cb_authname: getting user for imap.gmail.com:993 [2022-06-08 14:27:17] mutt_sasl_cb_pass: getting password for garv.lodha@gmail.com@imap.gmail.com:993 [2022-06-08 14:27:17] Authenticating (PLAIN)... [2022-06-08 14:27:17] 4> a0001 AUTHENTICATE PLAIN Z2Fydi5sb2RoYUBnbWFpbC5jb20AZ2Fydi5sb2RoYUBnbWFpbC5jb20AYmhAZ3ZAZGdpdEAxJiU= [2022-06-08 14:27:18] 4< a0001 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure) [2022-06-08 14:27:18] IMAP queue drained [2022-06-08 14:27:18] imap_auth_sasl: IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH2 AUTH=PLAIN AUTH=PLAIN-CLIENTTOKEN AUTH=OAUTHBEARER AUTH=XOAUTH failed [2022-06-08 14:27:18] Logging in... [2022-06-08 14:27:18] 4> a0002 LOGIN "garv.lodha@gmail.com" "password" [2022-06-08 14:27:18] 4< a0002 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure) [2022-06-08 14:27:18] IMAP queue drained [2022-06-08 14:27:18] Login failed. [2022-06-08 14:27:20] mutt_num_postponed: using old IMAP postponed count. [2022-06-08 14:27:43] mutt_index_menu[792]: Got op 164 [2022-06-08 14:27:43] Closing connection to imap.gmail.com... [2022-06-08 14:27:43] 4> a0003 LOGOUT [2022-06-08 14:27:43] 4< * BYE Logout Requested s1mb93885201jar [2022-06-08 14:27:43] Handling BYE

Any help is appreciated.

Thanks

-Garv

TigerVNC not working on Fedora

Posted: 25 Jun 2022 02:11 AM PDT

using this guide: https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/infrastructure-services/TigerVNC/#TigerVNC.adoc#configuring-vncserver

and it's single user setup, at the "systemctl start vncserver@:display_number.service" step, and changing display_number appropriately, I get this:

Job for vncserver@:0.service failed because the control process exited with error code.    See "systemctl status vncserver@:0.service" and "journalctl -xeu vncserver@:0.service" for details.  

After running the first command:

× vncserver@:0.service - Remote desktop service (VNC)    Loaded: loaded (/etc/systemd/system/vncserver@.service; disabled; vendor preset: disabled)    Active: failed (Result: exit-code) since Mon 2022-01-24 04:09:20 CET; 10s ago    Process: 7899 ExecStart=/sbin/runuser -l (MY USERNAME HERE, REMOVED FOR PRIVACY) -c /usr/bin/vncserver :0 -geometry 1920x1080 (code=exited, status=203/EXEC)    CPU: 1ms      Jan 24 04:09:20 fedora systemd[1]: Starting Remote desktop service (VNC)...    Jan 24 04:09:20 fedora systemd[7899]: vncserver@:0.service: Failed to execute /sbin/runuser: Permission denied    Jan 24 04:09:20 fedora systemd[7899]: vncserver@:0.service: Failed at step EXEC spawning /sbin/runuser: Permission denied    Jan 24 04:09:20 fedora systemd[1]: vncserver@:0.service: Control process exited, code=exited, status=203/EXEC    Jan 24 04:09:20 fedora systemd[1]: vncserver@:0.service: Failed with result 'exit-code'.    Jan 24 04:09:20 fedora systemd[1]: Failed to start Remote desktop service (VNC).  

What do? I've seen people with similar issues but none are exactly like this, regarding this specific file.

Thanks!

Can't connect to WPA2/PEAP/MSCHAPv2 enterprise wifi network without a certificate. Fedora 34

Posted: 25 Jun 2022 05:12 AM PDT

My university wifi uses WPA2 Enterprise for students to connect with their logins and passwords and I cannot do it, network manager always says the password is incorrect and prompts me for another one even though the password is correct.

My problem is simmiliar to https://askubuntu.com/questions/279762/how-to-connect-to-wpa2-peap-mschapv2-enterprise-wifi-networks-that-dont-use-a-c but none of the solutions work for me. I use Fedora 34 Gnome, my wifi adapter model is Intel AX200

My /etc/NetworkManager/system-connections/UNIVERSITY.WIFI look like this

[connection]  id=UNIVERSITY.WIFI  uuid=0cdeb50f-03dd-45ba-85df-465027f0e12a  type=wifi  interface-name=wlp1s0  permissions=    [wifi]  hidden=true  mac-address-blacklist=  mode=infrastructure  ssid=UNIVERSITY.WFIFI  [wifi-security]  key-mgmt=wpa-eap    [802-1x]  eap=peap;  identity=my_login  password=my_password  phase2-auth=mschapv2    [ipv4]  dns-search=  method=auto    [ipv6]  addr-gen-mode=stable-privacy  dns-search=  method=auto    [proxy]  

CentOS 7 Plugin "copr" can't be imported

Posted: 25 Jun 2022 02:01 AM PDT

In my CentOS 7 server getting Plugin "copr" can't be imported error message. I have installed this RPM yum-plugin-copr-1.1.31-52.el7.noarch

How can I fix this error message?

# yum copr enable  Plugin "copr" can't be imported  Loaded plugins: fastestmirror  No such command: copr. Please use /bin/yum --help  

Mailx command to send the email to gmail account with content type as Content-Type: text/html

Posted: 25 Jun 2022 01:02 AM PDT

I have installed the mailx , on Red Hat Enterprise Linux Server release 7.2 Am able to send the mail successfully, with following command.

echo -e "Body content goes here ..." | mailx -v -r "sendermail_id@x.com" -s "subject content goes here" -S smtp=smtp://x.x.x.x receivermail_id@.com

Above command sends mail with plain text in the body

I want a command wherein i can send mail with html type content in the mail body. like bold letters, font colors......How do i do??? any help will be appreciated.

Why does curl give me html instead of file? [closed]

Posted: 25 Jun 2022 12:40 AM PDT

I'm trying (learning) to use curl to download the file http://cscope.sourceforge.net/cscope_maps.vim . The commands I have tried are:

curl -o cscope_maps.vim cscope.sourceforce.net/cscope_maps.vim  curl -O cscope.sourceforce.net/cscope_maps.vim  curl -LO cscope.sourceforce.net/cscope_maps.vim  curl -L cscope.sourceforce.net/cscope_maps.vim > cscope_maps.vim  

All of the above commands result in me getting a file with the following content:

<html><head><script type="text/javascript">location.replace("https://malware.opendns.com/?url=cscope.sourceforce.net%2Fcscope_maps.vim&server=lax20&prefs=&tagging=&nref");</script></head></html>  

...instead of the actual file. What am I doing wrong, and what is the correct syntax to download a file with curl?

(If I enter the noted URL in a graphical browser, I see expected file contents, so I'm sure the URL is correct)

PS: I'd like to learn how to solve this with curl and not wget.

What else I have tried:

I read https://stackoverflow.com/questions/27458797/curl-command-doesnt-download-the-file-linux-mint which prompted me to try the -L options, but as noted above, this did not change the observed behavior.

How do I add semicolons to SQL statements?

Posted: 25 Jun 2022 04:03 AM PDT

Say I have this (with the format I show, no newlines)

INSERT INTO `somthing` (`something`) VALUES (1) INSERT INTO `somthing` (`somethingelse`) VALUES ('something with a (paranthesis) in it') INSERT INTO `somthing` (`something`) VALUES (3) INSERT INTO `somthing` (`something`) VALUES (4)  

I want the output to be

INSERT INTO `somthing` (`something`) VALUES (1); INSERT INTO `somthing` (`somethingelse`) VALUES ('something with a (paranthesis) in it'); INSERT INTO `somthing` (`something`) VALUES (3); INSERT INTO `somthing` (`something`) VALUES (4);  

So that they are legitimate SQL queries. I have tried this in sed:

sed 's/\(VALUES ([^)]*)\)/\1;/g')  

Which works, except when there are parantheses inside the values, I am not sure what do to to fix that. Basically, I want add a semicolon to the end of (.*), (the last )) if it says VALUES before it.

Errno 5 Input/output error when running yum check-update

Posted: 25 Jun 2022 12:05 AM PDT

I tried to update a server over SSH, but when I ran yum check-update I got an error:

[error 5] Input/output error

I think this means the RPM libraries may be damaged or corrupt, but I'm not sure how to resolve this.

Why are all my SSH attempts failing due to timeout?

Posted: 25 Jun 2022 12:38 AM PDT

I'm new to using SSH and related technologies, so it's very possible I'm not understanding something basic.

I'm trying to SSH into a web server (that I own) and the connection is never established due to timeout.

~ $ ssh -vvv example.com  OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011  debug1: Reading configuration data /Users/USER/.ssh/config  debug1: Reading configuration data /etc/ssh_config  debug1: /etc/ssh_config line 20: Applying options for *  debug1: /etc/ssh_config line 102: Applying options for *  debug2: ssh_connect: needpriv 0  debug1: Connecting to example.com [123.45.67.89] port 22.  debug1: connect to address IPADD port 22: Operation timed out  ssh: connect to host example.com port 22: Operation timed out  

My first thought was that I had somehow specified the domain wrong, or that something was wrong with my site. So I tried connecting to the same domain via FTP, and that worked fine (was prompted for user name):

~ $ ftp  ftp> open  (to) example.com  Connected to example.com.  220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------  220-You are user number 2 of 50 allowed.  220-Local time is now 12:47. Server port: 21.  220-This is a private system - No anonymous login  220-IPv6 connections are also welcome on this server.  220 You will be disconnected after 15 minutes of inactivity.  Name (example.com:USER):  

So then I thought maybe I was just using SSH wrong. I started watching this tutorial video. At about 1 minute in he does ssh will@supercars.com and gets a username prompt, but it gives me the same timeout as above. I then tried ssh google.com which does the same. ssh localhost, on the other hand, works fine. So the problem seems to be something to do with SSH requests over a network.

My next thought was that it may be a firewall issue. I do have Sophos installed on this machine, but according to my administrator it "should not" block outgoing SSH requests.

Can anyone help figure out why this is happening?

Virtual Memory Usage Exceeding Physical Drive Space

Posted: 25 Jun 2022 05:03 AM PDT

I have a machine running Ubuntu on Amazon EC2. The machine has a 43 Gb root drive and 30 Gb of RAM. I am running a processor and memory intensive process and I've noticed that it sometimes stalls for no apparent reason. I'm looking at the system usage via the htop program. I've included a screenshot below.

Does it make sense that the VIRT column adds up to more than the physical drive space of the system? My understanding is that is virtual memory usage. Essentially I'm trying to understand whether my process is freezing because it's running out of resources, and which resources it's running out of.

System usage. Virtual memory is exceeding the root drive space.

How to display the current keyboard layout?

Posted: 25 Jun 2022 04:29 AM PDT

Is there a utility that allows to graphically display the current keyboard layout?

This can be useful, for example, when writing in a foreign language and having the physical keyboard only indicating the local language (positioning of symbols, etc.). I would like to get a display similar to the following: enter image description here

"nl80211: 'nl80211' generic netlink not found" when starting hostapd

Posted: 25 Jun 2022 03:07 AM PDT

I have been trying to get my Ubuntu 11.10 laptop to make an access point to connect my blackberry playbook . hostapd gave error

    Configuration file: ./hostapd-minimal.conf      nl80211: 'nl80211' generic netlink not found      nl80211 driver initialization failed.  

Is this a BCM4312 problem? Can madwifi , hostap create wifi acccess point for me? Connectify can do this on windows so is there no equivalent??

Difference between block size and cluster size

Posted: 25 Jun 2022 02:26 AM PDT

I've got a question concerning the block size and cluster size. Regarding to what I have read about that I assume the following:

  • The block size is the physical size of a block, mostly 512 bytes. There is no way to change this.
  • The cluster size is the minimal size of a block that is read and writable by the OS. If I create a new filesystem e.g. ext3, I can specify this minimal block size with the switch -b. Almost all programs like dumpe2fs, mke2fs use block size as an name for cluster size.

If I have got the following output:

$ stat test  File: `test'  Size: 13            Blocks: 4          IO Block: 2048   regular file  Device: 700h/1792d  Inode: 15          Links: 1  

Is it correct that the size is the actual space in bytes, blocks are the physically used blocks (512 bytes for each) and IO block relates to the block size specified when creating the FS?

No comments:

Post a Comment