Page 1 of 1

QNAP – How to set the VNC Password for Linux Station

QNAP – How to set the VNC Password for Linux Station
   49

For modern and more powerful QNAP devices, you can now run a complete Linux environment on your NAS. In this case by using Linux Station which basically runs a Ubuntu variant.

Since Linux Station is not really running as a virtual machine, it runs pretty fast. You can even hookup a HDMI monitor and a USB mouse and Keyboard to your QNAP and use it as a workstation. But most of us do not use their QNAP that way. Instead you can access Linux Station through their webbrowser, or … VNC.

VNC access comes with a challenge though. What the heck is the password? No matter what you do in the remote desktop settings, the password is fully ignored.

In this short article I’ll show you how to set a password – albeit in a not so conventional way.




Get started with Linux Station

Obviously this article is not about how to start Linux Station, but I’ll give you the quick steps.

  1. Make sure your QNAP model supports Linux Station!
    If you have an older or lower powered QNAP, like with an ARM or Atom based CPU, then you can forget about this option – Linux Station is not supported on your QNAP. Sorry.
  2. Install Linux Station on your QNAP.
    Open the “App Center” and find “Linux Station“. Click “Install” to add it to your QNAP. It’s free!
  3. Install Ubuntu on your Linux Station.
    Open the “Linux Station” app and select “Install Ubuntu 16.04 add-on from Linux Containers website“.
    At the time that I’m writing this you can get Ubuntu 14.04, Ubuntu 16.04 and Ubuntu Kylin 16.04 (Chinese Ubuntu).
    Obviously this may change in the future.

 

OK give it a whirl. To not have to drag a monitor, mouse and keyboard to your QNAP, you can use the remote desktop feature which runs in your browser. In essence this is simply VNC. In the screenshot below: check the “Enable Remote Desktop” option. Just below that you will see the link that will open the remote desktop in your browser.

QNAP - Linux Station

QNAP – Linux Station

I want to use VNC!

So, what bothered me about the browser approach is that it’s slow. OK for a few clicks, but not OK if you want to do more.
Also, the link only seems to work when you’re actually logged into the QNAP web-interface. Not practical for quick access.

In essence this is all based on VNC (the remote access) so why not use a regular (faster) VNC client?

It took some effort to find out what the password was. I have seen several posts pointing to methods that no longer seem to work, and then I noticed that there is a well hidden file with the password. To access Terminal, first click the link in the lower right corner that says “Please use the following URL“, so you can access Ubuntu.

After that you can work in Linux Station through your browser, there you can open a Terminal window and execute the following:


sudo more /tmp/.qnap/vncpassword

It will show the password needed to connect with VNC – give it a try. I used MacOS ScreenSharing but feel free to use any VNC client.

What is the IP address of Linux Station? 

The IP address can be seen in Linux Station, see screenshot above, just under the bold blue words “Remote connection“.

Awesome that worked!
Ehm … not entirely … there are 2 major problems with this password;

  1. It one of those goofy random passwords that nobody can remember.
  2. After restarting Linux Station or the Ubuntu you’re running, the password changes.

The first one I can deal with the second one … yikes!

Set your own VNC Password for Linux Station

Well, it seems that Linux Station, or maybe more correct the Ubuntu setup, is generating a random password each time it starts for VNC access.

With the following steps we can make that our own – all these steps are done in a terminal window in Linux Station!

Create a service that creates (overwrites) the vncpassword file for us.

By the best of my knowledge, this is the correct way to do this, although I can imagine there are better ways. Hopefully QNAP changes this in the future to something we can manage from Linux Station or in Ubuntu.

The file we are going to create is: /etc/systemd/user/setmyvncpassword.service

We start this by executing the following in terminal:


sudo nano /etc/systemd/user/setmyvncpassword.service

Tip: A user, Yew Kay, reporting this to being the “new” path. As I have not tested this, no guarantees this will work, but I thought I’d mention it here anyway.


/share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/lxc/ubuntu_1804/rootfs/tmp/.qnap/vncpasswordchange.service

This will open nano, a pretty easy to use text editor. Feel free to use any other plain text editor like “vi” etc.
Since we execute this as administrator (sudo), you will be asked for the admin password. I found (on my QNAP anyway) that this is the same password as for the admin of my QNAP.

The content of this file:


1
2
3
4
5
6
7
8
9
10
11
[Unit]
Description=set my password for vnc
Before=x11vnc.service
[Service]
ExecStartPre=/bin/mkdir -m 0700 -p /tmp/.qnap
ExecStartPre=/bin/bash -c "echo MYPASSWORD > /tmp/.qnap/vncpassword"
ExecStart=/bin/true
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

Note that you’d want to change “MYPASSWORD” to your own password of course.
You should probably not use the same password as the one you use for the login on your QNAP.

OK, if you worked with nano, then close it by pressing CTRL+X, answer the question by pressing the “Y” key, and press ENTER for the filename.

The next steps are to make sure this new “service” is being activated, and actually will fire at boot time;


sudo systemctl enable /etc/systemd/user/setmyvncpassword.service

Again, this may require you to enter the sudo password again.

Now it’s time to restart Linux Station. I tried the command-line approach (shutdown -r now) but that comes with strange results.
Instead I found clicking the “Restart” button in Linux Station to work just as well.

Once you have restarted Linux Station, verify that the file /tmp/.qnap/vncpassword indeed holds your password as content.

If all went well, you should now always be able to get into your Linux Station, straight from VNC without the need to login to your QNAP.

Black Screen with VNC 

Since one of the recent updates of QTS, VNC turns or starts black when you have used the web-interface to access Ubuntu. By using the web-interface, the screen gets blanked (no matter what you try, and you cannot “wake up” the screen either).

To avoid or fix this:
1) Disable Ubuntu (in Linux Station).
2) Enable Ubuntu (in Linux Station).
3) Make sure “Enable Remote Desktop” is checked.
4) Start your VNC Viewer.

DO NOT click the link show behind “Please use the following URL“.
If you do, the screen will get blanked again – follow the 4 steps above again to disable this “feature”.

 

Support Us ...


Your support is very much appreciated, and can be as easy as sharing a link to my website with others, or on social media.

Support can also be done by sponsoring me, and even that can be free (e.g. shop at Amazon).
Any funds received from your support will be used for web-hosting expenses, project hardware and software, coffee, etc.

Thank you very much for those that have shown support already!
It's truly amazing to see that folks like my articles and small applications.

Please note that clicking affiliate links, like the ones from Amazon, may result in a small commission for us - which we highly appreciate as well.

Comments


There are 49 comments. You can read them below.
You can post your own comments by using the form below, or reply to existing comments by using the "Reply" button.

  • Jan 26, 2018 - 2:37 AM - Piotr Comment Link

    Thank you, finally real and simple solution!!

    Reply

    Piotr

    • Feb 16, 2018 - 10:18 AM - hans - Author: Comment Link

      Awesome! Glad it worked for you as well.
      I hope QNAP will implement this in their web interface soon though … 

      Reply

      hans

  • Feb 28, 2018 - 9:56 AM - Joe Comment Link

    Hi thanks for this tuto.

    I can’t tested yet because the option remote connection is grey so I can’t enable it …

    Did you know why ? I succeed the first time and I was disconnect because a timeout. So then when I connect again the option was disable and impossible to enable it again.

    Thank you

    Reply

    Joe

    • Mar 3, 2018 - 5:28 AM - hans - Author: Comment Link

      Hi Joe,

      mine remains grey in the first few second when opening the page in the QNAP web interface.
      If the “virtual” machine is not running it will remain grey as well. In that case you will have to click “enable” or “restart” and wait a few seconds.

      Hope this helps.

      Reply

      hans

  • May 13, 2018 - 1:38 PM - Andy Comment Link

    Maybe an odd question – but how do you access the terminal if you can’t login to start with. Have I missed a step?

    Thanks

    Reply

    Andy

    • May 14, 2018 - 5:23 AM - hans - Author: Comment Link

      Hi Andy,

      not really an odd question – good catch! 

      In figure 1 you’ll see a link in the lower right corner, which would open remote access through your webbrowser. This is where you can then open terminal and do the changes.
      just below the figure I wrote “When working in Linux Station, whichever Ubuntu version, open a Terminal window and execute the following”, but I admit this could have been made a little more clear. I’ll update the text right away! 

      Thanks!

      Reply

      hans

      • Jul 11, 2020 - 9:35 PM - EricHe Comment Link

        Hi,

        For the first time i open the link in the lower right corner of figure 1, i was able to open remote access through my webbrowser.

        But , what’s the user name and password?  I was not able to login to start. Random access password?

        Without login to Ubuntu system, does it mean i will never be able to open one Terminal window?

        Reply

        EricHe

        • Jul 12, 2020 - 6:33 AM - Hans - Author: Comment Link

          Hi Eriche!

          I’m not sure what you asking – my apologies for that.
          VNC only uses a password, and no username.
          If you mean the Ubuntu login, then this would be your usual user login (username/password).

          A terminal window you could possibly open with SSH.

          Having said all that: QNAP has been tinkering with all this in the past years, so some of the information may no longer be relevant.

          Reply

          Hans

  • May 26, 2018 - 4:18 AM - Andrea Comment Link

    Hi,

    my Linux Station has a weird behavior: I am able to access it through a VNC client but i am able to see the desktop if and only if the Remote Desktop Webpage is open, otherwise the VNC clients connects but shows just a black window. Do you have any clue on what could cause this behavior?

    Thanks!

    Reply

    Andrea

    • May 27, 2018 - 9:13 AM - hans - Author: Comment Link

      Hi Andrea,

      I have not encountered this “effect” yet and honestly would not know what would cause this – unless your VNC client is not passing keyboard and mouse signals.
      Maybe give another VNC client a try?

      Reply

      hans

    • Jun 28, 2018 - 10:12 AM - hans - Author: Comment Link

      OK, I just updated my QTS and I now have the same weird effect. 
      Looking into it and even started a conversation with QNAP about this issue.

      Reply

      hans

    • Jun 28, 2018 - 10:35 AM - hans - Author: Comment Link

      OK, so I did some playing with all the settings and I seem to have to working, following these steps, of which I’m not sure if all of them are required.

      One time: Disable screen locking / screen saver in Ubuntu. (In Ubuntu: System Settings – Brightness & Lock: set “Turn screen off when inactive for” to “Never”, and make sure “Lock” is set to “OFF”).

      After that, I closed the browser window that is showing the Ubuntu desktop, disabled “Remote desktop” en re-enabled it again in “Linux Station”. After that I restarted Ubuntu in Linux Station, but DO NOT click the link provided in the “Linux Station” window in your QNAP user interface.
      Instead I open my VNC viewer right away and things seem to be working. No more black screen.

      I tested this a few times, and for now my procedure is:

      Start my VNC viewer right away and assume Ubuntu is running in Linux Station.

      If this fails: open Linux Station and make sure I see “Status : Enabled” (right under the Ubuntu logo, above the “Disable – Restart – Reinstall” buttons).

      If status is “Status : Enabled” but you still do not get connected (verify IP address) click “Restart“.
      If status is “Status : Disabled” click “Enable“.

      In both cases give it a few seconds to give it a chance to boot Ubuntu.

      I have repeatedly tested this and it seem to be working reliable for me. Hope it works for you as well.

      Reply

      hans

  • Jul 21, 2018 - 11:49 PM - mankann Comment Link

    Thank you for this excellent, helpful and well written guide! 

    Reply

    mankann

    • Jul 30, 2018 - 4:46 AM - hans - Author: Comment Link

      Thank you Mankann for taking the time to post a thank-you note!
      Very motivating! 

      Reply

      hans

  • Jul 27, 2018 - 6:04 AM - Kamal Singh Comment Link

    Hi After following the above step I can see the password of my choice is stored but i still get the error of password incorrect when i try connecting through VNC client, please help. My qnap is tvs 1282.

    Reply

    Kamal Singh

    • Jul 30, 2018 - 5:01 AM - hans - Author: Comment Link

      Hi Kamal,

      did you try these steps?
      For some reason the webbased-VNC screws up the connection, so you’d want to avoid that.
      For the record; I just updated to QTS 4.3.4.0644 and my Linux Station stopped working all together, even re-installing doesn’t seem to work.

      Reply

      hans

      • Jul 30, 2018 - 12:28 PM - Kamal Singh Comment Link

        Hi Hans, 

        Yes i tried all the steps but couldn’t get vnc client connection. The password seems to be changed of my choice but it is not acceptable to vm on Linux station. 

        I hadfew ussues on installing Linux station on ssd so. I installed it on capacity drive first then moved it to ssds. I wanted it to run from ssds dor obvious speed reasons. 

        Reply

        Kamal Singh

        • Aug 8, 2018 - 6:26 AM - hans - Author: Comment Link

          I do not have a cooky cut answer for you, except for going through the steps agin.
          Unfortunately with the lastest Linux Station update, my Ubuntu non longer starts, so I created a VM instead.

          I would recommend reporting this to QNAP Support – it is ridiculous that they have not solved this issue yet or provided an easier way to work with this.

          Reply

          hans

  • Dec 17, 2018 - 8:56 AM - Billy Comment Link

    Hellow, I’ve following your guide line, 

    But there were some service error. it’s cause from Linux version.  I can’t enable setmypassword.service. 

    Output like

     sudo systemctl --root=/ enable /etc/systemd/user/setmyvncpassword.service
    The unit files have no [Install] section. They are not meant to be enabled
    using systemctl.
    Possible reasons for having this kind of units are:
    1) A unit may be statically enabled by being symlinked from another unit's
       .wants/ or .requires/ directory.
    2) A unit's purpose may be to act as a helper for some other unit which has
       a requirement dependency on it.
    3) A unit may be started when needed via activation (socket, path, timer,
       D-Bus, udev, scripted systemctl call, ...).

     

    Reply

    Billy

    • Dec 19, 2018 - 9:55 AM - hans - Author: Comment Link

      Hi Billy,

      I’m nowhere near my QNAP, so I cannot verify what you’re running into.
      In the meanwhile I even gave up using Linux Station, as it became unstable after one of the recent QTS updates (instead I use a Docker for the specific application I’m using).

      I’ll be able to access my QNAP in about a month (I’m traveling), but I can imagine this to be a long wait.
      Alternatively; You can submit a support ticket with QNAP (and refuse remote access by them), maybe they changed something, requiring a new trick or (hopefully) they added setting a VNC password as a standard feature now.

      I’m sorry I could not be of more help … 

      Reply

      hans

      • Dec 19, 2018 - 10:36 PM - Billy Comment Link

        I will try Docker as your recommendation, even I’ve never tried before 

        TThank you for your comment,  

        Reply

        Billy

        • Dec 20, 2018 - 9:52 AM - hans - Author: Comment Link

          You’re welcome Billy!

          As a side note:
          Docker (in my case anyway) seem to be often used for so called headless-setups (ie. there is no regular “screen”, instead there is often a web-interface). I’m definitely not an expert on Docker, it took me quite a bit of reading and testing before I got things working the way I want it. But … I have to admit that once it worked, I’ve been very satisfied with it.

          Reply

          hans

  • Jan 18, 2019 - 9:55 PM - Hussain Comment Link

    Thanks..

    Easy to follow ..

    Finally I find a solution .

    Reply

    Hussain

    • Jan 19, 2019 - 5:32 AM - hans - Author: Comment Link

      Awesome!

      Thanks for posting a Thank-you note – it’s much appreciated! 

      Reply

      hans

  • May 9, 2019 - 6:15 AM - Klaus Comment Link

    Thanks for your instructions. I still didn’t try them because I found no way to get access with different VNC software with the temporally password. I followed all your instructions and get rid of the black screen, but never pass the login screen. In the moment I try to login after have introduced the (admin) password my VNC crashes without any error. 

    I accessed with ssh the syslog and found the following entries:

    May  9 13:06:14 ubuntu_1804 systemd[1]: Started QNAP X event monitor.
    May 9 13:06:14 ubuntu_1804 qnap-x.py[8476]: Got Exception during getting display object.
    May 9 13:06:14 ubuntu_1804 qnap-x.py[8476]: Traceback (most recent call last):
    May 9 13:06:14 ubuntu_1804 qnap-x.py[8476]: File "/usr/bin/qnap-x.py", line 23, in run
    May 9 13:06:14 ubuntu_1804 qnap-x.py[8476]: self.d = Display()
    May 9 13:06:14 ubuntu_1804 qnap-x.py[8476]: File "/usr/lib/python2.7/dist-packages/Xlib/display.py", line 89, in __init__
    May 9 13:06:14 ubuntu_1804 qnap-x.py[8476]: self.display = _BaseDisplay(display)
    May 9 13:06:14 ubuntu_1804 qnap-x.py[8476]: File "/usr/lib/python2.7/dist-packages/Xlib/display.py", line 71, in __init__
    May 9 13:06:14 ubuntu_1804 qnap-x.py[8476]: protocol_display.Display.__init__(self, *args, **keys)
    May 9 13:06:14 ubuntu_1804 qnap-x.py[8476]: File "/usr/lib/python2.7/dist-packages/Xlib/protocol/display.py", line 167, in __init__
    May 9 13:06:14 ubuntu_1804 qnap-x.py[8476]: raise error.DisplayConnectionError(self.display_name, r.reason)
    May 9 13:06:14 ubuntu_1804 qnap-x.py[8476]: DisplayConnectionError: Can't connect to display ":0": No protocol specified
    May 9 13:06:14 ubuntu_1804 systemd[1]: qnap-x.service: Main process exited, code=exited, status=1/FAILURE
    May 9 13:06:14 ubuntu_1804 systemd[1]: qnap-x.service: Failed with result 'exit-code'.
    May 9 13:06:19 ubuntu_1804 systemd[1]: qnap-x.service: Service hold-off time over, scheduling restart.
    May 9 13:06:19 ubuntu_1804 systemd[1]: qnap-x.service: Scheduled restart job, restart counter is at 286.
    May 9 13:06:19 ubuntu_1804 systemd[1]: Stopped QNAP X event monitor.

    I’m no expert, so I’m unable to find a solution. Perhaps anyone could help.

    Thanks in advance.

    Reply

    Klaus

    • May 9, 2019 - 9:46 AM - hans - Author: Comment Link

      Hi Klaus,

      I haven’t used this method in a while, since Linux Station proved quite unstable with all the updates that have come by.

      Anyhoo … back to your question ..

      The error seems to be an issue on the QNAP end. The QNAP VNC server fails to connect to X-Windows display 0 since there is no protocol defined (?).
      I honestly have no idea what to think of that, besides the “… this is why I no longer use Linux Station”. And such a statement is obviously not helpful.

      I did some searching and honestly couldn’t find anything better than this post at StackExchange. It may not be very useful either.

      What is the connection string you’re using to connect? Something like 192.168.1.100:0 (IP NAS = 192.168.1.100, Display = 0)?

      Reply

      hans

      • May 9, 2019 - 11:36 AM - Klaus Comment Link

        Hi Hans:

        Thank you for your reply. 

        I didn’t introduce the display (suppose the default is 0), but just I retried with display 1 with the same result.

        You are right, Linux Station is really unstable. Every second or third try I get “Host is temporally unavailable” or from my NAS

        App Name: Linux Station
        Category: General Operations
        Message: [Linux Station] Failed to enable remote desktop connection. Linux system: Ubuntu 18.04.

        I’m loosing patience. Did you do it with Virtualization Station or what is your solution?

        Reply

        Klaus

      • May 9, 2019 - 12:03 PM - hans - Author: Comment Link

        Hi Klaus!

        Yep, that is exactly the way I experienced it. Uninstall and reinstall made things even worse.
        It’s kinda weird though, when I wrote this article, it was very stable … until I did a QTS update a few months later, and things went downhill from there.
        After several conversations with QNAP support, I just gave up …

        I ended up using a Docker in “Container Station”. It took quite some effort to get it going, and I’m still in the dark about a few things .
        Key is that with a Docker, you’re basically relying on a web interface. So it will not be good for all purposes.
        I just wanted to have an instance of KODI running that updates my MySQL database, and for that it has been very solid.
        It even allows playback of video in your browser (if your QNAP can keep up).

        Note : I did not get KODI to run in “Virtualization Station” because of its graphical/GPU requirements (using Librelec).
        Otherwise everything seems to run just fine (but it seems a little bit slower than the old “Linux Station”).

        Reply

        hans

        • May 9, 2019 - 1:13 PM - Klaus Comment Link

          Hi Hans,

          I tried to get working a container with Calibre and had a lot of difficulties to find out how to configure it. Some things didn’t do what they should and later Container Station GUI stopped working. So I tried to find another way to manage containers. Soon noticed that this is not a simple task and so I thought it would be easier to do it with Linux Station. Now I’m stuck with Linux Station.

          I got working a clone of my Virtual Box Windows 10 in Virtualization Station – loosing my activation because I found no way to change the UID of the clone. A new Win10 pro license (34€) did it. I access it without any difficulties by RDP from my Linux box.

          Just had a look what OS’s are available in VB and found out that Ubuntu 18.04 LTS is not available. It seams Qnap will not make it available and announced Linux Station with Ubuntu 18.04 instead.

          Its a pitty and I’m sorry having bought my NAS at Qnap. Now its done and I should find solutions.

          Reply

          Klaus

        • May 10, 2019 - 3:17 AM - hans - Author: Comment Link

          Hi Klaus,

          first off, don’t be disappointed too much in QNAP. I have had a few other brands and so far QNAP has proven to be the most reliable.
          It is sad that Linux Station is not working well, but I always try to keep in mind that it’s a NAS and not full size server for virtual machines .

          Having said that; they should have done a better job with the virtualization features. Either offer them working well, or do not offer it.
          I think Linux Station’s approach is pretty good – it uses the underlying Linux from the QNAP, which makes it faster than a virtual machine.
          Just some of the choices they’ve made are not all that good.
          I mean, let’s be real; nice that you can work with it (if it works) in a web browser, but I’d really prefer using VNC or something like that.

          I just took a look at the QNAP forum and, as expected, other users are experiencing similar issues.

          I’m not familiar with Calibre, but it seems there is a Docker available for that, see linuxserver.io. I recommend giving it a try.
          QNAP has an intro to Docker, but you may need to find some more info. Amore generic (and sometimes confusing) guide can be found here.
          Like I said; I’m running a headless KODI like this and am very impressed by its speed and stability.

          p.s. since I run Windows 10 Pro as a virtual machine on my Mac, I too had to buy an extra license. I hate the way Microsoft handles licenses, and it looks like you found a similar address for affordable Windows licenses (I’ve had great experiences with Kinguin.net, Win10Pro for €26).

          Reply

          hans

  • May 10, 2019 - 9:52 AM - Klaus Comment Link

    Thanks, Hans, I have just created a ticket. If you’re interested I will inform you.

    Regards, Klaus

    Reply

    Klaus

    • May 10, 2019 - 12:49 PM - hans - Author: Comment Link

      Thanks Klaus!

      Yes please do so! I’d be interested in getting Linux Station to work properly again as well.

      Tip:
      They typically ask you for access to your QNAP.
      I personally really do not like that, so after a bit of asking, the support person finally told me the steps so I can fix things myself. 

      Reply

      hans

  • Jul 31, 2019 - 3:59 PM - Brad Comment Link

    Hans

    After recent updates firmware 4.4.1.0998, things are now truly strange. I have Ubuntu 16 and 18 both installed. Because 18 is so much faster I do prefer it. With either I get the log in screen just fine. With 16 everything works as it is supposed to work. With 18 once I log in, the screen goes blank. The qnap unit is hooked to a TV. So I can see (on the TV) that my mouse and keyboard are functioning properly(through VNC and directly), but I get no screen through the web or VNC.  If I log out of Ubuntu 18, the screen (same VNC session) reappears. My guess is the link that starts the x session has moved (16 was unity(?) based, 18 is gnome(?) based). Any ideas.

    Reply

    Brad

    • Aug 1, 2019 - 7:12 AM - hans - Author: Comment Link

      Hi Brad,

      I’ve found that the implementation by QNAP is done in a crappy way it seems – the concept is great, but I’ve seen it work only once or twice in the past, whit system updates making things worse. So I’m running my VM’s now as a Docker or an actual VM (Linuxstation uses some of the core Linux parts of QTS, which makes it faster … if it would work).

      The window manager under Ubuntu can indeed be a problem, as far as I recall VNC and Unity are not friends, but I simply gave up after trying several times over the past months.

      Reply

      hans

      • Aug 1, 2019 - 7:53 AM - Brad Comment Link

        Hans

        I played with it little more last night. IF I use Gnome (straight stock) it works fine now in both 16 and 18. Unfortunately I use Cinnamon. I cannot seem to figure out how or where Qnap is locating the file (.vnc ?) that does the startx part. It is not in the “standard” home directory of Ubuntu. Until I find it, I am a little cautious about just adding a .vnc file as we do not know what other “custom” things they have put into that file or if it will override whatever they are using. My unit only has a J1900 so I can ill afford to give up much performance. Picked up a Raspberry Pi 4 -4gb this week. MAYBE it is powerful enough to run some stuff without using much extra power.

        If nothing else it has been another learning experience on the goofy stuff Qnap does.

        Thanks

        Brad

        Reply

        Brad

      • Aug 1, 2019 - 11:55 AM - hans - Author: Comment Link

        Hi Brad,

        yeah, I have considered the Raspberry Pi option as well. There is still plenty space in my QNAP, so I could even build it in 
        I did read about Cinnamon being a challenge when it comes to VNC and I do not have a good answer for you. I simply dropped it after spending a lot of time on it.

        QNAP has been very good for me, it’s just something like this that annoys me.
        I’m actually having an argument with my QNAP right now. I have a TVS873, with 8x 4Tb, which I have shutdown during my week in Germany. When I came home and booted it, mysteriously 3 out 8 disks seem to fail for unclear reasons (the error messages are pretty cryptic).

        But, like I said: QNAP has been good to me. My old 8 bay (TS896) is still humming away for about 8 years now without a single glitch (and yes I would have loved a J1900 as well haha – did you upgrade the CPU?).

        Reply

        hans

        • Aug 1, 2019 - 5:20 PM - Brad Comment Link

          Do not get me wrong, I LOVE my nas. I just have a 453pro 4 bay. I like that the J1900 eats so little power, but trying to use it as a desktop and run the NAS is just too much for its little heart.

          I got the DVI adapter today (forgot the monitor was not HDMI, oops). So I got the Pi4 up and running. It has a lot more power than the J1900 but every once in a while it just gets lost for a couple of minutes. The kit I got came with 3 heatsinks but I really think it needs a fourth for the wifi/bluetooth chip. Even with both wifi and bluetooth disabled it(the wifi chip) was warm to the touch. In a 75F room it(cpu) idles (just desktop) at about 60C. Run youtube and one other website(FF) and you are at 70. Definitely going to have to invest in more cooling. Half seriously considering the ice tower (see youtube). Run it without the fan and it is supposed to max out at 70c(?) with the fan it stays at 45(?), but I really hate fans. Problem is that I cannot figure out a case to use with it. No case really is not an option around here. Have a good night and thanks.

          Reply

          Brad

        • Aug 2, 2019 - 5:30 AM - hans - Author: Comment Link

          Oh I love my NAS as well. Over the years I’ve exchanged my TS859Pro for a TS896Pro, got two QNAP’s through work (TS569L and TS213P) and last year I bought a TVS873. I’m very very happy with my QNAP’s and actually impressed by how reliable they are (I’ve had Synology and Thecus NAS devices before that, and couldn’t stand them).

          If I recall correctly, you can over- or underclock your RPi. I’d probably underclock it to keep the temperature down. Depends on your applications of course.
          I hate fans as well, especially now that my temporary house is really small and the NAS actually is in the living room .

          Reply

          hans

  • Aug 1, 2019 - 11:49 PM - Brad Comment Link

    I guess I will have to eat a little crow. The first review of the new Pi4 Flirc case is in(youtube). Looks like it MAXes out at 60C. I just ordered one.

    Reply

    Brad

    • Aug 2, 2019 - 5:43 AM - hans - Author: Comment Link

      Oh I like those! Using the case as a heatsink, and a KODI edition – very nice!
      I’m not sure if I’d want to place this in my QNAP though (which is what my original idea was) 

      Reply

      hans

  • Nov 3, 2019 - 9:27 PM - Yew Kay - Author: Comment Link

    I thought I’ll contribute to this awesome thread. 
    After some recent updates. I’m not sure why one of my QNAP boxes didn’t respond to the “patch” above. 

    I found that vncpassword is no longer located inside /tmp/.qnap in fact it’s empty.
    I found that the new location is at ./share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/lxc/ubuntu_1804/rootfs/tmp/.qnap/vncpasswordchange the service accordingly to reflect the new folder makes this workaround funcational again. 
    hope it helps anyone facing the same issue as me!

    Reply

    Yew Kay

    • Nov 4, 2019 - 3:11 AM - hans - Author: Comment Link

      Hi Yew Kay!

      Thank you very much for this info! 

      I’ll admit that I gave up on using LinuxStation. After a lot of issues, failures and updates breaking LinuxStation, I just gave up and am now using a Raspberry Pi for this purpose haha. I do appreciate the info though and will add it to the article! 

      Reply

      hans

      • Nov 4, 2019 - 7:55 PM - Yew Kay - Author: Comment Link

        I totally agree with you that LinuxStation seem to be some sort of broken implmentation. I am looking at getting one of my old RPis to run Linux and other services.
        For anyone interested and fluent in python, the code generation part of the script is in /usr/lib/qnap-vnc/qvnc/distrobionic/route.py  (for ubuntu 18.04) accessing it from nas SSH will be /share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/lxc/ubuntu_1804/rootfs/usr/lib/qnap-vnc/qvnc/distrobionic/route.py  It’s around line 554 you can actually set the password in this file now instead of running a separate service for anyone interested in this route.
        I’m not entirely adept at python but I think the black screen issue is caused in this script as it checks for screen resolutions and sets it accordingly.  
        For anyone that’s interested in developing something to help us all out. 

        Reply

        Yew Kay

        • Nov 4, 2019 - 8:05 PM - Brad Comment Link

          I really think switching to the Raspberry Pi to replace all the desktop type stuff from the Qnap is the way to go. Every time we get something fixed on the Qnap, they change it again. Beyond the VNC thing, I am back to fighting their network setup overriding everything and forcing the 10. addresses(internally). They have always leaned that way but now it is getting very difficult to bypass their settings. Having to spend 10+ hours fixing stuff every three months is just not worth it. Add a raspberry Pi (or multiple) and just treat the Qnap as a straight NAS. Far less headache.

          Reply

          Brad

        • Nov 5, 2019 - 7:21 AM - hans - Author: Comment Link

          @Yew Kay;

          Thanks for the insight! I’m not a Python developer, and probably never will be one either (looked a few times into it, but just can’t find a Delphi like IDE for it).

          @Brad;

          I’m on the same page. I’m done with wasting tons of time, fixing what is broken on the QNAP (concerning Linux Station).
          I now use an old 1st gen Raspberry Pi, it’s cheap and it works great. Zero issues.

          Reply

          hans

    • Jul 29, 2020 - 4:38 AM - Nagapow Comment Link

      I followed the original guide and found that i didnt have to use the new path mentioned.
      i am on the latest version of Linux station and QTS.
      Just sharing myh experience.. thanks everyone for contributing to this post, solved a major problem for me.

      Reply

      Nagapow

      • Jul 29, 2020 - 5:15 AM - Hans - Author: Comment Link

        Thanks Nagapow for sharing! This is valuable info, especially since I no longer use this on my QNAP 

        Reply

        Hans

  • Nov 27, 2020 - 10:54 AM - Ioda Comment Link

    Hi all

    Update for the latest linux station ubuntu 20.04

    thanks to the “yew kay” post who has show me the way 

    here is my own way : login to the QNAP NAS and launch linux Station, assuming it’s already installed
    1) install linux station ubuntu 20.04
    2) choose network adapter, note your ip address
    2) enable remote desktop
    3) restart if remote desktop just previously enabled
    4) login using remote desktop url
    5) answer the firts launch configuration  questions
    6) Open a terminal
    7) enable ssh like this
    admin@ubuntu2004:~$ sudo apt install ssh
    admin@ubuntu2004:~$ sudo systemctl enable –now ssh
    8) Then login throught putty or any other ssh client that you want
    9) edit the file route.py
    admin@ubuntu2004:~$ sudo vi /usr/lib/qnap-vnc/server/route.py
    10) modify the _setup_vnc_passwd method in it, comment line 561 and add a modified one
     561             #cmd = “openssl rand -base64 8 > /tmp/.qnap/vncpassword”
     562             cmd = “echo whateveryouwant > /tmp/.qnap/vncpassword”
    11) remember the password you set (in this sample “whateveryouwant”) of course especially if you have not setup ssh
    12) save and exit your ssh client
    13) click restart in ubuntu linux station and wait for the remote desktop url to appears

    now you should be abble to connect to the ubuntu server with ultravnc viewer (or any other X client) using Ip address of your ubuntu linux station (see point 2) address and enterring the password you have set in the route.py file.

    You could as well always still connect with the desktop linux station shortcut but be aware that it will be the same desktop !
    Enjoy

    Regards

    Reply

    Ioda

    • Nov 27, 2020 - 3:46 PM - Hans - Author: Comment Link

      Thanks for posting Ioda!

      I’ll consider giving that a try – I had given up on Linux Station a long time ago. But I see there may some improvements.

      Thanks again for the guide – Excellent! 

      Reply

      Hans



Your Comment …

Do not post large files here (like source codes, log files or config files). Please use the Forum for that purpose.

Please share:
*
*
Notify me about new comments (email).
       You can also use your RSS reader to track comments.


Tweaking4All uses the free Gravatar service for Avatar display.