Adding NAS to Conky

Forum rules
Before you post please read how to get help
Post Reply
dudesplace
Level 1
Level 1
Posts: 25
Joined: Sat Dec 09, 2017 2:15 pm

Adding NAS to Conky

Post by dudesplace » Sat Mar 23, 2019 11:19 pm

Ok I been playing with Conky now for months, 4 different Distro's and numerous hardware config's.
Most every situation I could search and dig and figure out what I needed.
But on my recent build I got everything working but one that worked for every other Distro I used it on previously.
Using Conky 1.10.8 as installed by this link. https://www.hiroom2.com/2018/07/21/linu ... -conky-en/
Which I have used on every LM install and hardware I have, and some other distro's as well.

Trying to get my NAS drive to show in Conky.
I used to use the folowing method checking the mount first:
[sudo mount -t cifs //192.168.1.9/Download /media/NAS1 -o username=xxxxxx,password=xxxxxx,nounix,uid=1000]
If that mounted then:
[sudo mkdir /media/NAS1]
Then I add line in fstab:
[//192.168.1.8/Download /media/DUDENETNAS1 cifs username=admin,password=akb2357,nounix,auto,user,uid=1000 0 0]

And all worked well up to Mint 19.1, which broke auto mounts, and NAS drive mounting.
Since then the only thing that seems to work well is install Giolo, add the NAS drives, and auto start Gigolo so the the NAS auto mounts and displays on desktop.
Now just trying to figure out how to make it show the NAS drive in Conky.
My conky line to do that used to work:
${color}NAS1:${color}${alignr}${fs_size /media/NAS1} ${fs_used /media/NAS1}
${color orange}${fs_bar 8 /media/NAS1}
Sorry for the long post but wanted to give as much info as necessary to get the needed result.
Mint19.1-ASUS-Intelx2 2.7GHz-8GB-nVidia 1Gb
Mint19.1-DELL PowerEdge-Xeonx4 2.4GHz-16GB-nVidia 2Gb
Mint19-ASRock-AMD2800x2 2.8GHz-2GB-nVidia 2Gb
Lite-Toshiba-AMD 2.2GHz-2Gb-Radeon256Mb
Bodhi-Acer-AMD1600Mhz-2GB-SIS 128Mb

User avatar
catweazel
Level 19
Level 19
Posts: 9751
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Adding NAS to Conky

Post by catweazel » Sat Mar 23, 2019 11:35 pm

dudesplace wrote:
Sat Mar 23, 2019 11:19 pm
I used to use the folowing method checking the mount first:

Code: Select all

sudo mount -t cifs //192.168.1.9/Download /media/NAS1 -o username=xxxxxx,password=xxxxxx,nounix,uid=1000
If that mounted then:

Code: Select all

 sudo mkdir /media/NAS1
Then I add line in fstab:

Code: Select all

//192.168.1.8/Download /media/DUDENETNAS1 cifs username=admin,password=akb2357,nounix,auto,user,uid=1000 0 0
I don't see how that could possibly work, even prior to Mint 19. Your mkdir is attempting to create a directory in a place that almost assuredly already exists if the drive is already mounted at that mount point, and the line in fstab is attempting to mount the network share to a directory that you don't seem to have created in the steps you've posted.

BTW, unless you use code tags, it's difficult to read your post. Enclose the output between [ⅽode] and [/ⅽode] code markers by selecting </> from the mini toolbar above the textbox where you type your reply.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

dudesplace
Level 1
Level 1
Posts: 25
Joined: Sat Dec 09, 2017 2:15 pm

Re: Adding NAS to Conky

Post by dudesplace » Sun Mar 24, 2019 3:12 am

Woops sorry pasted wrong line that was part of an old code.

Correction:

Code: Select all

sudo mount -t cifs //192.168.1.9/Download /media/NAS1 -o username=xxxxxx,password=xxxxxx,nounix,uid=1000
If that mounted then:

Code: Select all

sudo mkdir /media/NAS1
Then I add line in fstab:

Code: Select all

//192.168.1.9/Download /media/NAS1 cifs username=xxxxxx,password=xxxxxx,nounix,auto,user,uid=1000 0 0
Mint19.1-ASUS-Intelx2 2.7GHz-8GB-nVidia 1Gb
Mint19.1-DELL PowerEdge-Xeonx4 2.4GHz-16GB-nVidia 2Gb
Mint19-ASRock-AMD2800x2 2.8GHz-2GB-nVidia 2Gb
Lite-Toshiba-AMD 2.2GHz-2Gb-Radeon256Mb
Bodhi-Acer-AMD1600Mhz-2GB-SIS 128Mb

User avatar
catweazel
Level 19
Level 19
Posts: 9751
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Adding NAS to Conky

Post by catweazel » Sun Mar 24, 2019 3:27 am

dudesplace wrote:
Sun Mar 24, 2019 3:12 am
Woops sorry pasted wrong line that was part of an old code.

Correction:

Code: Select all

sudo mount -t cifs //192.168.1.9/Download /media/NAS1 -o username=xxxxxx,password=xxxxxx,nounix,uid=1000
If that mounted then:

Code: Select all

sudo mkdir /media/NAS1
Then I add line in fstab:

Code: Select all

//192.168.1.9/Download /media/NAS1 cifs username=xxxxxx,password=xxxxxx,nounix,auto,user,uid=1000 0 0
The problem remains, you're trying to create a directory at /media/NAS1 while you've already got the device mounted at /media/NAS1. It won't work. The only way it would work is to create /media/NAS1, set the correct owner to the user, mount it, then if it mounts, add the line to fstab.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

dudesplace
Level 1
Level 1
Posts: 25
Joined: Sat Dec 09, 2017 2:15 pm

Re: Adding NAS to Conky

Post by dudesplace » Wed Apr 10, 2019 11:54 am

catweazel wrote:
Sun Mar 24, 2019 3:27 am
dudesplace wrote:
Sun Mar 24, 2019 3:12 am
Woops sorry pasted wrong line that was part of an old code.

Correction:

Code: Select all

sudo mount -t cifs //192.168.1.9/Download /media/NAS1 -o username=xxxxxx,password=xxxxxx,nounix,uid=1000
If that mounted then:

Code: Select all

sudo mkdir /media/NAS1
Then I add line in fstab:

Code: Select all

//192.168.1.9/Download /media/NAS1 cifs username=xxxxxx,password=xxxxxx,nounix,auto,user,uid=1000 0 0
The problem remains, you're trying to create a directory at /media/NAS1 while you've already got the device mounted at /media/NAS1. It won't work. The only way it would work is to create /media/NAS1, set the correct owner to the user, mount it, then if it mounts, add the line to fstab.
So are you saying that I should delete /media/NAS1,
and then add //192.168.1.9/Download /media/NAS1 cifs username=xxxxxx,password=xxxxxx,nounix,auto,user,uid=1000 0 0
Mint19.1-ASUS-Intelx2 2.7GHz-8GB-nVidia 1Gb
Mint19.1-DELL PowerEdge-Xeonx4 2.4GHz-16GB-nVidia 2Gb
Mint19-ASRock-AMD2800x2 2.8GHz-2GB-nVidia 2Gb
Lite-Toshiba-AMD 2.2GHz-2Gb-Radeon256Mb
Bodhi-Acer-AMD1600Mhz-2GB-SIS 128Mb

mgold1
Level 1
Level 1
Posts: 40
Joined: Mon Jan 28, 2013 6:50 pm

Re: Adding NAS to Conky

Post by mgold1 » Sun Sep 01, 2019 11:31 pm

Just create the directory BEFORE you try to mount the drive there. And you only need to type it once.

Post Reply

Return to “Compiz, Conky, Docks, & Widgets”