Telescope plugin does not start on Linux

Asked by Mehdi Sanayei

Installed Stellarium 0.15.0 on Windows, Mac, LinuxMint (Ubuntu used to install apt-get install)
Used USB-Serial RS232 from UniTek cable and drivers.
1 - OK - Telescope plugin started using port COM3 on Windows
2 - OK - Telescope plugin started using port /dev/uc_tty.. on Mac
3 - NOK - Telescope plugin does not start using port /dev/ttyUSB0 on LinuxMint

On this issue #3 , all my settings and config are the same as Windows and Mac.
On this issue #3 , I have checked the USB-Serial RS232 cable with other servers, it is working fine.
On this issue #3 , I run "tail -200f /var/log/syslog", I can see and trace the device "/dev/ttyUSB0" connects as USB-Serial RS232 port.
On this issue #3 , I defined a "nothing just simulation" virtual telescope, the status shows connected, and it works, slewing happens.

I need your help, any other testings/logs you need, please ask

Mehdi Sanayei (call me Mike +61 424 070 466)

Question information

Language:
English Edit question
Status:
Solved
For:
Stellarium Edit question
Assignee:
No assignee Edit question
Solved by:
Mehdi Sanayei
Solved:
Last query:
Last reply:
Revision history for this message
Alexander Wolf (alexwolf) said :
#1

Are you have permissions to read/write to /dev/ttyUSB0?

Revision history for this message
Mehdi Sanayei (mehdis) said :
#2

Hi AlexYes, tekescope plugin started
In a terminal session as rootchmod 666 /dev/ttyUSB0
By removing the USB jack from my Linux, the chmod goes back 660
The solution is your application Stellarium send it a warning message to make the port in read/write (or issue a chmod command in the application, if it can)
Thank you for your quick fix Regards;
Mehdi Sanayei

Address:
20 Booraba Ave,
Lindfield, NSW, 2070
Australia

Phones:
61-2-9880-8350 (Home - After Hours)
 61(0)415-498-345 (mobile - Private)
61(0)424-070-466 (mobile - Business)

    On Thursday, 22 December 2016, 16:58, Alexander Wolf <email address hidden> wrote:

 Your question #408055 on Stellarium changed:
https://answers.launchpad.net/stellarium/+question/408055

    Status: Open => Needs information

Alexander Wolf requested more information:
Are you have permissions to read/write to /dev/ttyUSB0?

--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https://answers.launchpad.net/stellarium/+question/408055

You received this question notification because you asked the question.

Revision history for this message
Mehdi Sanayei (mehdis) said :
#3

Hi Alex
Yes, telescope plugin started

In a terminal session as root
chmod 666 /dev/ttyUSB0

By removing the USB jack from my Linux, the chmod goes back 660

The solution is your application Stellarium sends a warning message to make the port in read/write (or issue a chmod command in the application, if it can)

Thank you for your quick fix

Revision history for this message
Mehdi Sanayei (mehdis) said :
#4

Hi Alex

The issue is not in Linux,
if you log in in a terminal session, then

sudo su -

run
stellarium

/dev/ttyUSB0 is visible to your application as root

As a normal user, /dev/ttyUSB0 is belong to "root:dialup" owner:group,
then again from root you need to run chmod to give permission to Other.

chmod o+rw /dev/ttyUSB0

This is a work around, it is not a solution.

Thank you
+61424070466
Mehdi

Revision history for this message
Mehdi Sanayei (mehdis) said :
#5

Hi AlexThe issue is not in Linux,
if you log in in a terminal session, thensudo su -run
stellarium/dev/ttyUSB0 is visible to your application as rootAs a normal user, /dev/ttyUSB0 is belong to "root:dialup" owner:group,
then again from root you need to run chmod to give permission to Other.chmod o+rw /dev/ttyUSB0This is a work around, it is not a solution.Thank you
+61424070466
Mehdi
 Regards;
Mehdi Sanayei

Address:
20 Booraba Ave,
Lindfield, NSW, 2070
Australia

Phones:
61-2-9880-8350 (Home - After Hours)
 61(0)415-498-345 (mobile - Private)
61(0)424-070-466 (mobile - Business)

    On Friday, 23 December 2016, 11:23, Mehdi Sanayei <email address hidden> wrote:

 Your question #408055 on Stellarium changed:
https://answers.launchpad.net/stellarium/+question/408055

Mehdi Sanayei posted a new comment:
Hi Alex

The issue is not in Linux,
if you log in in a terminal session, then

sudo su -

run
stellarium

/dev/ttyUSB0 is visible to your application as root

As a normal user, /dev/ttyUSB0  is belong  to "root:dialup" owner:group,
then again from root you need to run chmod to give permission to Other.

chmod o+rw /dev/ttyUSB0

This is a work around, it is not a solution.

Thank you
+61424070466
Mehdi

--
You received this question notification because you asked the question.

Revision history for this message
gzotti (georg-zotti) said :
#6

Does it help to add yourself to the dialup group?

Revision history for this message
Mehdi Sanayei (mehdis) said :
#7

 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } HiYes it will start
To my understanding from UNIX , one of these work arounds should be implented in Stellarium app The minimum is just a warning msg

Sent from Yahoo Mail for iPhone

On Friday, December 23, 2016, 11:38 AM, gzotti <email address hidden> wrote:

Your question #408055 on Stellarium changed:
https://answers.launchpad.net/stellarium/+question/408055

gzotti posted a new comment:
Does it help to add yourself to the dialup group?

--
You received this question notification because you asked the question.

Revision history for this message
Alexander Wolf (alexwolf) said :
#8

> To my understanding from UNIX , one of these work arounds should be implented in Stellarium app The minimum is just a warning msg

What??? Really? Please propose patch for the guessing of group name for dial for various Linux/BSD/Solaris/*NIX OS/distros and adding current user to dial group without administrative permissions.

Revision history for this message
Mehdi Sanayei (mehdis) said :
#9

Hi AlexPlease create a bug like this for all type of Linux:
These are the log I created for the problem .
Simply this device in Linux is not available to any group or user.
crw-rw---- 1 root dialout 188, 0 Dec 23 15:02 /dev/ttyUSB0
Yes, by sudo to root, and "chmod 666 /dev/ttyUSB0", you get it availabe to all groups and users, but it will be gone after unplug the USB cable.
SO the only clean solution is to run it as root (as we are ready to did "sudo su -" for root access.
Please see my log (pedram is a normal user, pedtop is root).

Fri Dec 23 15:00:43 EST 2016
pedram@pedtop ~ $ ls -als /dev/ttyUSB*
ls: cannot access /dev/ttyUSB*: No such file or directory
pedram@pedtop ~ $ pedram@pedtop ~ $ # after USB connection to Linux ###
pedram@pedtop ~ $ # after USB connection to Linux ###
pedram@pedtop ~ $

pedram@pedtop ~ $ ls -als /dev/ttyUSB*
0 crw-rw---- 1 root dialout 188, 0 Dec 23 15:02 /dev/ttyUSB0
pedram@pedtop ~ $ ls -als /dev/ttyUSB*
0 crw-rw---- 1 root dialout 188, 0 Dec 23 15:02 /dev/ttyUSB0
pedram@pedtop ~ $ sudo  su -
[sudo] password for pedram:
pedtop ~ #
pedtop ~ # ls -als /dev/ttyUSB0
0 crw-rw---- 1 root dialout 188, 0 Dec 23 15:02 /dev/ttyUSB0
pedtop ~ # # now run stellarium ###
pedtop ~ #
pedtop ~ # stellarium

 -------------------------------------------------------
[ This is Stellarium 0.14.3 - http://www.stellarium.org ]
[ Copyright (C) 2000-2016 Fabien Chereau et al.         ]
 -------------------------------------------------------
Writing log file to: "/root/.stellarium/log.txt"
File search paths:
  0 .  "/root/.stellarium"
  1 .  "/usr/share/stellarium"
Config file is:  "/root/.stellarium/config.ini"
Detected: OpenGL "3.0"
Driver version string: "3.0 Mesa 10.1.0"
GL vendor is "X.Org"
GL renderer is "Gallium 0.4 on AMD CEDAR"
GL Shading Language version is "1.30"
MESA Version Number detected:  10.1
Mesa version is fine, we should not see a graphics problem.
GLSL Version Number detected:  1.3
GLSL version is fine, we should not see a graphics problem.
Cache directory is:  "/root/.cache/stellarium/stellarium"
Sky language is  "en_AU"
Application language is  "en_AU"
Loading Solar System data ...
Loading star data ...
"Loading "/usr/share/stellarium/stars/default/stars_0_0v0_5.cat": 0_0v0_2; 4963"
"Loading "/usr/share/stellarium/stars/default/stars_1_0v0_5.cat": 1_0v0_2; 21598"
"Loading "/usr/share/stellarium/stars/default/stars_2_0v0_5.cat": 2_0v0_2; 150090"
"Loading "/usr/share/stellarium/stars/default/stars_3_1v0_3.cat": 3_1v0_3; 428466"
Finished loading star catalogue data, max_geodesic_level:  3
navigation/preset_sky_time is a double - treating as jday: "2451514.25001"
Reloading DSO data...
Loaded 10756 DSO records
Loading DSO name data ...
Loaded 221 / 297 DSO name records successfully
Loading star names from "/usr/share/stellarium/skycultures/western/star_names.fab"
Loaded 339 / 339 common star names
Loading star names from "/usr/share/stellarium/stars/default/name.fab"
Loaded 4506 / 4506 scientific star names
Loading variable stars from "/usr/share/stellarium/stars/default/gcvs_hip_part.dat"
Loaded 6916 / 6916 variable stars
Loading cross-index data from "/usr/share/stellarium/stars/default/cross-index.dat"
Loaded 108279 / 108279 cross-index data records
Loaded 88 / 88 constellation records successfully for culture "western"
Loaded 85 / 85 constellation art records successfully for culture "western"
Loaded 88 / 88 constellation names
Loading constellation boundary data ...
Loaded 782 constellation boundary segments
Initializing basic GL shaders...
Creating GUI ...
Loaded plugin "Exoplanets"
Exoplanets: version of the format of the catalog: 1
Exoplanets: loading catalog file: "/root/.stellarium/modules/Exoplanets/exoplanets.json"
Loaded plugin "FOV"
Loaded plugin "MeteorShowers"
MeteorShowersMgr: Loading catalog file: "/root/.stellarium/modules/MeteorShowers/showers.json"
Loaded plugin "Novae"
Novae: version of the catalog: 1
Novae: loading catalog file: "/root/.stellarium/modules/Novae/novae.json"
Loaded plugin "Oculars"
Ocular plugin - press Command-O to toggle eyepiece view mode. Press ALT-o for configuration.
Oculars::validateIniFile ocular.ini exists at:  "/root/.stellarium/modules/Oculars/ocular.ini" . Checking version...
Oculars::validateIniFile found existing ini file version  3
Loaded plugin "Satellites"
Satellites: loading catalog file: "/root/.stellarium/modules/Satellites/satellites.json"
Loaded plugin "SolarSystemEditor"
Using the ssystem.ini file that already exists in the user directory...
Loaded plugin "TelescopeControl"
TelescopeControl: Only embedded telescope servers are available.
Creating telescope "SkyWatcher:TelescopeServerNexStar:J2000:/dev/ttyUSB0:500000" ; name/type/equinox/params: "SkyWatcher" "TelescopeServerNexStar" J2000 "/dev/ttyUSB0:500000"
TelescopeClientDirectNexStar paramaters: port, time_delay: "/dev/ttyUSB0" 500000
TelescopeControl: Loaded successfully 1 telescopes.

Unable to find module called "TimeZoneConfiguration"
Loaded plugin "TimeZoneConfiguration"
QIODevice::write: device not open
Initializing planets GL shaders...
IP answer: "220.239.251.243,AU,Australia,NSW,New South Wales,Forestville,2087,Australia/Sydney,-33.77,151.21,0
"

 Regards;
Mehdi Sanayei

Address:
20 Booraba Ave,
Lindfield, NSW, 2070
Australia

Phones:
61-2-9880-8350 (Home - After Hours)
 61(0)415-498-345 (mobile - Private)
61(0)424-070-466 (mobile - Business)

    On Friday, 23 December 2016, 14:47, Alexander Wolf <email address hidden> wrote:

 Your question #408055 on Stellarium changed:
https://answers.launchpad.net/stellarium/+question/408055

Alexander Wolf posted a new comment:
> To my understanding from UNIX , one of these work arounds should be
implented in Stellarium app The minimum is just a warning msg

What??? Really? Please propose patch for the guessing of group name for
dial for various Linux/BSD/Solaris/*NIX OS/distros and adding current
user to dial group without administrative permissions.

--
You received this question notification because you asked the question.

Revision history for this message
Alexander Wolf (alexwolf) said :
#10

I see you do not understand how it works.

Revision history for this message
gzotti (georg-zotti) said :
#11

Adding the user running Stellarium to the group owning your tty is not a workaround. It is the obvious solution. You will stay in the dialup group and can run Stellarium as non-root. Don't chmod your tty if it falls back to 660 later. You may have users on your systems which are not allowed to use your telescope. And don't run Stellarium as root.

This is not a bug, this is how Un*xoid OSes work. We can add a note to the manual.

Revision history for this message
Mehdi Sanayei (mehdis) said :
#12

 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } HI gzotti Yes  100% correctI am so glad that you see what I try to explainFirst let's correct that the group name is "dialout"Please add it this to your user manual
Please log in as group dialout to run Stellarium or add your userID eg alex to the groupExample
# useradd -G dialout alex

The application also send the same message if we log in as userID alex
Sent from Yahoo Mail for iPhone

On Friday, December 23, 2016, 11:37 PM, gzotti <email address hidden> wrote:

Your question #408055 on Stellarium changed:
https://answers.launchpad.net/stellarium/+question/408055

gzotti posted a new comment:
Adding the user running Stellarium to the group owning your tty is not a
workaround. It is the obvious solution. You will stay in the dialup
group and can run Stellarium as non-root. Don't chmod your tty if it
falls back to 660 later. You may have users on your systems which are
not allowed to use your telescope. And don't run Stellarium as root.

This is not a bug, this is how Un*xoid OSes work. We can add a note to
the manual.

--
You received this question notification because you asked the question.

Revision history for this message
Mehdi Sanayei (mehdis) said :
#13

#yiv2591280570 blockquote, #yiv2591280570 div.yiv2591280570yahoo_quoted {margin-left:0 !important;border-left:1px #715FFA solid !important;padding-left:1ex !important;background-color:white;}Hi gzotti
Added more steps for the checking, please run the following commands:
sudo su -

#check the device driverls -la /dev/ttyUSB*
# to check the group cat /etc/group

# to create userID  eg alexuseradd alexid alex

# adding userID eg alex to dialout group
usermod -g dialout alex
cat /etc/group | grep dialout

exit
# log in as userID alex
# start planetarium application
stellarium

Sent from Yahoo Mail for iPhone

On Friday, December 23, 2016, 11:37 PM, gzotti <email address hidden> wrote:
Your question #408055 on Stellarium changed:
https://answers.launchpad.net/stellarium/+question/408055

gzotti posted a new comment:
Adding the user running Stellarium to the group owning your tty is not a
workaround. It is the obvious solution. You will stay in the dialup
group and can run Stellarium as non-root. Don't chmod your tty if it
falls back to 660 later. You may have users on your systems which are
not allowed to use your telescope. And don't run Stellarium as root.

This is not a bug, this is how Un*xoid OSes work. We can add a note to
the manual.

--
You received this question notification because you asked the question.