Automatic login feature in Ubuntu, everytime you'll still get this prompt "The login keyring got unlocked" and have to type password.
- Launch gnome-keyring
or sudo apt-get install seahorse && seahorse
- Go to Passwords | Right-click Login | Change Password (Login is just one... maybe other applications are also prompting you, so you can do this for them as well)
- Enter your old password
- Enter a blank password as the new one
お名前.com レンタルサーバRD RubyのCGIを動かす時の.htaccessの設定 サンプル
- お名前.com レンタルサーバRDで独自CGIは諦めるべき(恐らくVPSの方が良い)。
- これはレンタルサーバRDではルート権限がないためプリインストールのRuby(現時点で2.5.0)にgemをインストールできないのが大きな理由
- また、(Web)ドキュメントルートに自前のRubyをインストールしようとすると、git,rbenv(ruby-build)等のmakeプロセスでメモリエラーが発生する。
- さくらのレンタルサーバならできるとの以下の記事がある:さくらレンタルサーバーにRubyをインストールする - ソフラボの技術ブログ (hatenablog.jp)
- 価格・初心者・基本機能&メンテお任せ(Web,Mail,WordPress,DB,File&FTPサーバ)の観点で、VPSは避けたいので、他の独自Rubyインストール可能レンタルサーバを試してみる。
- 現時点ではスターサーバーを試してみる(安さと2週間のお試しがあるから)
.htaccess
Options -Indexes
#Options +Indexes
Options +ExecCGI
AddType application/x-httpd-cgi .cgi .rb .pm
AddHandler cgi-script cgi rb pm
DirectoryIndex index.rb
index.rb
#!/usr/local/bin/ruby
# ヘッダー情報、テキストファイルを指定
print "Content-Type: text/plain\n\n"
# 改行ありで表示される
puts 'Hello World! from Ruby.'
# 末尾の改行は表示されない
puts "\n"
https://(独自ドメイン).com/
→ Hello World! from Ruby.
Ubuntu 22.04 SatbeDiffusion & WebUI インストール
以下の2問題発生:
AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
RuntimeError: "LayerNormKernelImpl" not implemented for 'Half'
以下で回避
~/stable-diffusion-webui$ ./webui.sh --skip-torch-cuda-test --precision full --no-half
取り合えず動くが、殆ど使い物にならず。GPUとアクセラレータ周りをかいkじぇつしないと、十分なパフォーマンスは得られないらしい。
Ubuntu22.04 Ruby 3.2.1をインストール& rbenv installがopensslで失敗するエラー回避
Installing openssl-1.1.1t...
BUILD FAILED (Ubuntu 22.04 using ruby-build 20230309-1-gf3c1ccc)
Inspect or clean up the working tree at /tmp/ruby-build.20230321120259.6287.codqt3
Results logged to /tmp/ruby-build.20230321120259.6287.log
Last 10 log lines:
*** issue on GitHub <https://github.com/openssl/openssl/issues> ***
*** and include the output from the following command: ***
*** ***
*** perl configdata.pm --dump ***
*** ***
*** (If you are new to OpenSSL, you might want to consult the ***
*** 'Troubleshooting' section in the INSTALL file first) ***
*** ***
**********************************************************************
WOL :Ubuntu 22.04 Wake on Lan
ehotool でWake on Lanの状態を確認するのですが、確認にはイーサネットアダプタのデバイス名が必要になります。デバイス名がわからない場合は以下のコマンドで確認することができます。
$ ip link
デバイス名を確認したら、以下のコマンドでネットワークデバイスの状態を確認します。
$ sudo ethtool <デバイス名> | grep -i wake-on
Supports Wake-on: pumbg
Wake-on: d
上記のように「Wake-on: d」の場合は、Wake on Lanが無効化されています。有効化されていれば「Wake-on: g」となります。
Wake on Lanの有効化
Wake on Lanを有効化するには以下のコマンドを使用します。
$ sudo ehitool -s <デバイス名> wol g
このコマンドによる設定は、パソコンを再起動すると無効になってしまいます。
1度だけWake on Lanでパソコンを起動するにはこれでいいのですが、通常は常にWake on Lanでパソコンを起動できる状態にしておきたいと思います。
その場合は、NetworkManagerの制御により永続的に有効化させることができます。
まず、有線接続の名前を確認します。
$ nmcli con show
NAME UUID TYPE DEVICE
<有線接続名> xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ethernet <デバイス名>
現在の設定を確認します。
$ nmcli c show "<有線接続名>" | grep -i wake-on-lan
802-3-ethernet.wake-on-lan: default
802-3-ethernet.wake-on-lan-password: --
「802-3-ethernet.wake-on-lan: default」であればWake on Lanは無効化されています。有効化されている場合は「802-3-ethernet.wake-on-lan: magic」となります。
Wake on Lanを永続的に有効化します。
$ nmcli c modify "<有線接続名>" 802-3-ethernet.wake-on-lan magic
設定を反映させるために以下のコマンドを使用します。
$ nmcli c up <有線接続名>
これで設定が反映されました。
設定を確認します。
$ sudo ethtool <デバイス名> | grep -i wake-on
Supports Wake-on: pumbg
Wake-on: g
「Wake-on: g」で有効化されています。
こちらも確認。
$ nmcli c show "<有線接続名>" | grep -i wake-on-lan
802-3-ethernet.wake-on-lan: magic
802-3-ethernet.wake-on-lan-password: --
「802-3-ethernet.wake-on-lan: magic」なのでWake on Lanが有効化されています。
Wake on Lanによる起動の確認
以上で設定は完了してますが、一度 Wake on Lan により起動できることを確認しておくことをおすすめします。
MACアドレスの確認
Wake on Lan を実行するには、起動されるパソコンのMACアドレスが必要になります。MACアドレスは以下のコマンドで確認することができます。
$ ip addr
link/etherの「XX:XX:XX:XX:XX:XX」がMACアドレスです。忘れないようにメモなどに控えておくとよいと思います。
Wake on Lanでリモート起動
起動するパソコンのWake on Lan用のソフトウェアを使用します。CUIで操作するものや、GUIに対応しグラフィカルに操作できるものなど、さまざまなソフトウェアがありますので、好みのものを使用して下さい。ここでは、Linux用の wakeonlan を使用したいと思います。
以下のコマンドで wakeonlan パッケージをインストールします。
$ sudo apt install wakeonlan
wakeonlan は引数に起動されるパソコンのMACアドレスを指定することで使用します。先程確認したMACアドレスを使います。
$ wakeonlan XX:XX:XX:XX:XX:XX
これで起動されるパソコンの電源がオンになれば成功です。1回で起動されない場合は、何度かリトライして下さい。
それでも起動されない場合は、起動されるパソコンの設定や起動するソフトウェアの設定を確認して下さい。
ubuntu 22.04 server install xrdp xface4
Installing Desktop Environment
Ubuntu Server does not have any installed Desktop Environment by default. So you will need to add a desktop environment to the system. We will install a lightweight desktop environment that will act as a backend for Xrdp here we will install Xfce, It is one of the fast, most stable, and lightweight desktop environments, which makes it ideal for usage on a remote server.
Run the following commands to install Xfce on the server:
$ sudo apt update
$ sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils
Installing Xrdp
Execute the following commands to install Xrdp:
$ sudo apt install xrdp
To check the status execute the following command:
$ sudo systemctl status xrdp
The output will look something like this:
To add a user execute the following command:
Note: Please keep the password and it will be required to log in to the remote desktop.
$ sudo adduser linuxinfo
Configuring Xrdp
During installation xrdp user has been added to the system and the xrdp session uses a certificate key file “/etc/ssl/private/ssl-cert-snakeoil.key”.
Execute the following command to add the xrdp user to the “ssl-cert” group with the following command:
$ sudo usermod -a -G ssl-cert xrdp
Please follow the below command to resolve the black screen issue in the background screen. If you are not facing this issue you can ignore these steps.
$ sudo vim /etc/xrdp/startwm.sh
Add below lines as shown in the picture.
unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
Save and restart the service.
Execute the following command to restart the service.
$ sudo systemctl restart xrdp
Configuring Firewall for Xrdp
By default, Xrdp listens on port 3389 and needs to add a rule that will enable traffic on the Xrdp port.
To allow access to the Xrdp server from a specific IP address or IP range,
Execute the following command if your IP range is x.x.x.x/24
$ sudo ufw allow from x.x.x.x/24 to any port 3389
If you are using AWS cloud, you must add an inbound rule for the same.
If you want to allow access from anywhere (which is not a good practice for security reasons) run:
$ sudo ufw allow 3389
Connecting to the Xrdp Server
Now Xrdp has been set up and time to connect to the server. For the windows system open “Remote Desktop Connection”. Below window will appear, put the IP of Xrdp server and click on connect.
Next Login details will ask.
Click On OK and below window will appear.