Ubuntu 20.04 SERVER 休眠問題

前言:

2020年4月份UBUNTU推出了20.04,在最近安裝完成之後發現了一些問題?

發生問題:

最近安裝了20.04之後發現他會自己休眠。

執行關閉休眠:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

結論:

不知道為什麼UBUNTU會預設的進入休眠,打完又收工了。

升級UBUNTU 20.04 從18.04或19.10

今天我們要 2020年4/23 ,是UBUNTU推出的日子

4/23日正式推出的UBUNTU 20.04

先升級到最近的狀態:

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade

移除已經無用的套件:

sudo apt autoremove

升級自 UBUNTU 19.10

檢查是否有新的發行版本:

sudo do-release-upgrade

會出現沒有發行版本

19.10是一般版本需變更為ubuntu 20.04 LTS 版本

vi /etc/update-manager/release-upgrades

變更為 lts ,系統將會更新為LTS 的發行版本。

執行強制升級版本:

sudo do-release-upgrade -d

確認要升級 ubuntu 20.04 LTS:

接下來安裝升級需要數個鐘頭:

推算及升級時間:


Acer SF514-51-EJ 電池

最近筆記型電腦的電池壞了,

所以在網路上找到了筆電的型號和使用的電池,這個是宏碁的筆電的規格

Acer Ap15O5L 3芯原廠電池

Calendar set

That’s how I made it work

$message->from($companyEmail, ”);
$message->replyTo($companyEmail, ‘Email Agent Evmeetings’);
$message->to($to, ”)->subject($subject);
$message->setBody($calendar_invitation, ‘text/calendar; charset=”utf-8″; method=REQUEST’);
$message->addPart($body, “text/html”);
Added the calendar in body and changed the mime type to ‘text/calendar; charset=”utf-8″; method=REQUEST’

and used addPart($body, “text/html”); method to add html body in the email.

Full code:

    \Mail::send('emailTemplates.dummy', ['emailBody'=>$row->body],  function(Message $message) use ($to,$subject,$attachments,$cc, $body, $calendar_invitation, $companyEmail,$replyTo)
    {
        $message->from($companyEmail, trim(env("email_agent_name")));
        $message->replyTo($replyTo, trim(env("email_agent_email")));
        $message->to($to, '')->subject($subject);
        $message->setBody($calendar_invitation, 'text/calendar; charset="utf-8"; method=REQUEST');
        $message->addPart($body, "text/html");

        $attachments = unserialize($attachments);
        foreach($attachments as $attachment){
            if(file_exists(public_path()."/".$attachment['location'])){

                $message->attach(public_path()."/".$attachment['location'], array('as'=>$attachment['name'].".".pathinfo(parse_url($attachment['location'])['path'], PATHINFO_EXTENSION),
                    'mime' => mime_content_type ( public_path()."/".$attachment['location']) ));
            }
        }
        $cc = unserialize($cc);
        foreach($cc as $anotherEmail){
            $message->cc($anotherEmail);
        }
    });

原文來源

ubuntu 19.10 安裝Scratch 2

之前有裝過SCRATCH 2在18.04.但是在19.10中好像這個元件不見了.

Scratch 2 安裝在18.04

libgnome-keyring/libgnome-keyring0_

所以把他補上就可以正常的運作了.

wget http://mirrors.kernel.org/ubuntu/pool/universe/libg/libgnome-keyring/libgnome-keyring0_3.12.0-1build1_amd64.deb
mkdir tmp
dpkg-deb -R libgnome-keyring0_.deb tmp/ sudo mv tmp/usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0 /usr/lib/x86_64-linux-gnu/
rm -rf tmp