SETfan Posted April 9, 2020 Share Posted April 9, 2020 Hi any Ubuntu people out there! I just bought a cheap Celeron Nuc to try the Tidal offer through Chrome. Ubuntu is completely new to me but I think I have managed to install Tightvnc on the Nuc but am a bit stuck on how to connect to my desktop securely? I am figuring I can install VNC viewer on my Windows desktop, but am at a bit of a loss as to the how to connect securely from the Ubuntu nuc?? This could possibly be more complex than I expect, but thought I would ask here in case it is not too difficult to solve!! Cheers for any Ubuntu help Link to comment Share on other sites More sharing options...
stereo coffee Posted April 9, 2020 Share Posted April 9, 2020 (edited) Hi For those unsure of the terminology SETfan is using, NUC stands for Next Unit of computing https://en.wikipedia.org/wiki/Next_Unit_of_Computing. Always good to slowly explain acronym terms in forums, as not everyone like me, is up to speed with all the terms. https://en.wikipedia.org/wiki/Acronym#All-caps_style Linux Mint https://www.linuxmint.com/ a operating system that adapts from Ubuntu has been offering this style of computing beginning at the mintbox 1 , but now up to edition 3 https://blog.linuxmint.com/?p=3875 The question about VNC ( Virtual network computing ) might be better achieved with accessing your software manager on ubuntu and downloading Virtual box which enables two operating systems to be used concurrently https://www.virtualbox.org/wiki/Linux_Downloads , you are then not constrained by one set of software having proprietary restrictions, interfacing with another. Another option is to use what is called Wine in Linux that enables exe files to be read. The emphasis being to adapt to Linux as your main base for computing , rather than looking back to awkwardly adapt using regressive proprietary types of software. Edited April 9, 2020 by stereo coffee Link to comment Share on other sites More sharing options...
Guest rmpfyf Posted April 9, 2020 Share Posted April 9, 2020 16 hours ago, SETfan said: Hi any Ubuntu people out there! I just bought a cheap Celeron Nuc to try the Tidal offer through Chrome. Ubuntu is completely new to me but I think I have managed to install Tightvnc on the Nuc but am a bit stuck on how to connect to my desktop securely? I am figuring I can install VNC viewer on my Windows desktop, but am at a bit of a loss as to the how to connect securely from the Ubuntu nuc?? This could possibly be more complex than I expect, but thought I would ask here in case it is not too difficult to solve!! Cheers for any Ubuntu help Where exactly are you stumped? Have had this working fine for years. Link to comment Share on other sites More sharing options...
aussievintage Posted April 9, 2020 Share Posted April 9, 2020 (edited) 17 hours ago, SETfan said: Hi any Ubuntu people out there! I just bought a cheap Celeron Nuc to try the Tidal offer through Chrome. Ubuntu is completely new to me but I think I have managed to install Tightvnc on the Nuc but am a bit stuck on how to connect to my desktop securely? I am figuring I can install VNC viewer on my Windows desktop, but am at a bit of a loss as to the how to connect securely from the Ubuntu nuc?? This could possibly be more complex than I expect, but thought I would ask here in case it is not too difficult to solve!! Cheers for any Ubuntu help Please clarify what you are trying to do. You say you installed tightvnc. Was it the server you installed or just the viewer? You say from the Ubuntu nuc, but only have a viewer on the PC. With a viewer you can connect to another machine, e.g. to the Ubuntu nuc desktop, from the Windows PC viewer. If you want to do it the other way around, you will need a VNC server on your windows PC. Edited April 9, 2020 by aussievintage Link to comment Share on other sites More sharing options...
SETfan Posted April 9, 2020 Author Share Posted April 9, 2020 Thanks guys! I have installed TightVNC server on the NUC with Ubuntu on it. Trying to following some online instructions I found, when I get to this point I get stuck: Configuring the Desktop Environment to be Launched by VNC The next step is to configure what gets started up when the VNC server is launched. As outlined previously the first time a user starts vncserver the .vnc directory is created in their home directory. Change directory to $HOME/.vnc and load the xstartup file into an editor. It should appear as follows: #!/bin/sh # Uncomment the following two lines for normal desktop: # unset SESSION_MANAGER # exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & twm & However, when I type in HOME/.vnc, I get a "No such file or directory" message - see my screenshots from my NUC Ubuntu terminal below: nuc@nuc-desktop:~$ vncserver New 'X' desktop is nuc-desktop:1 Starting applications specified in /home/nuc/.vnc/xstartup Log file is /home/nuc/.vnc/nuc-desktop:1.log nuc@nuc-desktop:~$ vncserver -kill :1 Killing Xtightvnc process ID 2093 nuc@nuc-desktop:~$ HOME/.vnc bash: HOME/.vnc: No such file or directory nuc@nuc-desktop:~$ Any help greatly appreciated!! Link to comment Share on other sites More sharing options...
aussievintage Posted April 10, 2020 Share Posted April 10, 2020 Try ~/.vnc instead of HOME/.vnc and put a command in front of it, such as ls ~/.vnc Link to comment Share on other sites More sharing options...
Guest rmpfyf Posted April 10, 2020 Share Posted April 10, 2020 2 minutes ago, SETfan said: Thanks guys! I have installed TightVNC server on the NUC with Ubuntu on it. Trying to following some online instructions I found, when I get to this point I get stuck: Configuring the Desktop Environment to be Launched by VNC The next step is to configure what gets started up when the VNC server is launched. As outlined previously the first time a user starts vncserver the .vnc directory is created in their home directory. Change directory to $HOME/.vnc and load the xstartup file into an editor. It should appear as follows: #!/bin/sh # Uncomment the following two lines for normal desktop: # unset SESSION_MANAGER # exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & twm & However, when I type in HOME/.vnc, I get a "No such file or directory" message - see my screenshots from my NUC Ubuntu terminal below: nuc@nuc-desktop:~$ vncserver New 'X' desktop is nuc-desktop:1 Starting applications specified in /home/nuc/.vnc/xstartup Log file is /home/nuc/.vnc/nuc-desktop:1.log nuc@nuc-desktop:~$ vncserver -kill :1 Killing Xtightvnc process ID 2093 nuc@nuc-desktop:~$ HOME/.vnc bash: HOME/.vnc: No such file or directory nuc@nuc-desktop:~$ Any help greatly appreciated!! Replace HOME/.vnc with ~/.vnc (depending on your bashrc config, $HOME/.vnc may also work... just use the tilda) That's just a file though, it's likely not executable - the commands you care about are vncserver (to run it) and the appropriate kill commands. If you want it to run at boot (assuming it doesn't now), there are different processes for that depending which version of Ubuntu you're using. That you can kill the process means it's actually running, and you should be able to point your windows client to your Ubuntu machine assuming you have access etc (ping it for starters, go from there). To actually connect to it from the windows side you'll need to understand how you want to connect - I tend to go over ssh for security as VNC is not an encrypted protocol, though this is up to you. What were you planing here? Link to comment Share on other sites More sharing options...
aussievintage Posted April 10, 2020 Share Posted April 10, 2020 ps -ef |grep 'vnc' will list all processes with the string vnc contained in them - this will show you if it is running, or not Link to comment Share on other sites More sharing options...
aussievintage Posted April 10, 2020 Share Posted April 10, 2020 One issue is that tightvnc uses a different port. Also, it creates a new virtual desktop. If you want to see the existing linux desktop follow these instructions at the below link. Remove the old vnc server install first, including the contents of the ~/.vnc directory. https://www.howtoforge.com/tutorial/how-to-start-a-vnc-server-for-the-actual-display-scraping-with-tigervnc/ Link to comment Share on other sites More sharing options...
aasza Posted April 10, 2020 Share Posted April 10, 2020 @SETfan It's highly likely you aren't logged in to ubuntu as root so you may need to append your terminal commands with sudo to give you temporary root access for each command or if you know the root password then just su in terminal Link to comment Share on other sites More sharing options...
SETfan Posted April 10, 2020 Author Share Posted April 10, 2020 Thanks Guys, I tried both suggestions - this is what happened below. Sorry if I have not understood your suggestions, this is all foreign to me and I am very unfamiliar with any of the protocols, etc. with Ubuntu - thanks for your patience in helping me!! (I dont think I got this correct - "Replace HOME/.vnc with ~/.vnc (depending on your bashrc config, $HOME/.vnc may also work... just use the tilda)" - I just typed in ~/.vnc but I dont really understand what the bash part means or how to do this?) nuc@nuc-desktop:~$ Is ~/.vnc Is: command not found nuc@nuc-desktop:~$ ~/.vnc bash: /home/nuc/.vnc: Is a directory nuc@nuc-desktop:~$ ps -ef |grep 'vnc' nuc 26774 2034 0 10:30 pts/0 00:00:00 grep --color=auto vnc nuc@nuc-desktop:~$ Link to comment Share on other sites More sharing options...
SETfan Posted April 10, 2020 Author Share Posted April 10, 2020 4 minutes ago, aasza said: @SETfan It's highly likely you aren't logged in to ubuntu as root so you may need to append your terminal commands with sudo to give you temporary root access for each command or if you know the root password then just su in terminal Sorry, still getting my head around the terminology...sudo, etc. and what it means/does/how to do it Link to comment Share on other sites More sharing options...
aussievintage Posted April 10, 2020 Share Posted April 10, 2020 5 minutes ago, SETfan said: nuc@nuc-desktop:~$ Is ~/.vnc Is: command not found ??? 'ls' is a most basic unix command, equivalent of dir in windows Link to comment Share on other sites More sharing options...
aussievintage Posted April 10, 2020 Share Posted April 10, 2020 7 minutes ago, SETfan said: nuc@nuc-desktop:~$ ~/.vnc bash: /home/nuc/.vnc: Is a directory It's a directory as it says. You cannot execute it. You can list it's contents 'ls ~/.vnc' or change your current directory to it 'cd ~/.vnc' Link to comment Share on other sites More sharing options...
aussievintage Posted April 10, 2020 Share Posted April 10, 2020 6 minutes ago, SETfan said: sudo the sudo command means - do the following as the super user instead of the current user Link to comment Share on other sites More sharing options...
aasza Posted April 10, 2020 Share Posted April 10, 2020 1 minute ago, SETfan said: Sorry, still getting my head around the terminology...sudo, etc. and what it means/does/how to do it sudo is the linux equivalent of 'run as administrator' in Windows So say you wanted to update the repositories to check for kernel and app updates In terminal you would type: sudo apt-get update Link to comment Share on other sites More sharing options...
aussievintage Posted April 10, 2020 Share Posted April 10, 2020 10 minutes ago, SETfan said: ps -ef |grep 'vnc' nuc 26774 2034 0 10:30 pts/0 00:00:00 grep --color=auto vnc this means the server is not running when you executed the command. The only match the search found was your own search command itself Link to comment Share on other sites More sharing options...
Guest rmpfyf Posted April 10, 2020 Share Posted April 10, 2020 2 hours ago, aasza said: @SETfan It's highly likely you aren't logged in to ubuntu as root so you may need to append your terminal commands with sudo to give you temporary root access for each command or if you know the root password then just su in terminal Superuser privs usually locked in ubuntu - no root on most - just sudo. 2 hours ago, SETfan said: Thanks Guys, I tried both suggestions - this is what happened below. Sorry if I have not understood your suggestions, this is all foreign to me and I am very unfamiliar with any of the protocols, etc. with Ubuntu - thanks for your patience in helping me!! (I dont think I got this correct - "Replace HOME/.vnc with ~/.vnc (depending on your bashrc config, $HOME/.vnc may also work... just use the tilda)" - I just typed in ~/.vnc but I dont really understand what the bash part means or how to do this?) nuc@nuc-desktop:~$ Is ~/.vnc Is: command not found nuc@nuc-desktop:~$ ~/.vnc bash: /home/nuc/.vnc: Is a directory nuc@nuc-desktop:~$ ps -ef |grep 'vnc' nuc 26774 2034 0 10:30 pts/0 00:00:00 grep --color=auto vnc nuc@nuc-desktop:~$ Hang on, go one at a time here. As mentioned ls is a shell command so there's something not right if it's not found - likely typed incorrectly. You have a few issues to overcome here, don't worry they are all normal: Is a VNC server running on your Ubuntu machine? (and 1a, is it running automagically or do you need to get it to run so?) Is it serving the desktop you want? Can your client machine (Windows) access your Ubuntu machine? Is your VNC server configured in a way that your client can access? And for a bonus round, is your VNC implementation as secure as you'd want it to be? Sorry if what comes next tells you how to suck eggs, over a web forum it's hard to work out who knows what. No offence intended. On the first Reboot your Ubuntu PC. Type 'vncserver -kill :1' and hit enter (don't include the quotations). If it gives you message about your tightvnc implementation being killed correctly, then good-o, your VNC server is already configured to run at boot. Great. Otherwise you'll solve that later if you want to. If it was killed successfully you'll need to type 'vncserver' to get it running again, if there was nothing to kill type 'vncserver' to start it and note if it has started. Report back on this only if you can't start it. On the second Let's see what you get first. It might be what you want, it might not and you might like it. On the third I'm assuming your Ubuntu and Windows machines are on the same LAN. If so, type 'ifconfig' on your Ubuntu machine and get a hold of your local IP (it'll be the one for the interface you're using, be it eth, wlan, etc). Head to your Windows machine and just try to ping it, e.g. 'ping insert Ubuntu machine address' - hopefully you get success. If not, other issues to sort first. On the fourth Try to connect using any VNC client to that IP address and whatever port number your guide recommended to you. Note: this is not secure. Bonus round I have no idea which Ubuntu version you're using and to be honest I've not done a direct VNC in a while (my machines serving VNC are headless and the setup is a good bit different); look up any guide for setting up a VNC client that uses SSH to tunnel through the machines. You'll need to setup a SSH server on the Ubuntu machine and use a client t the Windows end (e.g. PuTTY or similar). The basic process is 'establish secure tunnel with SSH' > 'Implement VNC locally when tunnelled'. Do not try to encrypt a VNC connection directly, your client likely won't connect that much. Hope this helps. Link to comment Share on other sites More sharing options...
pwstereo Posted April 10, 2020 Share Posted April 10, 2020 The ls (list) command is lower-case L and lower-case S, maybe you read it and typed is as upper-case i? Link to comment Share on other sites More sharing options...
SETfan Posted April 10, 2020 Author Share Posted April 10, 2020 6 minutes ago, rmpfyf said: Superuser privs usually locked in ubuntu - no root on most - just sudo. Hang on, go one at a time here. As mentioned ls is a shell command so there's something not right if it's not found - likely typed incorrectly. You have a few issues to overcome here, don't worry they are all normal: Is a VNC server running on your Ubuntu machine? (and 1a, is it running automagically or do you need to get it to run so?) Is it serving the desktop you want? Can your client machine (Windows) access your Ubuntu machine? Is your VNC server configured in a way that your client can access? And for a bonus round, is your VNC implementation as secure as you'd want it to be? Sorry if what comes next tells you how to suck eggs, over a web forum it's hard to work out who knows what. No offence intended. On the first Reboot your Ubuntu PC. Type 'vncserver -kill :1' and hit enter (don't include the quotations). If it gives you message about your tightvnc implementation being killed correctly, then good-o, your VNC server is already configured to run at boot. Great. Otherwise you'll solve that later if you want to. If it was killed successfully you'll need to type 'vncserver' to get it running again, if there was nothing to kill type 'vncserver' to start it and note if it has started. Report back on this only if you can't start it. On the second Let's see what you get first. It might be what you want, it might not and you might like it. On the third I'm assuming your Ubuntu and Windows machines are on the same LAN. If so, type 'ifconfig' on your Ubuntu machine and get a hold of your local IP (it'll be the one for the interface you're using, be it eth, wlan, etc). Head to your Windows machine and just try to ping it, e.g. 'ping insert Ubuntu machine address' - hopefully you get success. If not, other issues to sort first. On the fourth Try to connect using any VNC client to that IP address and whatever port number your guide recommended to you. Note: this is not secure. Bonus round I have no idea which Ubuntu version you're using and to be honest I've not done a direct VNC in a while (my machines serving VNC are headless and the setup is a good bit different); look up any guide for setting up a VNC client that uses SSH to tunnel through the machines. You'll need to setup a SSH server on the Ubuntu machine and use a client t the Windows end (e.g. PuTTY or similar). The basic process is 'establish secure tunnel with SSH' > 'Implement VNC locally when tunnelled'. Do not try to encrypt a VNC connection directly, your client likely won't connect that much. Hope this helps. Wow! Thanks so much for your detailed but very clear instructions - appreciate your time in doing this for me. When I have time later today I will have a go at getting through them and hopefully nail it. And please DON'T worry about telling me how to suck eggs on this one - my Ubuntu experience is basically zero so the simpler and more basic the better!!!! Link to comment Share on other sites More sharing options...
aussievintage Posted April 10, 2020 Share Posted April 10, 2020 4 minutes ago, rmpfyf said: Type 'vncserver -kill :1' and hit enter (don't include the quotations). If it gives you message about your tightvnc implementation being killed correctly, then good-o, your VNC server is already configured to run at boot. If you have run it more than once, it might be started with a different display number :2 or :3 or more. You can start vncserver with different displays via the command line. If nothing is configured, it will be :1, but also when you connect to it, it might just show the raw Xserver (grey screen) - no desktop started. Most people want to see the current desktop, current display. btw. The current display is :0 - but you need a different version of vnc server to access that - as per the link I posted (screen scraper) 12 minutes ago, rmpfyf said: Try to connect using any VNC client to that IP address 10 minutes ago, rmpfyf said: whatever port number your guide recommended to you tightvnc seemed to default to port 5901 when I tested it. The default is 5900 for the vnc viewer under windows, so you need to append :5901 to the ip address when you try to connect Link to comment Share on other sites More sharing options...
SETfan Posted April 10, 2020 Author Share Posted April 10, 2020 6 minutes ago, pwstereo said: The ls (list) command is lower-case L and lower-case S, maybe you read it and typed is as upper-case i? Good pick up! Yes, I was trying Is using an upper case i Just tried lower case l and of course it worked that time! Thanks! 1 Link to comment Share on other sites More sharing options...
SETfan Posted April 10, 2020 Author Share Posted April 10, 2020 Thanks Aussievintage - this is all going to help me later today!! Link to comment Share on other sites More sharing options...
SETfan Posted April 10, 2020 Author Share Posted April 10, 2020 OK, so here is the update of where I am now at!! My text is in blue and terminal output in red: On the first Reboot your Ubuntu PC. Type 'vncserver -kill :1' and hit enter (don't include the quotations). If it gives you message about your tightvnc implementation being killed correctly, then good-o, your VNC server is already configured to run at boot. Great. Otherwise you'll solve that later if you want to. If it was killed successfully you'll need to type 'vncserver' to get it running again, if there was nothing to kill type 'vncserver' to start it and note if it has started. Report back on this only if you can't start it. OK then - discovered that my VNC is not configured to run at boot, refer result below: Couldn't start Xtightvnc; trying default font path. Please set correct fontPath in the vncserver script. Couldn't start Xtightvnc process. So started manually, see next: On the second Let's see what you get first. It might be what you want, it might not and you might like it. Got VNC to run ok, result below: nuc@nuc-desktop:~$ vncserver New 'X' desktop is nuc-desktop:1 Starting applications specified in /home/nuc/.vnc/xstartup Log file is /home/nuc/.vnc/nuc-desktop:1.log Does that look OK??? On the third I'm assuming your Ubuntu and Windows machines are on the same LAN. If so, type 'ifconfig' on your Ubuntu machine and get a hold of your local IP (it'll be the one for the interface you're using, be it eth, wlan, etc). Head to your Windows machine and just try to ping it, e.g. 'ping insert Ubuntu machine address' - hopefully you get success. If not, other issues to sort first. Got the local IP from ifconfig, then went back to Windows machine and ping'd successfully ("packets sent 4 Packets received 4 Packets lost 0") On the fourth Try to connect using any VNC client to that IP address and whatever port number your guide recommended to you. Note: this is not secure. Damn, I was going so well up until this point! Tried to connect to the local IP shown on the NUC using the existing VNC Viewer that I have on my Windows machine, but it just times out waiting for a response... Back to the experts please!?! At least it feels like I am getting close!! Link to comment Share on other sites More sharing options...
SETfan Posted April 10, 2020 Author Share Posted April 10, 2020 Try to connect using any VNC client to that IP address and whatever port number your guide recommended to you. Note: this is not secure. Actually, my VNC Viewer only asked for the IP address but I didnt see anywhere to enter a port number...better go back and have another look!! Link to comment Share on other sites More sharing options...
Recommended Posts